The Agent Infra Docker template provides a simple Docker Compose file for running AgentOS. It contains:
  • An AgentOS instance, serving Agents, Teams, Workflows and utilities using FastAPI.
  • A PostgreSQL database for storing sessions, memories and knowledge.

Setup

1

Create and activate a virtual environment

python3 -m venv .venv
source .venv/bin/activate
2

Install Agno

pip install -U "agno[infra]"
3

Install uv and docker

  • Install uv for managing your python environment.
curl -LsSf https://astral.sh/uv/install.sh | sh
4

Export your OpenAI key

export OPENAI_API_KEY=sk-***
Agno is compatible with any model provider; simply update the agents in your project.

Create your Agent Infra Docker codebase

Create your codebase using the agent-infra-docker template, give it any name you like.
ag infra create --template agent-infra-docker --name agent-infra-docker
This will create a folder agent-infra-docker with the following structure:
agent-infra-docker          # Root directory
├── agents                  # Sample Agents
├── teams                   # Sample Teams
├── workflows               # Sample Workflows
├── app                     # AgentOS directory
├── db                      # database tables
├── compose.yml             # docker compose file (With AgentOS instance and PostgreSQL database)
├── Dockerfile              # Dockerfile for the application
├── pyproject.toml          # python project definition
├── requirements.txt        # python dependencies generated by pyproject.toml
├── scripts                 # helper scripts

Run your Agent Infra Docker locally

cd into the agent-infra-docker directory
cd agent-infra-docker
Start your Agent Infra Docker using the following command:
ag infra up
Press Enter to confirm using Docker Compose, and give it a few seconds for the Docker image to download (only the first time). Verify container status and view logs on the Docker dashboard.

Stop Agent Infra Docker

Play around with the AgentOS and stop it using:
ag infra down