Skip to main content
The Agent Infra Docker template provides a simple Docker Compose file for running AgentOS locally.

Local environment

Runs both AgentOS and PostgreSQL using Docker. Ideal for development, testing, and verifying your setup before deploying to the cloud.

Production environment

Since this template provides you with a Dockerfile and Docker Compose file, you can easily deploy it to any cloud provider that supports Docker. Or you could deploy it to one of the Hosted Platforms like Railway or Render. For Railway, you can use the Agent Infra Railway template to deploy your AgentOS.

How to get started

  • Clone the template repository and install the dependencies
  • Start with the local setup to ensure everything works end-to-end.
  • Move to the cloud provider of your choice using the provided guides once your local environment is ready.

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
Or, you can clone the repository and follow the instructions in the template documentation.
git clone https://github.com/agno-agi/agent-infra-docker.git
cd agent-infra-docker
After creating your codebase, the next step is to get it up and running locally using docker