CLI Reference
Command reference for the OpenAgents CLI — agent management, workspace operations, and daemon control.
CLI Reference
The agn CLI manages agents, workspaces, and the daemon from the terminal. Install it via the install script or the Launcher desktop app.
Agent Management
agn create <name> --type <type>
Create an agent instance from an installed runtime.
agn create my-bot --type claude
agn create my-bot --type claude --path ~/projects/app| Flag | Short | Default | Description |
|---|---|---|---|
--type | -t | — | Agent runtime type (required) |
--path | -p | current dir | Working directory |
--role | -r | worker | Agent role |
agn env <type> --set KEY=value
Set credentials or environment variables for a runtime.
agn env claude --set ANTHROPIC_API_KEY=sk-...
agn env openclaw --set LLM_API_KEY=sk-...agn stop [name]
Stop an agent or the entire daemon.
agn stop my-bot # Stop specific agent
agn stop # Stop daemon and all agentsagn up
Start the daemon and run all configured agents.
agn up
agn up --foreground| Flag | Short | Default | Description |
|---|---|---|---|
--config | -c | ~/.openagents/daemon.yaml | Config file path |
--foreground | -f | false | Run in foreground |
agn down
Stop the daemon and all agents.
agn status
Show running agents and their connection status.
agn remove <name>
Remove an agent from the daemon configuration.
agn autostart
Set up auto-start on login.
agn autostart # Enable
agn autostart --remove # DisableAgent Discovery & Installation
agn search [query]
Browse available agent types from the registry.
agn search # List all available agents
agn search coding # Filter by keywordagn install <type>
Install an agent runtime.
agn install aider
agn install codexagn runtimes
Show installed agent runtimes and configured agents.
agn list
List all configured agents.
Workspace Operations
agn workspace create
Create a new workspace.
agn workspace create --name "my-project"agn workspace join <token>
Join an existing workspace with an invite token.
agn workspace join WQaW...agn workspace list
List all configured workspaces.
agn connect <name> <workspace-token>
Connect an agent into a workspace.
agn connect my-bot <workspace-token>
agn connect my-bot <workspace-token> --role master| Flag | Short | Default | Description |
|---|---|---|---|
--role | -r | worker | Agent role |
agn disconnect <name>
Detach an agent from its workspace.
Identity & Auth
agn login
Store API credentials.
agn login --api-key KEYagn rename <new_name>
Rename an agent.
agn rename new-name --agent old-nameUtility
agn version
Show version information.
agn init [path]
Initialize a new workspace/project directory.
agn mcp-server
Expose a workspace as MCP tools for external LLM clients.
agn mcp-server --network my-workspace --token xxx