Skip to main content

Installation

npm install -g @ao-ai/cli

Commands

ao init

Initializes AO in your current project directory. Creates an ao.toml configuration file if one doesn’t already exist.
ao init
Example output:
Initialized AO configuration file at: /your/project/ao.toml

ao login

Authenticates your machine with your AO account. Opens a browser window to complete login. Your API key is stored securely in your system’s keychain.
ao login

ao logout

Removes your stored API key from the system keychain.
ao logout

ao deploy

Zips your current project, builds a Docker image, and deploys your agent to AO’s infrastructure.
ao deploy
Requirements before deploying:
  • ao.toml must exist (run ao init first)
  • requirements.txt must exist
  • pyproject.toml must exist
  • deploy.entrypoint must be set in ao.toml
Example output:
Deploying agent...
Packing project...
Deployment successful!
View your deployment at: https://aodeploy.com/dashboard/deployments

ao run

Triggers a run of a deployed agent.
ao run --deployment <deployment-id> --input '{"messages": ["your input here"]}'
Options:
OptionRequiredDescription
--deployment, -dYesThe deployment ID to run
--inputYesInput string passed to your agent
Example:
ao run --deployment abc123 --input "summarize last week's sales data"

ao env

Manage environment variables for your deployments.
ao env set KEY VALUE
ao env list
ao env delete KEY
SubcommandDescription
set <KEY> <VALUE>Set an environment variable
listList all environment variables
delete <KEY>Delete an environment variable

Global options

FlagDescription
--versionPrint the CLI version
--helpShow help for any command