Skip to main content
Local development uses Docker Compose. Resources are defined in infra/dev_resources.py.

Start Local Environment

ag infra up
This starts:
  • PostgreSQL database (port 5432)
  • AgentOS API (port 8000)
Access points:

View Logs

docker logs -f ai-api
Expected startup output:
INFO:     Started server process [1]
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000

Building Custom Images

By default, the dev environment uses pre-built agno images. To build your own:

1. Update Settings

infra/settings.py
infra_settings = InfraSettings(
    ...
    image_repo="local",
    build_images=True,
)

2. Build the Image

ag infra up dev:docker -t image
Force rebuild (no cache):
ag infra up dev:docker -t image -f

Common Operations

TaskCommand
Start allag infra up
Stop allag infra down
Restart containersag infra restart dev:docker -t container
Rebuild everythingag infra up dev:docker -f
View API logsdocker logs -f ai-api
View DB logsdocker logs -f ai-db

Target Types

The -t flag filters what to create:
TargetCreates
(none)Everything
imageDocker image only
containerContainers only

Troubleshooting

IssueSolution
Port 8000 in useStop other services: docker ps then docker stop <container>
Port 5432 in useStop local PostgreSQL: brew services stop postgresql
Database errorsRestart: ag infra down && ag infra up
Old image cachedForce rebuild: ag infra up dev:docker -t image -f