Agno CLI
Scaffold, run, and connect an AgentOS from the terminal with the agno command.
agno create my-os
cd my-os
# add your secrets to .env
agno up
agno connectThe agno command scaffolds AgentOS projects, runs them with Docker Compose, connects your coding agents over MCP, and manages service-account tokens. Every command takes --json and emits a single JSON document on stdout, so coding agents and scripts can drive it.
Install
The CLI ships with the SDK, so installing agno 2.7 or later puts the agno command on your PATH.
uv pip install -U agnoThe CLI is also published standalone as agnoctl. It runs independently of the SDK, with CLI dependencies including typer, rich, httpx, and questionary (plus tomli on Python < 3.11):
uvx agnoctl connectagno and agnoctl are the same CLI under two names.
Commands
| Command | What it does | Guide |
|---|---|---|
agno create [name] | Scaffold a project from a starter template, prompting when the name is omitted | Create a project |
agno connect | Connect coding agents to a running AgentOS over MCP | Connect your clients |
agno disconnect | Remove AgentOS MCP entries from client configs | Connect your clients |
agno up / down / restart | Run the project with Docker Compose | Operate your AgentOS |
agno status | Show the discovered AgentOS and connected clients | Operate your AgentOS |
agno tokens create / list / revoke | Manage service-account tokens | Manage tokens |
How the CLI Finds Your AgentOS
connect, status, and tokens need a running AgentOS. They resolve its URL in this order:
| Priority | Source | Example |
|---|---|---|
| 1 | --url flag | agno connect --url https://os.example.com |
| 2 | AGENTOS_URL environment variable | export AGENTOS_URL=https://os.example.com |
| 3 | AGENTOS_URL in a project env file | AGENTOS_URL=https://os.example.com in .env.production, then .env |
| 4 | Localhost probe | Ports 7777, 7778, 7779, 8000 |
The probe covers AgentOS.serve()'s default port (7777), common bump-up ports, and a bare uvicorn setup (8000). If your AgentOS runs on any other host or port, point the CLI at it with --url or AGENTOS_URL.
Developer Resources
- agnoctl reference: full flag tables, environment variables, exit codes, and JSON output schemas
- Starter templates