TypeScript-native multi-agent orchestration. Three runtime dependencies. open-multi-agent is a multi-agent orchestration framework for TypeScript backends. Give it a goal; a coordinator agent decomposes it into a task DAG, parallelizes independents, and synthesizes the result. Three runtime dependencies, drops into any Node.js backend. Graph-first frameworks make you enumerate every node and edge up front. open-multi-agent is goal-first: you describe the outcome and the coordinator builds the task DAG at runtime, so the orchestration adapts to the goal instead of being hand-wired for one.
From a goal to a task DAG, automatically.
TypeScript-native multi-agent orchestration. Three runtime dependencies.
English · 中文
open-multi-agent is a multi-agent orchestration framework for TypeScript backends. Give it a goal; a coordinator agent decomposes it into a task DAG, parallelizes independents, and synthesizes the result. Three runtime dependencies, drops into any Node.js backend.
Your engineers describe the goal, not the graph.
Graph-first frameworks make you enumerate every node and edge up front. open-multi-agent is goal-first: you describe the outcome and the coordinator builds the task DAG at runtime, so the orchestration adapts to the goal instead of being hand-wired for one.
Quick Start · Three Ways to Run · Features · Orchestration Controls · Ecosystem · Examples · How Is This Different? · Architecture · Supported Providers · Production Checklist · Documentation · Contributing
Requires Node.js >= 18.
npm install @open-multi-agent/core
Migrating from @jackchen_me/open-multi-agent? That package is deprecated; install @open-multi-agent/core instead.
import { OpenMultiAgent, type AgentConfig } from '@open-multi-agent/core'
const agents: AgentConfig[] = [
{ name: 'architect', model: 'claude-sonnet-4-6', systemPrompt: 'Design clean API contracts.', tools: ['file_write'] },
{ name: 'developer', model: 'claude-sonnet-4-6', systemPrompt: 'Implement runnable TypeScript.', tools: ['bash', 'file_read', 'file_write', 'file_edit'] },
{ name: 'reviewer', model: 'claude-sonnet-4-6', systemPrompt: 'Review correctness and security.', tools: ['file_read', 'grep'] },
]
const orchestrator = new OpenMultiAgent({
defaultModel: 'claude-sonnet-4-6',
onProgress: (event) => console.log(event.type, event.task ?? event.agent ?? ''),
})
const team = orchestrator.createTeam('api-team', { name: 'api-team', agents, sharedMemory: true })
// Built-in filesystem tools default to a `<cwd>/.agent-workspace` sandbox.
// Point the agent at an absolute path inside that root.
const result = await orchestrator.runTeam(
team,
`Create a REST API for a todo list in ${process.cwd()}/.agent-workspace/todo-api/`,
)
console.log(result.success, result.totalTokenUsage.output_tokens)
git clone https://github.com/open-multi-agent/open-multi-agent && cd open-multi-agent
npm install
export ANTHROPIC_API_KEY=sk-...
npx tsx examples/basics/team-collaboration.ts
Three agents collaborate on a REST API while onProgress streams the coordinator's task DAG:
agent_start coordinator
task_start design-api
task_complete design-api
task_start implement-handlers
task_start scaffold-tests // independent tasks run in parallel
task_complete scaffold-tests
task_complete implement-handlers
task_start review-code // unblocked after implementation
task_complete review-code
agent_complete coordinator // synthesizes final result
Success: true
Tokens: 12847 output tokens
Local models via Ollama need no API key, see providers/ollama. For hosted providers (OPENAI_API_KEY, GEMINI_API_KEY, etc.), see Supported Providers.
| Mode | Method | When to use | Example |
|---|---|---|---|
| Single agent | runAgent() | One agent, one prompt | basics/single-agent |
| Auto-orchestrated team | runTeam() | Give a goal, let the coordinator plan and execute | basics/team-collaboration |
| Explicit pipeline | runTasks() | You define the task graph and assignments | basics/task-pipeline |
Preview the coordinator's task DAG without executing it, or pin that plan and replay the same graph later without another coordinator call:
// Decompose once and review the plan
const preview = await orchestrator.runTeam(team, goal, { planOnly: true })
// Turn it into a diffable, version-controllable artifact (plain JSON)
const plan = orchestrator.createPlanArtifact(preview)
// Later: replay the exact graph (same task ids, deps, assignees), no coordinator
const result = await orchestrator.runFromPlan(team, plan)
| Capability | What you get |
|---|---|
| Goal-driven coordinator | One runTeam(team, goal) call decomposes the goal into a task DAG, parallelizes independents, and synthesizes the result. Unassigned tasks are auto-scheduled — dependency-first (default), round-robin, least-busy, or capability-match. |
| Mix providers in one team | 12 built-in providers plus any OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, OpenRouter, Groq), mixed freely in one team. Local servers that emit tool calls as plain text are recovered by a fallback parser. (full list · setup) |
| Extended thinking / reasoning | One thinking config maps to Anthropic thinking, Gemini thinkingConfig, and OpenAI reasoning_effort; reasoning is streamed as events, with opt-in preservation across a provider switch. (cross-provider-reasoning) |
| Tools + MCP | 6 built-in (bash, file_*, grep, glob), opt-in delegate_to_agent (cycle + depth guards), custom tools via defineTool() + Zod, stdio MCP servers via connectMCPTools(). (tool config) |
| Streaming + structured output | Token-by-token streaming on every adapter (per-agent during team runs via onAgentStream); Zod-validated final answer with auto-retry on parse failure. (structured-output) |
| Human-in-the-loop | Gate execution with onPlanReady (approve the plan before any agent runs) and onApproval (approve between task rounds), or inspect first with planOnly. |
| Pin and replay plans | Serialize a planOnly decomposition with createPlanArtifact, then runFromPlan replays the exact task graph without re-invoking the coordinator. (patterns/plan-replay) |
| Lifecycle hooks + cancellation | beforeRun rewrites the prompt, afterRun post-processes or rejects the result; pass an AbortSignal to cancel a run in flight. |
| Configurable coordinator | Override the coordinator's model, provider, adapter, system prompt, or tools via runTeam(team, goal, { coordinator }). |
| Observability | onProgress events, onTrace spans, post-run HTML dashboard rendering the executed task DAG. API keys and tokens are redacted from traces, bash output, and the dashboard. (observability guide) |
| Pluggable shared memory | Default in-process KV; swap in Redis / Postgres / your own backend by implementing MemoryStore. (shared memory) |
| Sandboxed filesystem workspace | Built-in filesystem tools are sandboxed to <cwd>/.agent-workspace by default; agents sharing the default configuration share this root. For per-agent isolation, set AgentConfig.cwd; for a different shared root, set OrchestratorConfig.defaultCwd; pass null to disable. (sandbox config) |
Production controls (context strategies, task retry with backoff, loop detection, tool output truncation/compression) are covered in the Production Checklist.
Fine-grained control over a runTeam run. All optional; defaults keep behavior unchanged.
Inject team context. Prepend the goal, roster, and this worker's role to every worker prompt — helps workers stay aligned and makes multi-step runs easier to debug. Off by default; worker prompts stay byte-identical when omitted.
await orchestrator.runTeam(team, goal, { revealCoordinator: true })
Approve before running. Inspect the coordinator's plan before any agent executes, and again between task rounds. These live on the orchestrator. Returning false aborts; remaining tasks are marked skipped.
const orchestrator = new OpenMultiAgent({
onPlanReady: async (tasks) => tasks.length <= 10, // gate the whole plan
onApproval: async (completed, next) => next.length > 0, // gate each round
})
Cancel a run. Pass an AbortSignal; aborting stops the run in flight.
const controller = new AbortController()
const run = orchestrator.runTeam(team, goal, { abortSignal: controller.signal })
// controller.abort() from elsewhere to cancel
Configure the coordinator. Give the planner its own model, adapter, or extra instructions without touching the worker agents.
await orchestrator.runTeam(team, goal, {
coordinator: { model: 'claude-opus-4-6', instructions: 'Prefer fewer, larger tasks.' },
})
Fan-out without dependencies. For MapReduce-style parallelism, use AgentPool.runParallel() directly. See patterns/fan-out-aggregate.
Shell & CI. Use the JSON-first oma binary. See docs/cli.md.
open-multi-agent launched 2026-04-01 under MIT. Known users and integrations to date:
bash, file_*, grep) directly inside a Docker runtime. Confirmed production use.Using open-multi-agent in production or a side project? Open a discussion and we will list it here.
Built an integration? See the integration guide for how to submit a reference or vendor example and get your product listed.
Limited-time provider offers for open-multi-agent users. Listings are not paid endorsements.
For products and platforms with a deep open-multi-agent integration. See the Featured partner program for terms and how to apply.
examples/ is organized by category: basics, cookbook, patterns, providers, and integrations. See examples/README.md for the full index. (production/ is open for contributions — see the acceptance criteria.)
cookbook/)End-to-end scenarios you can run today. Each one is a complete, opinionated workflow.
contract-review-dag: four-task DAG for contract review with parallel branches and step-level retry on failure.meeting-summarizer: three specialised agents fan out on a transcript, an aggregator merges them into one Markdown report with action items and sentiment.competitive-monitoring: three parallel source agents extract claims from feeds; an aggregator cross-checks them and flags contradictions.translation-backtranslation: translate EN to target with one provider, back-translate with another, flag semantic drift.incident-postmortem-dag: three independent root tasks fan out at t=0, then a root-cause hypothesizer and postmortem writer synthesize them into one document.personalized-interview-simulator: a stateful interviewer (Agent.prompt() across turns) plus a transcript-reading observer, with readline human input and a Zod-validated debrief.basics/team-collaboration: runTeam() coordinator pattern.patterns/structured-output: any agent returns Zod-validated JSON.patterns/multi-perspective-code-review: a generator feeds security, performance, and style reviewers running in parallel, then a synthesizer returns Zod-validated findings.patterns/cross-provider-reasoning: preserve a reasoning model's thought stream across a provider switch via preserveReasoningAsText.patterns/cost-tiered-pipeline: assign a different model per stage and estimate per-model USD cost from onTrace token counts.patterns/fan-out-aggregate: MapReduce-style fan-out via AgentPool.runParallel().patterns/agent-handoff: synchronous sub-agent delegation via delegate_to_agent.patterns/plan-replay: decompose a goal once with planOnly, serialize it with createPlanArtifact, then replay the same DAG via runFromPlan without re-running the coordinator.integrations/trace-observability: onTrace spans for LLM calls, tools, and tasks.integrations/mcp-github: expose an MCP server's tools to an agent via connectMCPTools().integrations/with-vercel-ai-sdk: Next.js app combining OMA runTeam() with AI SDK useChat streaming.examples/providers/ covering hosted providers, OpenAI-compatible endpoints, and local models.Run any script with npx tsx examples/<path>.ts.
A quick router. Mechanism breakdown follows.
| If you need | Pick |
|---|---|
| Fixed production topology with mature checkpointing | LangGraph JS |
| Explicit Supervisor + hand-wired workflows | Mastra |
| Python stack with mature multi-agent ecosystem | CrewAI |
| AI app toolkit with broad model-provider support | Vercel AI SDK |
| TypeScript, goal to result with auto task decomposition | open-multi-agent |
vs. LangGraph JS. LangGraph compiles a declarative graph (nodes, edges, conditional routing) into an invokable. open-multi-agent runs a Coordinator that decomposes the goal into a task DAG at runtime, then auto-parallelizes independents. Same end (orchestrated execution), opposite directions: LangGraph is graph-first, OMA is goal-first.
vs. Mastra. Both are TypeScript-native. Mastra's Supervisor pattern requires you to wire agents and workflows by hand; OMA's Coordinator does the wiring at runtime from the goal string. If the workflow is known up front, Mastra's explicitness pays off. If you'd rather not enumerate every step, OMA's runTeam(team, goal) is one call.
vs. CrewAI. CrewAI is the mature multi-agent option in Python. OMA targets TypeScript backends with three runtime dependencies and direct Node.js embedding. Roughly comparable orchestration surface; the choice is the language stack.
vs. Vercel AI SDK. AI SDK provides the LLM-call layer — provider abstraction, streaming, tool calls, and structured outputs. It does not orchestrate goal-driven multi-agent teams. The two are complementary: AI SDK for app surfaces and single-agent calls, OMA when you need a team.
┌─────────────────────────────────────────────────────────────────┐
│ OpenMultiAgent (Orchestrator) │
│ │
│ createTeam() runTeam() runTasks() runAgent() getStatus() │
└──────────────────────┬──────────────────────────────────────────┘
│
┌──────────▼──────────┐
│ Team │
│ - AgentConfig[] │
│ - MessageBus │
│ - TaskQueue │
│ - SharedMemory │
└──────────┬──────────┘
│
┌─────────────┴─────────────┐
│ │
┌────────▼──────────┐ ┌───────────▼───────────┐
│ AgentPool │ │ TaskQueue │
│ - Semaphore │ │ - dependency graph │
│ - runParallel() │ │ - auto unblock │
└────────┬──────────┘ │ - cascade failure │
│ └───────────────────────┘
┌────────▼──────────┐
│ Agent │
│ - run() │ ┌────────────────────────┐
│ - prompt() │───►│ LLMAdapter │
│ - stream() │ │ - 12 built-in │
└────────┬──────────┘ │ providers │
│ │ - OpenAI-compatible │
│ │ - AI SDK bridge │
│ └────────────────────────┘
┌────────▼──────────┐
│ AgentRunner │ ┌──────────────────────┐
│ - conversation │───►│ ToolRegistry │
│ loop │ │ - defineTool() │
│ - tool dispatch │ │ - 6 built-in tools │
└───────────────────┘ │ + delegate (opt-in) │
└──────────────────────┘
Change provider, model, and set the env var. The agent config shape stays the same.
const agent: AgentConfig = {
name: 'my-agent',
provider: 'anthropic',
model: 'claude-sonnet-4-6',
systemPrompt: 'You are a helpful assistant.',
}
| Kind | How to configure | Services |
|---|---|---|
| Built-in shortcuts | Set provider to anthropic, gemini, openai, azure-openai, copilot, grok, deepseek, doubao, hunyuan, minimax, mimo, qiniu, or bedrock; the framework supplies the endpoint. | Anthropic, Gemini, OpenAI, Azure OpenAI, GitHub Copilot, xAI Grok, DeepSeek, Doubao (Volcengine), Hunyuan (Tencent MaaS), MiniMax, MiMo, Qiniu, AWS Bedrock |
| OpenAI-compatible endpoints | Set provider: 'openai' plus baseURL and, when needed, apiKey. | Ollama, vLLM, LM Studio, llama.cpp server, OpenRouter, Groq, Mistral, Moonshot (Kimi), Qwen, Zhipu |
| Vercel AI SDK | Import AISdkAdapter from @open-multi-agent/core/ai-sdk; install optional peer ai plus an @ai-sdk/* provider. | Any AI SDK provider (60+ models and hosts) |
See docs/providers.md for env vars, model examples, local tool-calling, timeouts, and troubleshooting.
Install the optional peer ai plus any @ai-sdk provider you need (for example @ai-sdk/openai). Pass adapter: new AISdkAdapter(model) on AgentConfig to route that agent through the AI SDK instead of the built-in provider factory. provider, apiKey, baseURL, and region are ignored when adapter is set. Mixed teams work as usual: only agents with adapter use the AI SDK.
import { openai } from '@ai-sdk/openai'
import { AISdkAdapter } from '@open-multi-agent/core/ai-sdk'
import { OpenMultiAgent } from '@open-multi-agent/core'
const oma = new OpenMultiAgent()
await oma.runAgent(
{
name: 'researcher',
model: 'gpt-4o',
adapter: new AISdkAdapter(openai('gpt-4o')),
systemPrompt: 'You are a researcher.',
},
'What are the latest AI trends?',
)
The coordinator accepts the same hook via runTeam(team, goal, { coordinator: { adapter: new AISdkAdapter(...) } }).
Before going live, wire up the controls that protect token spend, recover from failure, and let you debug.
| Concern | Knob | Where it lives |
|---|---|---|
| Bound the conversation | maxTurns per agent + contextStrategy (sliding-window / summarize / compact / custom) | AgentConfig |
| Bound wall-clock time | timeoutMs per agent (aborts a run that hangs, common with local models) | AgentConfig |
| Cap tool output | maxToolOutputChars (or per-tool maxOutputChars) + compressToolResults: true | AgentConfig and defineTool() |
| Recover from failure | Per-task maxRetries, retryDelayMs, retryBackoff (exponential multiplier) | Task config used via runTasks() |
| Hard-cap spend | maxTokenBudget on the orchestrator | OrchestratorConfig |
| Catch stuck agents | loopDetection with onLoopDetected: 'terminate' (or a custom handler) | AgentConfig |
| Trace and audit | onTrace to your tracing backend; persist renderTeamRunDashboard(result) | OrchestratorConfig |
| Redact secrets | Automatic — API keys, tokens, and Authorization headers stripped from traces, bash output, and dashboard payloads | built-in (on by default) |
| Bound filesystem reach | cwd / defaultCwd (default .agent-workspace subdir; widen with process.cwd(), disable with null) | AgentConfig / OrchestratorConfig |
onProgress events, onTrace spans, and the post-run dashboard.MemoryStore backends.oma binary for shell and CI.Issues, feature requests, and PRs are welcome. Some areas where contributions would be especially valuable:
examples/production/README.md for the acceptance criteria and submission format.Framework features
Provider integrations
Examples & cookbook
Docs & tests
MIT
“What are you building with open-multi-agent? — What are you building with OMA? Stuck on something? Just drop a comment — no format, no template.”
“Pre-action authority receipts for MCP multi-agent DAGs — I am testing an authority-before-action receipt pattern for MCP-backed multi-agent task DAGs. The gap I am looking at is narrow: before an agent executes a consequ…”
“Optional agentIdentity config for runTeam() — verifiable agent trust — Why now? open-multi-agent is 19 days old. The `runTeam()` API contract is still being shaped. This is the exact moment to sketch an optional identity…”
“Welcome to open-multi-agent Discussions! — 👋 Welcome! We’re using Discussions as a place to connect with other members of our community. We hope that you: * Ask questions you’re wondering about. * Share ideas. *…”
“Heads-up: per-agent fs sandbox in the next OMA release — PR #264 in open-multi-agent lands a per-agent filesystem sandbox that's default on. Once you bump to a release that includes it, every built-in fs tool call (file_…”
“Linux Foundation Welcomes the AGNTCY Project to Standardize Open Multi-Agent System Infrastructure and Break Down AI Agent Silos - Linux Foundation — Linux Foundation”
“Tsinghua Makes a Major Open Source Release! OpenMAIC Creates an AI Multi-Agent Virtual Classroom - AIBase — AIBase”
“Reimagining AI-Native Education Through Multi-Agent Interactive Classroom on AMD ROCm - AMD — AMD”
AI
Companies use AI to filter candidates. I just gave candidates AI to choose companies. Career-Ops (career-ops.org, also known as careerops) turns any AI coding CLI into a full job search command center. Instead of manually tracking applications in a spreadsheet, you get an AI-powered pipeline that: Career-ops is agentic: Claude Code navigates career pages with Playwright, evaluates fit by reasoning about your CV vs the job description (not keyword matching), and adapts your resume per listing.
AI
CLI-Anything: Bridging the Gap Between AI Agents and the World's Software 🌐 CLI-Hub: pip install cli-anything-hub then cli-hub install — browse, install, and manage all community-built CLIs. Want to add your own? Open a PR — the hub updates instantly. 🎬 See Demos: Watch AI agents use generated CLIs plus preview, live preview, and trajectory loops to produce real artifacts — CAD builds, 3D scenes, diagrams, gameplay, subtitles, and more.
AI
A self-hosted AI workspace -- meant to be the self-hosted version of the UI experience you get from ChatGPT and Claude. But with more jank and fun. Running on your own hardware, with your own data -- local-first, privacy-first, and no trojan. A full, hover-to-play tour lives on the landing page (docs/index.html). Defaults work out of the box: clone, run, then configure models/search/email inside Settings. Only edit .env for deployment-level overrides like APPBIND, APPPORT, AUTHENABLED, DATABASEURL, or a pre-seeded admin password.
AI
Most AI material teaches in scattered pieces. A paper here, a fine-tuning post there, a flashy agent demo somewhere else. The pieces rarely line up. You ship a chatbot but can't explain its loss curve. You hook a function to an agent but can't say what attention does inside the model that's calling it. This curriculum is the spine. 20 phases, 503 lessons, four languages: Python, TypeScript, Rust, Julia. Linear algebra at one end, autonomous swarms at the other. Every algorithm gets built from raw math first. Backprop. Tokenizer. Attention. Agent loop. By the time PyTorch shows up, you already know what it's doing under the hood. Each lesson runs the same loop: read the problem, derive the math, write the code, run the test, keep the artifact. No five-minute videos, no copy-paste deploys,