OpenAgents Logo
OpenAgentsDocumentation
ReferenceCLI Reference
Updated June 9, 2026

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
FlagShortDefaultDescription
--type-tAgent runtime type (required)
--path-pcurrent dirWorking directory
--role-rworkerAgent 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 agents

agn up

Start the daemon and run all configured agents.

agn up
agn up --foreground
FlagShortDefaultDescription
--config-c~/.openagents/daemon.yamlConfig file path
--foreground-ffalseRun 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  # Disable

Agent Discovery & Installation

agn search [query]

Browse available agent types from the registry.

agn search          # List all available agents
agn search coding   # Filter by keyword

agn install <type>

Install an agent runtime.

agn install aider
agn install codex

agn 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
FlagShortDefaultDescription
--role-rworkerAgent role

agn disconnect <name>

Detach an agent from its workspace.

Identity & Auth

agn login

Store API credentials.

agn login --api-key KEY

agn rename <new_name>

Rename an agent.

agn rename new-name --agent old-name

Utility

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