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 optional custom api_base_url 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, etc.).

agents-cli config

3. info

Displays your current account information: credits, usage summary, plus a quick reference of commands.

agents-cli info

4. agents

Lists all your agents, including name, ID, status, associated API key, and credits.

agents-cli agents

5. api-keys

Lists all your existing API keys, creation date, and last-used timestamp.

agents-cli api-keys

6. usage

Shows overall usage stats (total cost, average cost) and a breakdown by agent.

agents-cli usage

7. agent-info <agent_id>

Displays details 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.

agents-cli create-key --name "My Key"

9. link <action>

Gets a direct link (URL) to a relevant resource, e.g. billing or docs. Optionally opens your browser.

agents-cli link docs

Legacy Commands (send, upload, stream)

send – Send an operation (like 'message') to an agent.

upload – Upload a file to an agent.

stream – Connect to an agent’s WebSocket stream. Useful for real-time logs.

These commands require --api-key and --agent-id if your CLI isn't configured with a default token.

BASH
agents-cli send message '{"text":"Hello"}' --api-key YOUR_API_KEY --agent-id YOUR_AGENT_ID