Skip to main content
This template deploys AgentOS and PostgreSQL with pgvector to Railway. Automatic HTTPS and public domain included.

What’s Included

ComponentDescription
AgentOSFastAPI server running your AI agents
PostgreSQLDatabase with pgvector for embeddings
Automatic HTTPSRailway handles TLS certificates
Public Domainyour-app.up.railway.app

Prerequisites

You’ll need: Install Railway CLI:
brew install railway

Deploy

Let’s start by creating the project

Create Your Project

1

Set up Python environment

uv venv --python 3.12
source .venv/bin/activate
2

Install Agno

uv pip install -U 'agno[infra]'
3

Create from template

ag infra create --template agentos-railway --name my-agentos
cd my-agentos
4

Set your API key

export OPENAI_API_KEY=sk-***

Included Agents

These agents are ready to use once deployed:

Pal

Personal assistant that learns from you. Stores notes, bookmarks, and research findings.

Knowledge Agent

RAG agent that answers questions from your documents. Pre-loaded with Agno docs.

MCP Agent

Connects to external tools via MCP. Extensible with any MCP-compatible service.

Deploy to Railway

5

Login and deploy

railway login
./scripts/railway_up.sh
This creates the project, provisions PostgreSQL with pgvector, and deploys your AgentOS. Takes ~2 minutes.
6

Get your domain

railway open
Find your URL in the dashboard (e.g., my-agentos.up.railway.app). Navigate to <railway-domain>/docs to see your AgentOS API.

Connect to Control Plane

7

Connect your AgentOS

  1. Go to os.agno.com
  2. Click “Connect OS” → Select “Live”
  3. Paste your Railway domain
AgentOS connection dialog
Your AgentOS is live! Manage it from os.agno.com

Next Steps

Reference

TaskCommand
Deploy updatesrailway up --service agent_os -d
View logsrailway logs --service agent_os
Open dashboardrailway open
Set env variablerailway variables set KEY=value
Stop servicerailway down --service agent_os
Scale replicasEdit railway.json: {"deploy": {"numReplicas": 2}}
Switch modelrailway variables set ANTHROPIC_API_KEY=sk-ant-***

Troubleshooting

Install: brew install railway (Mac) or npm install -g @railway/cli
Run railway init first, then ./scripts/railway_up.sh again.
PostgreSQL takes ~30s. Check: railway logs --service pgvector
Container starting. Wait 1-2 min. Check: railway logs --service agent_os