Skip to content

Getting Started

What you’ll have in ~10 minutes: a local org of AI agents — coordinated by a single markdown file, visible in a real-time dashboard, with tasks flowing through a hierarchy you define.

OpenSpawn is a coordination layer for AI agents. It is not an agent framework — you keep using whatever you already use (LangGraph, Claude Code, CrewAI, raw API calls). OpenSpawn adds the layer most multi-agent systems are missing: structure.

ORG.md → OpenSpawn parses it → agents spawn → tasks flow through hierarchy → dashboard shows everything

The key idea: One file — ORG.md — defines your entire agent organization. Roles, hierarchy, culture, budget policies, and operating procedures all live in one readable, version-controlled markdown file. The document IS the system.

Q: How is this different from CrewAI / LangGraph / AutoGen?

Those are agent frameworks — they build agents. OpenSpawn is a coordination layer — it organizes agents you already have. Use them together.

Q: Do I need to rewrite my agents?

No. OpenSpawn coordinates existing agents via standard protocols (MCP, A2A).


Required:

  • Node.js 18+ (node --version)
  • Python 3.12+ (python3 --version)
  • uv (uv --version) — Python package manager

Optional:

  • Docker — for production deployment with PostgreSQL (not needed locally)

Terminal window
# Run directly (no install needed)
npx openspawn init
# Or install globally
npm install -g openspawn
openspawn init

The npx openspawn init wizard walks you through 8 steps to scaffold a complete agent organization.

Choose from 11 templates:

General-purpose:

TemplateUse case
assistant-teamChief of staff + specialists (default)
content-agencyContent production pipeline
dev-shopSoftware development team
research-labResearch & analysis team

Industry-specific:

TemplateIndustryUse case
saas-onboardingSaaSCustomer onboarding pipeline
incident-responseDevOpsProduction incident management
contract-reviewLegalContract review and risk analysis
compliance-monitoringFintechTransaction monitoring and reporting
game-live-opsGamingLive operations and player engagement
catalog-managementE-commerceProduct catalog and pricing
clinical-trialsHealthcareClinical trial data processing

Name your organization. Default: “My Agent Team”.

Define your org’s alignment values. The wizard offers 8 values — 5 enabled by default — each injected into agent system prompts (~50 tokens each) to shape decision-making without rigid rules.

ValueDefaultAgent Behavior
OwnershipYesSingle-threaded task ownership; ships or escalates
TransparencyYesEscalate instead of silently failing
MeasurementYesReport outcomes with evidence
SubsidiarityYesSolve at lowest competent level
Continuous ImprovementYesAuto post-mortems, process updates
SpeedNoBias toward action, ship small
RigorNoDepth over speed, verify first
FrugalityNoCheap models for mechanical tasks

Each value draws from established organizational research — Edmondson’s work on psychological safety, Drucker’s management by objectives, Katzenbach & Smith’s team accountability model. Each directive is deliberately short (~50 tokens) so it fits in a system prompt without consuming your context window.

See the Values Framework guide for the full rationale behind each value and how they interact.

Choose how agents communicate and escalate. Default: agency.

PresetEscalationProgress reportsHierarchy depth
agencyImmediateEvery tick3–4 levels
startupImmediateFrequent2–3 levels
professionalBatchedOn milestone3–5 levels
opsImmediateEvery tickStrict chain
enterpriseBatchedOn phase change5–8 levels
researchDelayedOn request2–3 levels
complianceImmediateEvery action4–6 levels

Select the default model for your agents. Default: Anthropic with claude-sonnet-4-20250514. Agents at L7+ automatically get upgraded to claude-opus-4-20250514 for complex reasoning tasks.

Set weekly credit limits. Default: 500 credits/week with an 80% alert threshold and pause-and-escalate on overage.

Choose escalation behavior when agents are blocked or over budget. Default: immediate escalation to the reporting manager.

Configure the coordinator port. Default: 8787. Optionally enable Docker for production deployment.

Skip the wizard entirely with defaults:

Terminal window
# Accept all defaults
npx openspawn init -y
# Pick a template, skip the rest
npx openspawn init -t saas-onboarding -y

After the wizard completes, you’ll have:

my-agent-team/
├── ORG.md # Your org definition (the important one)
├── openspawn.config.json # All wizard answers persisted
├── openclaw-agents.json # Generated agent configs with model assignments
├── .gitignore # node_modules, .env, data/, *.db
└── workspaces/
└── <agent-name>/
├── SOUL.md # Org alignment + identity + role
├── AGENTS.md # Workspace instructions
└── memory/ # Empty, for agent continuity

Preview what the wizard would create without writing anything:

Terminal window
npx openspawn init --dry-run

This prints the agent hierarchy and a sample task routing to stdout.


Terminal window
npx openspawn start

This boots the Python API server (FastAPI) with SQLite locally — no Docker required. The dashboard opens with no login by default (AUTH_MODE=none). The server provides:

  • Dashboard — real-time view of agents, tasks, and events at http://localhost:8787
  • MCP server — tool interface for agents at POST /mcp
  • Agent spawning — Claude Code CLI subprocesses with configurable concurrency cap
  • Background jobs — asyncio scheduler for SLA monitoring, escalation, and status sync

Under the hood, openspawn start invokes uv run uvicorn to launch the FastAPI app. SQLite is used for local persistence — zero external dependencies.

Q: Do I need to set up authentication?

Not for local use. By default, openspawn start runs with AUTH_MODE=none — the dashboard is open and the API accepts all requests. When you’re ready to add protection, set AUTH_MODE=local for a simple password or AUTH_MODE=full for JWT-based auth. See the API reference for details.

Q: Port 8787 is in use?

Terminal window
npx openspawn start --port 9000

Or set it in openspawn.config.json:

{ "port": 9000 }

Locally, openspawn start uses SQLite and an asyncio scheduler — perfect for development. For production, upgrade to PostgreSQL:

Terminal window
npx openspawn init --deploy

This generates a docker-compose.yml alongside your org scaffold:

services:
postgres:
image: pgvector/pgvector:pg16
volumes: [pgdata:/var/lib/postgresql/data]

Start the database, then run the coordinator:

Terminal window
docker compose up -d
npx openspawn start

The coordinator detects DATABASE_URL and connects to PostgreSQL instead of SQLite. The asyncio scheduler handles background jobs in both modes — no Redis required.

SQLite vs PostgreSQL:

ConcernSQLite (local)PostgreSQL (production)
SetupZero configDocker or managed DB
ConcurrencySingle-writerFull MVCC
Persistencedata/openspawn.dbVolume-backed
Memory/pgvecWorksBetter performance
MigrationAutomatic via seederAlembic migrations

Scaffold a new agent organization.

FlagDescription
-t, --template <name>Use a specific template
-y, --yesAccept all defaults
--non-interactiveNo prompts, use defaults (same as -y)
--dry-runPreview output without writing files
--deployInclude docker-compose.yml for production
-p, --port <number>Set coordinator port (default: 8787)
-d, --directory <path>Output directory (default: org name)

Boot the Python API server with agent spawning.

FlagDescription
--port <number>Server port (default: 8787)

All other operations (task management, delegation, escalation, status, budgets) are handled via MCP tools at POST /mcp — agents call them directly through the API.


ORG.md is the source of truth. Add agents, change hierarchy, write playbooks — then restart the coordinator and changes take effect.

Edit openspawn.config.json to change models, ports, or budget policies without touching ORG.md.

Terminal window
npx openspawn init

Running init in an existing directory will prompt you to merge or overwrite. Use this to add new templates or update values.

For the full rationale behind alignment values and how they shape agent behavior, see the Values Framework guide.