---
title: "Deploy Agent Swarm"
description: "Self-hosted Agent Swarm: API, agent-fs, TEI, a lead and two coders"
category: "AI/ML"
url: https://railway.com/deploy/agent-swarm
---

# Deploy Agent Swarm

Self-hosted Agent Swarm: API, agent-fs, TEI, a lead and two coders

**[Deploy Agent Swarm on Railway](https://railway.com/template/agent-swarm)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/agent-swarm/manifest.json

- **Creator:** 2pac's Projects
- **Category:** AI/ML

## Template content

### tei

- **Image:** ghcr.io/huggingface/text-embeddings-inference:cpu-1.9.4

### coder-1

- **Image:** ghcr.io/desplega-ai/agent-swarm-worker:latest

### coder-2

- **Image:** ghcr.io/desplega-ai/agent-swarm-worker:latest

### lead

- **Image:** ghcr.io/desplega-ai/agent-swarm-worker:latest

### api

- **Image:** ghcr.io/desplega-ai/agent-swarm:latest
- **Health check:** /health
- **Public domain:** Yes

### agent-fs

- **Image:** ghcr.io/desplega-ai/agent-fs:0.18.9

## Documentation

# Deploy and Host Agent Swarm on Railway

Agent Swarm runs a team of AI coding agents that you direct from a dashboard. A lead agent plans and delegates work, and coder agents execute it in their own workspaces. This template starts the API, a file store, an embedding server, a lead and two coders.

## About Hosting Agent Swarm

The `api` service holds the task queue, the SQLite database and the dashboard connection, and it is the only service with a public domain. The `agent-fs` service stores files the agents share, and `tei` serves the embeddings that power agent memory. The `lead`, `coder-1` and `coder-2` services run the agents and reach the API over Railway's private network. Each service keeps its data on its own volume.

After the deploy, open `https://app.agent-swarm.dev/setup?apiUrl=https://&amp;apiKey=` once the `api` service is healthy. The domain is on the `api` service's Settings tab, and `API_KEY` is on its Variables tab. Add your Claude, OpenAI or OpenRouter credential on `/setup`. Agents wait until a credential exists.

## Common Use Cases

- Run a self-hosted agent team that works on your repositories around the clock
- Delegate coding, review and research tasks from Slack, GitHub or the dashboard
- Give your agents shared memory and files without running the infrastructure yourself

## Dependencies for Agent Swarm Hosting

- `ghcr.io/desplega-ai/agent-swarm`, `agent-swarm-worker` and `agent-fs` images, plus the Hugging Face text-embeddings-inference image
- A Hobby plan or higher: the worker image is about 8 GB unpacked, and this template uses six volumes
- A Claude, OpenAI or OpenRouter credential, added on `/setup` after the deploy

## Why Deploy Agent Swarm on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Agent Swarm on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/agent-swarm
