Skip to main content
Once you have built and configured your AgentOS locally, the next step is taking it to production. AgentOS exposes a FastAPI application under the hood, which means you are free to deploy it to any infrastructure you prefer, including container services, serverless architectures, Kubernetes, or a simple virtual machine. The most reliable and convenient way to deploy a FastAPI application to production is with Docker. To make this easy, we provide ready-to-use templates for popular platforms including AWS ECS and Railway with more coming soon. If you prefer complete control, you can also turn your AgentOS into a minimal production repository with just a few files. Here, we’ll walk you through the entire process: starting from a plain Python codebase, converting it into a production-ready FastAPI service, containerizing it with Docker, and deploying it to the platform of your choice.

Preparing your Python project

A minimal AgentOS project usually looks like this:
├── agents/
├── scripts/
├── pyproject.toml
├── requirements.txt
├── Dockerfile
└── app/main.py # Houses your AgentOS app
Your agents, teams and workflows are automatically mounted and ready to serve. As long as they are added to your AgentOS instance.

Adding a production ready Dockerfile

Here is a minimal Dockerfile for deploying AgentOS:
FROM agnohq/python:3.12

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1

WORKDIR /app

COPY requirements.txt pyproject.toml ./
RUN uv pip sync requirements.txt --system

COPY . .

EXPOSE 8000

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

This creates a clean, production-friendly container image.

Testing locally

Build and run the container using the following commands from the root of your project: Prerequisites:
docker buildx build --load -t my-agentos .
docker run -p 8000:8000 my-agentos
Visit http://localhost:8000/docs to see your AgentOS documentation. Here you can see the endpoints for your AgentOS.

Deployment options

You can deploy AgentOS anywhere that supports Docker containers.
To get started quickly, we recommend using one of our deployment templates.
Learn more about them here.

AWS

A production-ready configuration running entirely on AWS:
  • Multi-architecture Docker builds
  • Amazon ECR for container registry
  • ECS Fargate service for running your container
  • Application Load Balancer with HTTPS
  • Amazon RDS (PostgreSQL)
Check out our AWS template for more information.

Cloud providers

AgentOS can run on any cloud provider that supports Docker containers. For example:
  • Google Cloud Run
  • AWS App Runner
  • Azure Container Apps

Railway

A simple and fast deployment method. Railway:
  • Builds your Dockerfile
  • Manages environment variables
  • Provides a public HTTPS domain automatically
Check out our Railway template for more information.

Hosting Platforms

Similar to Railway, you can use other platforms that accept a Dockerfile, manage environment variables, and host your service with minimal configuration.
Templates for these are coming soon:

Next steps

Ready to deploy?
Choose one of our templates to get started quickly and run AgentOS in production with minimal setup.

Explore all Templates

Explore all templates and get started quickly.