Skip to main content

Manage

TaskCommand
Deploy updatesag infra patch --env prd
Stop deploymentag infra down --env prd
Force rebuildag infra up --env dev -f
Restart localag infra up --env dev
ag infra down --env prd removes all AWS resources, including the database. Back up your data first.

Customize

Create agents/my_agent.py:
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from db import get_postgres_db

my_agent = Agent(
    id="my-agent",
    name="My Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    db=get_postgres_db(),
    instructions="You are a helpful assistant.",
)
Register in app/main.py:
from agents.my_agent import my_agent

agent_os = AgentOS(
    name="AgentOS",
    agents=[knowledge_agent, mcp_agent, my_agent],
)
Restart locally:
ag infra up --env dev
Agno includes 100+ tool integrations. See the full list.
from agno.tools.slack import SlackTools
from agno.tools.google_calendar import GoogleCalendarTools

my_agent = Agent(
    tools=[
        SlackTools(),
        GoogleCalendarTools(),
    ],
)
Load documents for the Knowledge Agent:
# Local
docker exec -it agentos-aws-template-api python -m agents.knowledge_agent
For production (ECS):
ECS_CLUSTER=agentos-aws-template-prd
TASK_ARN=$(aws ecs list-tasks --cluster $ECS_CLUSTER --query "taskArns[0]" --output text)

aws ecs execute-command --cluster $ECS_CLUSTER \
  --task $TASK_ARN \
  --container agentos-aws-template-prd-api \
  --interactive \
  --command "python -m agents.knowledge_agent"
Try it:
What is Agno?
How do I create my first agent?
What documents are in your knowledge base?
Update your agent:
from agno.models.anthropic import Claude

my_agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
)
Add the dependency to pyproject.toml and regenerate requirements:
./scripts/generate_requirements.sh
ag infra up --env dev
  1. Edit pyproject.toml
  2. Regenerate requirements: ./scripts/generate_requirements.sh
  3. Rebuild: ag infra up --env dev
To upgrade all libraries:
./scripts/generate_requirements.sh upgrade

Local Development

Run without Docker for faster iteration:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Set up environment
uv venv --python 3.12
source .venv/bin/activate
uv pip install -r requirements.txt

# Start PostgreSQL (required)
docker compose up -d agentos-db

# Run AgentOS
python -m app.main

Environment Variables

VariableRequiredDefaultDescription
OPENAI_API_KEYYesOpenAI API key
PORTNo8000API server port
DB_HOSTNolocalhostDatabase host
DB_PORTNo5432Database port
DB_USERNoaiDatabase user
DB_PASSNoaiDatabase password
DB_DATABASENoaiDatabase name
RUNTIME_ENVNoprdSet to dev for auto-reload
WAIT_FOR_DBNoTrueWait for database before API startup
MIGRATE_DBNoFalseRun Alembic migrations on startup

Troubleshooting

Reconfigure credentials with aws configure, then validate with aws sts get-caller-identity.
RDS can take about 5 minutes to become available. Check status in AWS Console (RDS → Databases).
Check CloudWatch logs for container startup errors, missing environment variables, or database connectivity issues.
The ECS service may still be starting. Wait 2-3 minutes for target health checks to pass.