Overview
The Cavos CLI is designed to work seamlessly with AI agents and autonomous systems. It provides:- JSON output for easy parsing (
--jsonflag) - OpenAI tool schema for LLM function calling
- Environment-based auth (no interactive prompts)
- Batch operations via multicall
Quick Start
1. Export Session from Dashboard
2. Get Tool Schema
The CLI provides an OpenAI-compatible tool schema:3. Give Tools to Your AI Agent
Example with OpenAI:Available Tools
The CLI exposes 8 tools for AI agents:| Tool | Purpose | Example |
|---|---|---|
cavos_whoami | Get wallet info | Check session status |
cavos_balance | Check token balances | Verify funds before transfer |
cavos_transfer | Send ERC-20 tokens | Move funds |
cavos_approve | Approve token spending | DeFi operations |
cavos_execute | Arbitrary contract call | Custom interactions |
cavos_multicall | Batch multiple calls | approve + swap in one tx |
cavos_session_status | Check session on-chain | Diagnose failures |
cavos_policy_show | View spending policy | Check remaining limits |
[!TIP]
Always call cavos_whoami first to ensure the agent is properly authenticated.
Example Use Cases
1. DeFi Trading Bot
An AI agent that monitors prices and executes swaps:2. Portfolio Rebalancing Agent
An agent that maintains a target portfolio allocation:3. On-Chain Task Automation
An agent that executes recurring on-chain tasks:Error Handling
AI agents should handle CLI errors gracefully:Spending Limits for AI Agents
Critical: Always set strict spending limits when giving sessions to AI agents:[!CAUTION] An AI agent with an unlimited session could drain your wallet if it malfunctions or acts maliciously.
CI/CD Integration
Use the CLI in GitHub Actions, GitLab CI, or other automation:Monitoring & Logging
Track all CLI operations for debugging:Next Steps
Examples
More practical workflows
Session Management
Understand session policies
Commands Reference
Full CLI command list

