Skip to main content
This template deploys AgentOS and PostgreSQL to Railway. It includes example agents ready to use after deployment, automatic HTTPS, and a public domain.

Prerequisites

Development

Run locally before deploying to Railway.
1

Clone the template

git clone \
  https://github.com/agno-agi/agentos-railway-template.git \
  agentos

cd agentos
The template includes the following agents:
AgentDescription
Knowledge AgentAnswers questions from your documents using Agentic RAG.
MCP AgentConnects to external tools via Model Context Protocol.
2

Set your API key

cp example.env .env
Edit .env and add your OPENAI_API_KEY.
3

Start AgentOS

docker compose up -d --build
4

Load knowledge

docker exec -it agentos-api python -m agents.knowledge_agent
This loads the default documents into the Knowledge Agent’s vector database. You can add your own documents as needed.
5

Confirm it's running

Navigate to localhost:8000/docs to see your AgentOS API.
6

Connect to the control plane

  1. Go to os.agno.com
  2. Click Connect OS → Select Local
  3. Enter http://localhost:8000
Your AgentOS is running locally.

Production

Deploy to Railway when you’re ready to go live.

Prerequisites

1

Login to Railway

railway login
2

Deploy

./scripts/railway_up.sh
Takes ~2 minutes. The script creates your Railway project, provisions PostgreSQL with pgvector, and deploys AgentOS.
3

Load knowledge

railway run python -m agents.knowledge_agent
4

Get your domain

railway open
Find your URL in the Railway dashboard (e.g., my-agentos.up.railway.app). Navigate to <your-domain>/docs to confirm the API is running.
5

Connect to the control plane

  1. Go to os.agno.com
  2. Click Connect OS → Select Live
  3. Paste your Railway domain
AgentOS connection dialog
Your AgentOS is live on Railway.

Next Steps

Add apps

Browse agents, teams, and workflows for your deployment.

Connect interfaces

Expose your agents on Slack, Discord, WhatsApp, or MCP.