Skip to main content

Prerequisites

  • Python agent using LangChain, LangGraph or CrewAI
  • requirements.txt and pyproject.toml in your project root
  • An AO account at aodeploy.com
1

Install the CLI

npm install -g @ao-ai/cli
2

Login

ao login
This opens your browser to authenticate. Once done, your API key is stored securely on your machine.
3

Initialize your project

Inside your agent’s project directory:
ao init
This creates an ao.toml file:
name = "my-agent"
framework = "langgraph"
entrypoint = "./graph.py:graph"

python = "3.11"

[runtime]
max_retries = 3
timeout = 300 # 5 minutes
Edit entrypoint to point to your agent’s main file.
4

Deploy

ao deploy
AO zips your project, builds a Docker image, and deploys it. You’ll see a link to your deployment in the dashboard when it’s done.
Deploying agent...
Packing project...
Deployment successful!
View your deployment at: https://aodeploy.com/dashboard/deployments
5

Run your agent

ao run --deployment <deployment-id> --input '{"messages": ["your input here"]}'
Find your deployment ID in the dashboard.

What happens next

Once deployed, AO handles:
  • Retries - if your agent fails, it retries automatically with exponential backoff up to max_retries
  • Timeouts - if a run exceeds timeout seconds, it’s killed and retried
  • Queues - runs are queued durably so nothing is lost if the server restarts, processed concurrently across workers, and never duplicated
  • Scheduling - run your agent on a cron schedule, no infrastructure needed
  • Logging - every tool call, LLM call, and error is logged and visible in the dashboard
  • State - each retry knows what attempt it’s on and what the previous error was

Configure ao.toml

Learn how to customize retries, timeouts, scheduling, and more.