Skip to main content
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
After creating your codebase, the next step is to get it up and running locally using docker