CLI: Functions
Overview of Commands
Below is a summary of commands available in the agents-cli
tool. Run agents-cli --help
for more details.
1. setup
Guides you through storing a secure auth token and configuring API settings in ~/.agents-api/config.ini
.
agents-cli setup
2. config
Shows or updates your CLI configuration (e.g., current API base URL, clearing your auth token, HTML documentation settings).
agents-cli config
3. info
Displays your current account information: credits, usage summary, plus a quick reference of commands. Can also generate HTML documentation.
agents-cli info
4. agents
Lists all your agents, including name, ID, status, associated API key, and credits. Displays complete IDs and keys without truncation.
agents-cli agents
5. api-keys
Lists all your existing API keys, name, creation date, and last-used timestamp. Shows full key values without truncation.
agents-cli api-keys
6. usage
Shows overall usage stats (total cost, average cost per hour/day/week) and a breakdown by agent.
agents-cli usage
7. agent-info <agent_id>
Displays detailed information for a specific agent. Includes container status, available credits, and more.
agents-cli agent-info 123-xyz
8. create-key
Creates a new API key (permanently stored in your account). Provide an optional --name
for clarity. Offers to save the key to a file.
agents-cli create-key --name "My Key"
9. link <action>
Gets a direct link (URL) to a relevant resource, e.g. billing, docs, dashboard, etc. Options to open your browser or copy to clipboard.
agents-cli link docs --open --copy
Available resources include: dashboard, billing, docs, settings, agents, support.
10. stream <agent_id>
Connect to an agent's WebSocket stream to receive real-time updates. Use this to monitor agent activity without sending commands.
agents-cli stream YOUR_AGENT_ID
Options include using persistent WebSocket connection and plain text output.
Legacy Commands (send)
send
– Send an operation (like 'message') to an agent.
This command requires --api-key
and --agent-id
if your CLI isn't configured with a default token. Supports multiple input formats including JSON from file, stdin, or interactive input.
BASHagents-cli send message '{"text":"Hello"}' --api-key YOUR_API_KEY --agent-id YOUR_AGENT_ID
Or using direct JSON:
BASHagents-cli send --json '{"operation":"message","api_key":"KEY","agent_id":"ID","params":{"message":"Hello"}}'
HTML Documentation
Several commands support generating HTML documentation and reports when the feature is enabled in configuration:
info
- Can generate a complete CLI reference guideagents
- Can generate an HTML report of all your agentsapi-keys
- Can generate an HTML report of all your API keys
HTML files are saved to ~/.agents-api/html_docs/
with timestamps.