Skip to content

Swarm

Swarm enables cross-project federation by connecting multiple OAK projects into a unified network. Where Team Sync shares observations between developers and machines on the same project, Swarm connects different projects — enabling agents to search code, query memories, and discover patterns across your entire portfolio.

The OAK Swarm Dashboard

Swarm uses a Cloudflare Worker (similar to the Team relay) as the central registry and query router. Each project registers with the swarm Worker and advertises its capabilities. When a swarm query arrives, the Worker fans it out to all registered projects via HTTP callbacks to each project’s Team daemon.

Each project retains its own local data — code index, sessions, memories. Swarm enables federated queries that fan out to all connected projects and merge results. No data is copied to the swarm Worker; it only routes queries and aggregates responses.

  • Cross-project search — Search for code patterns and memories across all connected projects via swarm_search
  • Full content retrieval — Fetch complete code snippets from search results via swarm_fetch
  • Node discovery — List connected projects and their status via swarm_nodes
  • MCP integration — Swarm tools are available to any MCP-compatible agent alongside the standard Team tools
Terminal window
oak swarm create -n my-swarm

This scaffolds the swarm Worker project and generates authentication tokens.

Terminal window
oak swarm deploy -n my-swarm

Deploys the Worker to your Cloudflare account. Requires the same prerequisites as Team Sync (free Cloudflare account + Node.js v18+).

Terminal window
oak swarm start -n my-swarm

The swarm daemon connects to the deployed Worker and makes this project available for cross-project queries.

In each additional project that should join the swarm, configure the swarm URL and token, then start the swarm daemon.

Terminal window
oak swarm create -n NAME # Create a new swarm configuration
oak swarm deploy -n NAME # Deploy the swarm Worker to Cloudflare
oak swarm destroy -n NAME # Remove the swarm Worker
oak swarm start -n NAME # Start the swarm daemon
oak swarm stop -n NAME # Stop the swarm daemon
oak swarm restart -n NAME # Restart the swarm daemon
oak swarm status -n NAME # Show swarm status and connected nodes
oak swarm mcp # Start the swarm MCP server

When connected to a swarm, additional MCP tools become available to agents:

ToolDescription
swarm_searchSearch across all swarm-connected projects
swarm_fetchFetch full details for items found via swarm_search
swarm_nodesList connected projects and their status
swarm_statusShow swarm connection status

These tools appear alongside the standard Team tools in any MCP-compatible agent. See the MCP Tools Reference for full parameter documentation.

Swarm ships with built-in agents that can run tasks spanning multiple projects:

TaskDescription
Cross-Project ReportAnalyze patterns and insights across all connected projects
Dependency AuditDiscover shared dependencies and version discrepancies
Pattern FinderFind recurring implementation patterns across projects

Run these from the swarm daemon’s web UI, which provides a dashboard with connected nodes, federated search, and agent management.

ComponentRole
Swarm WorkerCloudflare Worker + Durable Object that manages the team registry and routes federated queries
Swarm DaemonPer-project FastAPI process that registers with the Worker and handles incoming federated callbacks
Swarm UIWeb dashboard for managing nodes and searching across projects
Swarm MCP ServerExposes swarm tools to MCP-compatible agents (runs via oak team mcp or oak swarm mcp)