AgentSwarm runs as a Docker-based stack, so the local development environment mirrors production closely. The setup process clones the repository, initialises Docker services (nginx, server, web, Postgres, Redis), builds the agent runtime images, and installs Node.js dependencies — after which a single command starts the full stack with hot reload for both the server and the web app.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coretracker/agentswarm/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following tools are installed and available on yourPATH:
Docker & Docker Compose
Required for the main app stack and all agent runtime containers. Both
docker compose (v2) and docker-compose (v1) are supported.Node.js 20+ and npm
Required for local development, checks, tests, and builds. Install via nodejs.org or a version manager such as
nvm.Python 3
Required when installing npm dependencies locally because native modules such as
node-pty may build from source via node-gyp.Bash
Required by the helper and harness scripts in
scripts/harness/ and by agentswarm.sh.Initial Setup
Run the harness setup script
The setup script initialises the Docker stack, builds runtime images, creates the What happens under the hood:If you only need the Docker services and do not plan to run local checks or tests, you can omit the flag:
local-plans/ and task-workspaces/ folders, and — when the flag below is set — installs all npm dependencies:- Creates
.envfrom.env.exampleif the file is missing. - Ensures runtime folders (
local-plans/,task-workspaces/) exist. - Runs
./agentswarm.sh initto build and start the required containers. - Runs
npm ci --include=devto install all workspace dependencies (becauseHARNESS_INSTALL_NPM_DEPS=1is set).
Install npm dependencies before running
check.sh, test.sh, or pr-ready.sh. Those scripts require a populated node_modules/ tree.Copy the environment file
If the setup script has not already created Key variables to review:
.env for you, copy the example file manually and review the values:| Variable | Default | Notes |
|---|---|---|
PUBLIC_PORT | 3217 | Port exposed by the nginx reverse proxy. |
DEFAULT_ADMIN_EMAIL | admin@agentswarm.local | Bootstrap admin email (first-boot only). |
DEFAULT_ADMIN_PASSWORD | see .env.example | Bootstrap admin password (first-boot only). |
DATABASE_URL | see .env.example | Postgres connection string. |
REDIS_HOST_PORT | 6379 | Host port for the Redis container. |
POSTGRES_HOST_PORT | 5432 | Host port for the Postgres container. |
Start the development stack
Run the server and web dev processes together with hot reload:This uses
concurrently to run both @agentswarm/server (via tsx watch) and @agentswarm/web (via Next.js dev server) in parallel.Alternatively, start the full Docker stack (including nginx, Postgres, and Redis) and wait for the health check to pass:Running Services Individually
You can start the server or web app in isolation using npm workspace commands:Verifying the Setup
Once the stack is running, confirm that everything is healthy:.env file (defaults from .env.example are admin@agentswarm.local and the password defined there).
Database Reset
If your local data becomes stale or inconsistent — for example after switching branches or if bootstrap credentials are no longer working — you can wipe and recreate the Postgres and Redis volumes:.env.
Doctor Script
The doctor script verifies that all required tools are installed and that the harness scripts are available. Run it first whenever setup fails unexpectedly:docker, docker compose, node, npm, python3, bash, and the presence of the harness scripts themselves. Any missing dependency is reported with a clear message.
Port conflicts
Port conflicts
If local ports are already in use, override the defaults in Or edit the values directly in
.env before running setup:.env and re-run ./scripts/harness/start.sh.npm ci fails with node-gyp errors
npm ci fails with node-gyp errors
The
node-pty package builds a native module from source using node-gyp, which requires Python 3. If npm ci fails with a message like Could not find any Python installation to use, install Python 3 and retry: