Deploy a multi-agent system on AWS with ECS Fargate, RDS PostgreSQL, and an application load balancer.
| Agent | Pattern | Description |
|---|---|---|
| Knowledge Agent | Agentic RAG | Answers questions from a knowledge base. |
| MCP Agent | MCP Tool Use | Connects to external services via MCP. |
# Clone the repo
git clone https://github.com/agno-agi/agentos-aws-template.git agentos-aws
cd agentos-aws
# Add OPENAI_API_KEY
cp example.env .env
# Edit .env and add your key
# Start the application
ag infra up --env dev
# Load documents for the knowledge agent
docker exec -it agentos-aws-template-api python -m agents.knowledge_agentConfirm AgentOS is running at http://localhost:8000/docs.
- Open os.agno.com and login
- Add OS → Local →
http://localhost:8000 - Click "Connect"
ag infra down --env devRequires:
- AWS CLI installed and configured
OPENAI_API_KEYset in your environment
ag infra up --env prdSee the full AWS deployment guide for configuring subnets, HTTPS, and connecting to the control plane.
ag infra patch --env prd # Update after changes
ag infra down --env prd # Tear down all resourcesAnswers questions using hybrid search over a vector database (Agentic RAG).
Load documents:
# Local
docker exec -it agentos-aws-template-api python -m agents.knowledge_agent
# AWS
ECS_CLUSTER=agentos-aws-template-prd
TASK_ARN=$(aws ecs list-tasks --cluster $ECS_CLUSTER --query "taskArns[0]" --output text)
aws ecs execute-command --cluster $ECS_CLUSTER \
--task $TASK_ARN \
--container agentos-aws-template \
--interactive \
--command "python -m agents.knowledge_agent"Try it:
What is Agno?
How do I create my first agent?
What documents are in your knowledge base?
Connects to external tools via the Model Context Protocol.
Try it:
What tools do you have access to?
Search the docs for how to use LearningMachine
Find examples of agents with memory
├── agents/ # Agents
│ ├── knowledge_agent.py # Agentic RAG
│ └── mcp_agent.py # MCP Tool Use
├── app/
│ ├── main.py # AgentOS entry point
│ └── config.yaml # Quick prompts config
├── db/
│ ├── session.py # PostgreSQL database helpers
│ └── url.py # Connection URL builder
├── infra/ # AWS infrastructure config
│ ├── settings.py # Region, subnets, image settings
│ ├── dev_resources.py # Docker resources (local)
│ └── prd_resources.py # AWS resources (ECS, RDS, ALB)
├── scripts/ # Helper scripts
├── Dockerfile
├── example.env
└── pyproject.toml # Dependencies
- Create
agents/my_agent.py:
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from db import get_postgres_db
my_agent = Agent(
id="my-agent",
name="My Agent",
model=OpenAIResponses(id="gpt-5.2"),
db=get_postgres_db(),
instructions="You are a helpful assistant.",
)- Register in
app/main.py:
from agents.my_agent import my_agent
agent_os = AgentOS(
name="AgentOS",
agents=[knowledge_agent, mcp_agent, my_agent],
...
)- Restart:
ag infra up --env dev
Agno includes 100+ tool integrations. See the full list.
from agno.tools.slack import SlackTools
from agno.tools.google_calendar import GoogleCalendarTools
my_agent = Agent(
...
tools=[
SlackTools(),
GoogleCalendarTools(),
],
)- Edit
pyproject.toml - Regenerate requirements:
./scripts/generate_requirements.sh - Rebuild:
ag infra up --env dev
- Add your API key to
.env(e.g.,ANTHROPIC_API_KEY) - Update agents to use the new provider:
from agno.models.anthropic import Claude
model=Claude(id="claude-sonnet-4-5")- Add dependency:
anthropicinpyproject.toml
For development without Docker:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Setup environment
./scripts/venv_setup.sh
source .venv/bin/activate| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY |
Yes | - | OpenAI API key |
DB_HOST |
No | localhost |
Database host |
DB_PORT |
No | 5432 |
Database port |
DB_USER |
No | ai |
Database user |
DB_PASS |
No | ai |
Database password |
DB_DATABASE |
No | ai |
Database name |
RUNTIME_ENV |
No | prd |
Set to dev for auto-reload |