Skip to main content
The Agent Infra Railway template provides a simple Railway project for running AgentOS.

Local environment

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

Production environment

AgentOS is deployed on Railway using the Dockerfile and a PgVector template is used as the database The template automates infrastructure creation and deployment steps using a single script.

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 Railway deployment 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 Railway codebase

Create your codebase using the agent-infra-railway template, give it any name you like.
ag infra create --template agent-infra-railway --name agent-infra-railway
This will create a folder agent-infra-railway with the following structure:
agent-infra-railway          # 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
You can also clone the template directory and follow the instructions in the template documentation.
git clone https://github.com/agno-agi/agent-infra-railway.git cd
agent-infra-railway 
After creating your codebase, the next step is to get it up and running locally using docker