Skip to main content
This page gets Starter Template running on your machine with a local Postgres, the Knowledge Agent loaded with the Agno docs, and the MCP Agent connected to the Agno docs MCP.

Prerequisites

1

Clone and configure

git clone https://github.com/agno-agi/agentos-railway-template.git agentos-railway
cd agentos-railway
cp example.env .env
Open .env and set OPENAI_API_KEY. Everything else has sensible defaults.
2

Start AgentOS

docker compose up -d --build
First run pulls the base image, builds the container, and starts Postgres alongside the app. Takes a minute or two. Subsequent starts are instant.
3

Load the Knowledge Agent

docker exec -it agentos-api python -m agents.knowledge_agent
This loads the default documents (Agno Introduction + First Agent) into the pgvector index. Skip this step and the Knowledge Agent has nothing to search.
4

Verify it's running

curl http://localhost:8000/health
Expect {"status":"ok"}. Connection refused means the container is still starting. Check docker compose logs -f agentos-api and wait for the Agno banner.

Connect to AgentOS UI

Open os.agno.com and log in. Click Add OS, choose Local, enter http://localhost:8000, click Connect. Try one prompt against each agent:
“What is Agno?” → Knowledge Agent answers from the loaded RAG corpus.
“How do I create my first agent?” → Knowledge Agent cites the First Agent doc.
“Search the Agno docs for how to use LearningMachine.” → MCP Agent calls the docs MCP.
“What tools do you have access to?” → MCP Agent lists every tool the docs MCP exposes.

What you have now

AgentToolsBacked by
Knowledge Agentsearch_knowledge_base, agentic memorypgvector index seeded with https://docs.agno.com/introduction.md and https://docs.agno.com/first-agent.md
MCP AgentWhatever the docs MCP exposesMCPTools(url="https://docs.agno.com/mcp")
Both agents share the same Postgres for sessions and memory.

Add your own knowledge

Edit agents/knowledge_agent.py and update load_default_documents() to point at your own URLs or files:
def load_default_documents() -> None:
    knowledge.insert(
        name="Your Company Handbook",
        url="https://example.com/handbook.md",
        skip_if_exists=True,
    )
Then re-run the loader:
docker exec -it agentos-api python -m agents.knowledge_agent
The new documents land in the same pgvector index. skip_if_exists=True makes the loader idempotent.

Next

Deploy to Railway →