[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74775":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":46,"readmeContent":47,"aiSummary":48,"trendingCount":15,"starSnapshotCount":15,"syncStatus":49,"lastSyncTime":50,"discoverSource":51},74775,"open-multi-agent","open-multi-agent\u002Fopen-multi-agent","From a goal to a task DAG, automatically. TypeScript-native multi-agent orchestration.","https:\u002F\u002Fopen-multi-agent.com",null,"TypeScript",6353,2388,61,5,0,23,58,254,69,41,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"agent-framework","ai-agents","anthropic","claude","deepseek","gemini","grok","llm","local-llm","mcp","model-agnostic","multi-agent","nodejs","ollama","openai","orchestration","structured-output","task-scheduling","tool-use","typescript","2026-06-12 02:03:28","\u003Cbr \u002F>\n\n\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fmain\u002F.github\u002Fbrand\u002Flogo-mark-dark.svg\">\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fmain\u002F.github\u002Fbrand\u002Flogo-mark-light.svg\">\n    \u003Cimg alt=\"Open Multi-Agent\" src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fmain\u002F.github\u002Fbrand\u002Flogo-mark-light.svg\" width=\"96\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\n\u003Ch1 align=\"center\">Open Multi-Agent\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>From a goal to a task DAG, automatically.\u003C\u002Fstrong>\u003Cbr\u002F>\n  TypeScript-native multi-agent orchestration. Three runtime dependencies.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@open-multi-agent\u002Fcore\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@open-multi-agent\u002Fcore\" alt=\"npm version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Factions\u002Fworkflows\u002Fci.yml\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\".\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green\" alt=\"MIT License\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.typescriptlang.org\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-5.6-blue\" alt=\"TypeScript\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fopen-multi-agent\u002Fopen-multi-agent\">\u003Cimg src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fgraph\u002Fbadge.svg\" alt=\"codecov\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fblob\u002Fmain\u002Fpackage.json\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime_deps-3-brightgreen\" alt=\"runtime deps\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fstargazers\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fopen-multi-agent\u002Fopen-multi-agent\" alt=\"GitHub stars\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fnetwork\u002Fmembers\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fopen-multi-agent\u002Fopen-multi-agent\" alt=\"GitHub forks\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fmain\u002F.github\u002Fbrand\u002Fdemo-dashboard-hero.gif\" alt=\"Post-run dashboard replaying a completed team run: task DAG with per-node assignee, status, token breakdown, and agent output log\" width=\"960\" height=\"456\" loading=\"eager\">\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>English\u003C\u002Fstrong> · \u003Ca href=\".\u002FREADME_zh.md\">中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cbr \u002F>\n\n`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.\n\n> **Package update:** the official npm package is now `@open-multi-agent\u002Fcore`.\n> The previous package, `@jackchen_me\u002Fopen-multi-agent`, remains supported during the migration window.\n\n> **Your engineers describe the goal, not the graph.**\n\n## Quick Start\n\nRequires Node.js >= 18.\n\n### Use it in your project\n\n```bash\nnpm install @open-multi-agent\u002Fcore\n```\n\n```typescript\nimport { OpenMultiAgent, type AgentConfig } from '@open-multi-agent\u002Fcore'\n\nconst agents: AgentConfig[] = [\n  { name: 'architect', model: 'claude-sonnet-4-6', systemPrompt: 'Design clean API contracts.', tools: ['file_write'] },\n  { name: 'developer', model: 'claude-sonnet-4-6', systemPrompt: 'Implement runnable TypeScript.', tools: ['bash', 'file_read', 'file_write', 'file_edit'] },\n  { name: 'reviewer', model: 'claude-sonnet-4-6', systemPrompt: 'Review correctness and security.', tools: ['file_read', 'grep'] },\n]\n\nconst orchestrator = new OpenMultiAgent({\n  defaultModel: 'claude-sonnet-4-6',\n  onProgress: (event) => console.log(event.type, event.task ?? event.agent ?? ''),\n})\n\nconst team = orchestrator.createTeam('api-team', { name: 'api-team', agents, sharedMemory: true })\nconst result = await orchestrator.runTeam(team, 'Create a REST API for a todo list in \u002Ftmp\u002Ftodo-api\u002F')\n\nconsole.log(result.success, result.totalTokenUsage.output_tokens)\n```\n\n### Run an example locally\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent && cd open-multi-agent\nnpm install\nexport ANTHROPIC_API_KEY=sk-...\nnpx tsx examples\u002Fbasics\u002Fteam-collaboration.ts\n```\n\nThree agents collaborate on a REST API while `onProgress` streams the coordinator's task DAG:\n\n```\nagent_start coordinator\ntask_start design-api\ntask_complete design-api\ntask_start implement-handlers\ntask_start scaffold-tests         \u002F\u002F independent tasks run in parallel\ntask_complete scaffold-tests\ntask_complete implement-handlers\ntask_start review-code            \u002F\u002F unblocked after implementation\ntask_complete review-code\nagent_complete coordinator        \u002F\u002F synthesizes final result\nSuccess: true\nTokens: 12847 output tokens\n```\n\nLocal models via Ollama need no API key, see [`providers\u002Follama`](examples\u002Fproviders\u002Follama.ts). For hosted providers (`OPENAI_API_KEY`, `GEMINI_API_KEY`, etc.), see [Supported Providers](#supported-providers).\n\n### Three Ways to Run\n\n| Mode | Method | When to use | Example |\n|------|--------|-------------|---------|\n| Single agent | `runAgent()` | One agent, one prompt | [`basics\u002Fsingle-agent`](examples\u002Fbasics\u002Fsingle-agent.ts) |\n| Auto-orchestrated team | `runTeam()` | Give a goal, let the coordinator plan and execute | [`basics\u002Fteam-collaboration`](examples\u002Fbasics\u002Fteam-collaboration.ts) |\n| Explicit pipeline | `runTasks()` | You define the task graph and assignments | [`basics\u002Ftask-pipeline`](examples\u002Fbasics\u002Ftask-pipeline.ts) |\n\nPreview the coordinator's task DAG without executing agents:\n\n```ts\nconst plan = await orchestrator.runTeam(team, goal, { planOnly: true })\n```\n\nFor MapReduce-style fan-out without task dependencies, use `AgentPool.runParallel()` directly. See [`patterns\u002Ffan-out-aggregate`](examples\u002Fpatterns\u002Ffan-out-aggregate.ts).\n\nFor shell and CI, use the JSON-first `oma` binary. See [docs\u002Fcli.md](.\u002Fdocs\u002Fcli.md).\n\n## Features\n\n| Capability | What you get |\n|------------|--------------|\n| **Goal-driven coordinator** | One `runTeam(team, goal)` call. The coordinator decomposes the goal into a task DAG, parallelizes independents, and synthesizes the result. |\n| **Mix providers in one team** | 10 built-in: Anthropic, OpenAI, Azure, Bedrock, Gemini, Grok, DeepSeek, MiniMax, Qiniu, Copilot. Ollama \u002F vLLM \u002F LM Studio \u002F OpenRouter \u002F Groq via OpenAI-compatible. ([full setup](.\u002Fdocs\u002Fproviders.md)) |\n| **Tools + MCP** | 6 built-in (`bash`, `file_*`, `grep`, `glob`), opt-in `delegate_to_agent`, custom tools via `defineTool()` + Zod, stdio MCP servers via `connectMCPTools()`. ([tool config](.\u002Fdocs\u002Ftool-configuration.md)) |\n| **Streaming + structured output** | Token-by-token streaming on every adapter; Zod-validated final answer with auto-retry on parse failure. ([`structured-output`](examples\u002Fpatterns\u002Fstructured-output.ts)) |\n| **Observability** | `onProgress` events, `onTrace` spans, post-run HTML dashboard rendering the executed task DAG. ([observability guide](.\u002Fdocs\u002Fobservability.md)) |\n| **Pluggable shared memory** | Default in-process KV; swap in Redis \u002F Postgres \u002F your own backend by implementing `MemoryStore`. ([shared memory](.\u002Fdocs\u002Fshared-memory.md)) |\n\nProduction controls (context strategies, task retry with backoff, loop detection, tool output truncation\u002Fcompression) are covered in the [Production Checklist](#production-checklist).\n\n## Examples\n\n[`examples\u002F`](.\u002Fexamples\u002F) is organized by category: basics, cookbook, patterns, providers, integrations, and production. See [`examples\u002FREADME.md`](.\u002Fexamples\u002FREADME.md) for the full index.\n\n### Real-world workflows ([`cookbook\u002F`](.\u002Fexamples\u002Fcookbook\u002F))\n\nEnd-to-end scenarios you can run today. Each one is a complete, opinionated workflow.\n\n- [`contract-review-dag`](examples\u002Fcookbook\u002Fcontract-review-dag.ts): four-task DAG for contract review with parallel branches and step-level retry on failure.\n- [`meeting-summarizer`](examples\u002Fcookbook\u002Fmeeting-summarizer.ts): three specialised agents fan out on a transcript, an aggregator merges them into one Markdown report with action items and sentiment.\n- [`competitive-monitoring`](examples\u002Fcookbook\u002Fcompetitive-monitoring.ts): three parallel source agents extract claims from feeds; an aggregator cross-checks them and flags contradictions.\n- [`translation-backtranslation`](examples\u002Fcookbook\u002Ftranslation-backtranslation.ts): translate EN to target with one provider, back-translate with another, flag semantic drift.\n\n### Patterns and integrations\n\n- [`basics\u002Fteam-collaboration`](examples\u002Fbasics\u002Fteam-collaboration.ts): `runTeam()` coordinator pattern.\n- [`patterns\u002Fstructured-output`](examples\u002Fpatterns\u002Fstructured-output.ts): any agent returns Zod-validated JSON.\n- [`patterns\u002Ffan-out-aggregate`](examples\u002Fpatterns\u002Ffan-out-aggregate.ts): MapReduce-style fan-out via `AgentPool.runParallel()`.\n- [`patterns\u002Fagent-handoff`](examples\u002Fpatterns\u002Fagent-handoff.ts): synchronous sub-agent delegation via `delegate_to_agent`.\n- [`integrations\u002Ftrace-observability`](examples\u002Fintegrations\u002Ftrace-observability.ts): `onTrace` spans for LLM calls, tools, and tasks.\n- [`integrations\u002Fmcp-github`](examples\u002Fintegrations\u002Fmcp-github.ts): expose an MCP server's tools to an agent via `connectMCPTools()`.\n- [`integrations\u002Fwith-vercel-ai-sdk`](examples\u002Fintegrations\u002Fwith-vercel-ai-sdk\u002F): Next.js app combining OMA `runTeam()` with AI SDK `useChat` streaming.\n- **Provider examples**: scripts under [`examples\u002Fproviders\u002F`](examples\u002Fproviders\u002F) covering hosted providers, OpenAI-compatible endpoints, and local models.\n\nRun any script with `npx tsx examples\u002F\u003Cpath>.ts`.\n\n## How is this different from X?\n\nA quick router. Mechanism breakdown follows.\n\n| If you need | Pick |\n|-------------|------|\n| Fixed production topology with mature checkpointing | LangGraph JS |\n| Explicit Supervisor + hand-wired workflows | Mastra |\n| Python stack with mature multi-agent ecosystem | CrewAI |\n| AI app toolkit with broad model-provider support | Vercel AI SDK |\n| **TypeScript, goal to result with auto task decomposition** | **open-multi-agent** |\n\n**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.\n\n**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.\n\n**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.\n\n**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.\n\n## Ecosystem\n\n`open-multi-agent` launched 2026-04-01 under MIT. Known users and integrations to date:\n\n### In production\n\n- **[temodar-agent](https:\u002F\u002Fgithub.com\u002Fxeloxa\u002Ftemodar-agent)** (~60 stars). WordPress security analysis platform by [Ali Sünbül](https:\u002F\u002Fgithub.com\u002Fxeloxa). Uses our built-in tools (`bash`, `file_*`, `grep`) directly inside a Docker runtime. Confirmed production use.\n- **Cybersecurity SOC (home lab).** A private setup running Qwen 2.5 + DeepSeek Coder entirely offline via Ollama, building an autonomous SOC pipeline on Wazuh + Proxmox. Early user, not yet public.\n\nUsing `open-multi-agent` in production or a side project? [Open a discussion](https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fdiscussions) and we will list it here.\n\n### Integrations\n\n- **[Engram](https:\u002F\u002Fwww.engram-memory.com)** — \"Git for AI memory.\" Syncs knowledge across agents instantly and flags conflicts. ([repo](https:\u002F\u002Fgithub.com\u002FAgentscreator\u002Fengram-memory))\n- **[@agentsonar\u002Foma](https:\u002F\u002Fgithub.com\u002Fagentsonar\u002Fagentsonar-oma)** — Sidecar detecting cross-run delegation cycles, repetition, and rate bursts.\n\nBuilt an integration? [Open a discussion](https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fdiscussions) to get listed.\n\n### Provider community offers\n\nLimited-time provider offers for `open-multi-agent` users. Listings are not paid endorsements.\n\n- **[MiniMax](https:\u002F\u002Fplatform.minimax.io\u002Fsubscribe\u002Fcoding-plan?code=6ZoOY13DDV&source=link)** — Use MiniMax M2.7 in OMA's TypeScript multi-agent workflows. OMA users get 12% off the MiniMax Token Plan until 2026-06-30. See the [MiniMax setup guide](.\u002Fdocs\u002Fproviders\u002Fminimax.md).\n\n### Featured partner\n\nFor products and platforms with a deep `open-multi-agent` integration. See the [Featured partner program](.\u002Fdocs\u002Ffeatured-partner.md) for terms and how to apply.\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  OpenMultiAgent (Orchestrator)                                  │\n│                                                                 │\n│  createTeam()  runTeam()  runTasks()  runAgent()  getStatus()   │\n└──────────────────────┬──────────────────────────────────────────┘\n                       │\n            ┌──────────▼──────────┐\n            │  Team               │\n            │  - AgentConfig[]    │\n            │  - MessageBus       │\n            │  - TaskQueue        │\n            │  - SharedMemory     │\n            └──────────┬──────────┘\n                       │\n         ┌─────────────┴─────────────┐\n         │                           │\n┌────────▼──────────┐    ┌───────────▼───────────┐\n│  AgentPool        │    │  TaskQueue             │\n│  - Semaphore      │    │  - dependency graph    │\n│  - runParallel()  │    │  - auto unblock        │\n└────────┬──────────┘    │  - cascade failure     │\n         │               └───────────────────────┘\n┌────────▼──────────┐\n│  Agent            │\n│  - run()          │    ┌────────────────────────┐\n│  - prompt()       │───►│  LLMAdapter            │\n│  - stream()       │    │  - AnthropicAdapter    │\n└────────┬──────────┘    │  - OpenAIAdapter       │\n         │               │  - AzureOpenAIAdapter  │\n         │               │  - BedrockAdapter      │\n         │               │  - CopilotAdapter      │\n         │               │  - GeminiAdapter       │\n         │               │  - GrokAdapter         │\n         │               │  - MiniMaxAdapter      │\n         │               │  - DeepSeekAdapter     │\n         │               │  - QiniuAdapter        │\n         │               └────────────────────────┘\n┌────────▼──────────┐\n│  AgentRunner      │    ┌──────────────────────┐\n│  - conversation   │───►│  ToolRegistry        │\n│    loop           │    │  - defineTool()      │\n│  - tool dispatch  │    │  - 6 built-in tools  │\n└───────────────────┘    │  + delegate (opt-in) │\n                         └──────────────────────┘\n```\n\n## Core Concepts\n\n- **Tools + MCP.** Built-ins cover `bash`, `file_read`, `file_write`, `file_edit`, `grep`, and `glob`; custom tools use `defineTool()` + Zod; stdio MCP servers connect through `connectMCPTools()`. See [tool configuration](.\u002Fdocs\u002Ftool-configuration.md).\n- **Observability.** Wire `onProgress` for live lifecycle events, `onTrace` for structured spans, and `renderTeamRunDashboard(result)` for a static DAG dashboard. See [observability](.\u002Fdocs\u002Fobservability.md).\n- **Shared memory.** Use the default in-process KV or bring Redis, Postgres, Engram, or any `MemoryStore`. See [shared memory](.\u002Fdocs\u002Fshared-memory.md).\n- **Context management.** Use sliding windows, summarization, rule-based compaction, or a custom compressor for long-running agents. See [context management](.\u002Fdocs\u002Fcontext-management.md).\n\n## Supported Providers\n\nChange `provider`, `model`, and set the env var. The agent config shape stays the same.\n\n```typescript\nconst agent: AgentConfig = {\n  name: 'my-agent',\n  provider: 'anthropic',\n  model: 'claude-sonnet-4-6',\n  systemPrompt: 'You are a helpful assistant.',\n}\n```\n\n| Kind | How to configure | Services |\n|------|------------------|----------|\n| Built-in shortcuts | Set `provider` to `anthropic`, `gemini`, `openai`, `azure-openai`, `copilot`, `grok`, `deepseek`, `minimax`, `qiniu`, or `bedrock`; the framework supplies the endpoint. | Anthropic, Gemini, OpenAI, Azure OpenAI, GitHub Copilot, xAI Grok, DeepSeek, MiniMax, Qiniu, AWS Bedrock |\n| OpenAI-compatible endpoints | Set `provider: 'openai'` plus `baseURL` and, when needed, `apiKey`. | Ollama, vLLM, LM Studio, llama.cpp server, OpenRouter, Groq, Mistral |\n| Vercel AI SDK | Import `AISdkAdapter` from `@open-multi-agent\u002Fcore\u002Fai-sdk`; install optional peer `ai` plus an `@ai-sdk\u002F*` provider. | [Any AI SDK provider](https:\u002F\u002Fai-sdk.dev\u002Fproviders) (60+ models and hosts) |\n\nSee [docs\u002Fproviders.md](.\u002Fdocs\u002Fproviders.md) for env vars, model examples, local tool-calling, timeouts, and troubleshooting.\n\n### Vercel AI SDK (optional)\n\nInstall the optional peer [`ai`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fai) plus any [`@ai-sdk` provider](https:\u002F\u002Fai-sdk.dev\u002Fproviders) you need (for example [`@ai-sdk\u002Fopenai`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@ai-sdk\u002Fopenai)). 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.\n\n```typescript\nimport { openai } from '@ai-sdk\u002Fopenai'\nimport { AISdkAdapter } from '@open-multi-agent\u002Fcore\u002Fai-sdk'\nimport { OpenMultiAgent } from '@open-multi-agent\u002Fcore'\n\nconst oma = new OpenMultiAgent()\nawait oma.runAgent(\n  {\n    name: 'researcher',\n    model: 'gpt-4o',\n    adapter: new AISdkAdapter(openai('gpt-4o')),\n    systemPrompt: 'You are a researcher.',\n  },\n  'What are the latest AI trends?',\n)\n```\n\nThe coordinator accepts the same hook via `runTeam(team, goal, { coordinator: { adapter: new AISdkAdapter(...) } })`.\n\n## Production Checklist\n\nBefore going live, wire up the controls that protect token spend, recover from failure, and let you debug.\n\n| Concern | Knob | Where it lives |\n|---------|------|----------------|\n| Bound the conversation | `maxTurns` per agent + `contextStrategy` (`sliding-window` \u002F `summarize` \u002F `compact` \u002F `custom`) | `AgentConfig` |\n| Cap tool output | `maxToolOutputChars` (or per-tool `maxOutputChars`) + `compressToolResults: true` | `AgentConfig` and `defineTool()` |\n| Recover from failure | Per-task `maxRetries`, `retryDelayMs`, `retryBackoff` (exponential multiplier) | Task config used via `runTasks()` |\n| Hard-cap spend | `maxTokenBudget` on the orchestrator | `OrchestratorConfig` |\n| Catch stuck agents | `loopDetection` with `onLoopDetected: 'terminate'` (or a custom handler) | `AgentConfig` |\n| Trace and audit | `onTrace` to your tracing backend; persist `renderTeamRunDashboard(result)` | `OrchestratorConfig` |\n\n## Contributing\n\nIssues, feature requests, and PRs are welcome. Some areas where contributions would be especially valuable:\n\n- **Production examples.** Real-world end-to-end workflows. See [`examples\u002Fproduction\u002FREADME.md`](.\u002Fexamples\u002Fproduction\u002FREADME.md) for the acceptance criteria and submission format.\n- **Documentation.** Guides, tutorials, and API docs.\n- **Translations.** Help translate this README into other languages. [Open a PR](https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fpulls).\n\n## Contributors\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-multi-agent\u002Fopen-multi-agent\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=open-multi-agent\u002Fopen-multi-agent&max=100&v=20260507\" \u002F>\n\u003C\u002Fa>\n\n\u003Cdetails>\n\u003Csummary>Contributor credits by area\u003C\u002Fsummary>\n\n**Framework features**\n\n- [@ibrahimkzmv](https:\u002F\u002Fgithub.com\u002Fibrahimkzmv) (token budget, context strategy, dependency-scoped context, tool presets, glob, MCP integration, configurable coordinator, CLI, dashboard rendering, trace event types)\n- [@apollo-mg](https:\u002F\u002Fgithub.com\u002Fapollo-mg) (context compaction fix, sampling parameters)\n- [@tizerluo](https:\u002F\u002Fgithub.com\u002Ftizerluo) (onPlanReady, onAgentStream)\n- [@CodingBangboo](https:\u002F\u002Fgithub.com\u002FCodingBangboo) (planOnly mode)\n- [@Xin-Mai](https:\u002F\u002Fgithub.com\u002FXin-Mai) (output schema validation)\n- [@JasonOA888](https:\u002F\u002Fgithub.com\u002FJasonOA888) (AbortSignal support)\n- [@EchoOfZion](https:\u002F\u002Fgithub.com\u002FEchoOfZion) (coordinator skip for simple goals)\n- [@voidborne-d](https:\u002F\u002Fgithub.com\u002Fvoidborne-d) (OpenAI mixed content fix)\n- [@NamelessNATM](https:\u002F\u002Fgithub.com\u002FNamelessNATM) (agent delegation base implementation)\n- [@MyPrototypeWhat](https:\u002F\u002Fgithub.com\u002FMyPrototypeWhat) (reasoning blocks, reasoning_effort, sampling parity, trace input\u002Foutput)\n- [@SiMinus](https:\u002F\u002Fgithub.com\u002FSiMinus) (streaming reasoning events)\n\n**Provider integrations**\n\n- [@ibrahimkzmv](https:\u002F\u002Fgithub.com\u002Fibrahimkzmv) (Gemini)\n- [@hkalex](https:\u002F\u002Fgithub.com\u002Fhkalex) (DeepSeek, MiniMax)\n- [@marceloceccon](https:\u002F\u002Fgithub.com\u002Fmarceloceccon) (Grok)\n- [@Klarline](https:\u002F\u002Fgithub.com\u002FKlarline) (Azure OpenAI)\n- [@Deathwing](https:\u002F\u002Fgithub.com\u002FDeathwing) (GitHub Copilot)\n- [@JackChiang233](https:\u002F\u002Fgithub.com\u002FJackChiang233) (Qiniu)\n- [@CodingBangboo](https:\u002F\u002Fgithub.com\u002FCodingBangboo) (AWS Bedrock)\n\n**Examples & cookbook**\n\n- [@mvanhorn](https:\u002F\u002Fgithub.com\u002Fmvanhorn) (research aggregation, code review, meeting summarizer, Groq example, Mistral example)\n- [@Kinoo0](https:\u002F\u002Fgithub.com\u002FKinoo0) (code review upgrade)\n- [@Optimisttt](https:\u002F\u002Fgithub.com\u002FOptimisttt) (research aggregation upgrade)\n- [@Agentscreator](https:\u002F\u002Fgithub.com\u002FAgentscreator) (Engram memory integration)\n- [@fault-segment](https:\u002F\u002Fgithub.com\u002Ffault-segment) (contract-review DAG)\n- [@HuXiangyu123](https:\u002F\u002Fgithub.com\u002FHuXiangyu123) (cost-tiered example)\n- [@zouhh22333-beep](https:\u002F\u002Fgithub.com\u002Fzouhh22333-beep) (translation\u002Fbacktranslation)\n- [@pei-pei45](https:\u002F\u002Fgithub.com\u002Fpei-pei45) (competitive monitoring)\n- [@mmjwxbc](https:\u002F\u002Fgithub.com\u002Fmmjwxbc) (interview simulator)\n- [@binghuaren96](https:\u002F\u002Fgithub.com\u002Fbinghuaren96) (incident postmortem DAG)\n- [@DaiMao-UT](https:\u002F\u002Fgithub.com\u002FDaiMao-UT) (paper replication triage)\n- [@oooooowoooooo](https:\u002F\u002Fgithub.com\u002Foooooowoooooo) (rare disease information triage)\n- [@CodingBangboo](https:\u002F\u002Fgithub.com\u002FCodingBangboo) (Express customer support pipeline)\n\n**Docs & tests**\n\n- [@tmchow](https:\u002F\u002Fgithub.com\u002Ftmchow) (llama.cpp docs)\n- [@kenrogers](https:\u002F\u002Fgithub.com\u002Fkenrogers) (OpenRouter docs)\n- [@jadegold55](https:\u002F\u002Fgithub.com\u002Fjadegold55) (LLM adapter test coverage)\n\n\u003C\u002Fdetails>\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#open-multi-agent\u002Fopen-multi-agent&Date\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=open-multi-agent\u002Fopen-multi-agent&type=Date&theme=dark&v=20260425\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=open-multi-agent\u002Fopen-multi-agent&type=Date&v=20260425\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=open-multi-agent\u002Fopen-multi-agent&type=Date&v=20260425\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n## License\n\nMIT\n","`open-multi-agent` 是一个用于 TypeScript 后端的多智能体编排框架。它能够自动将目标分解为任务有向无环图（DAG），并通过协调器智能体并行处理独立任务，最终合成结果。项目的核心功能包括模型无关的多智能体协作、实时追踪和结构化输出，仅依赖三个运行时库，易于集成到任何 Node.js 项目中。适用于需要高效管理和调度多个 AI 智能体的应用场景，如复杂的自动化流程、多任务处理系统等。",2,"2026-06-11 03:50:45","high_star"]