一键导入
multi-agent-orchestration
Compose multiple agents as callable tools, spawn dynamic sub-agents at runtime, and wire remote A2A agents into a coordinated pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compose multiple agents as callable tools, spawn dynamic sub-agents at runtime, and wire remote A2A agents into a coordinated pipeline.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | multi-agent-orchestration |
| description | Compose multiple agents as callable tools, spawn dynamic sub-agents at runtime, and wire remote A2A agents into a coordinated pipeline. |
| compatibility | Reactive Agents TypeScript projects using @reactive-agents/* |
| metadata | {"author":"reactive-agents","version":"2.0","tier":"capability"} |
Produce a builder with agent tools registered so an agent can delegate subtasks to specialized sub-agents and integrate their results.
import { ReactiveAgents } from "@reactive-agents/runtime";
// Lead agent with registered sub-agents as tools
const agent = await ReactiveAgents.create()
.withName("lead")
.withProvider("anthropic")
.withReasoning({ defaultStrategy: "plan-execute-reflect", maxIterations: 20 })
.withAgentTool("researcher", {
name: "Research Agent",
description: "Gathers information, reads web pages, and synthesizes findings",
maxIterations: 12,
tools: ["web-search", "http-get", "checkpoint"],
})
.withAgentTool("coder", {
name: "Code Agent",
description: "Writes, tests, and refactors TypeScript code",
maxIterations: 15,
strategy: "plan-execute-reflect",
tools: ["file-read", "file-write", "code-execute"],
})
.withAgentTool("reviewer", {
name: "Review Agent",
description: "Reviews code for correctness, style, and security issues",
maxIterations: 8,
tools: ["file-read"],
})
.withTools({ allowedTools: ["researcher", "coder", "reviewer", "checkpoint", "final-answer"] })
.withSystemPrompt(`
You coordinate a team of specialists. Delegate tasks to the appropriate agent.
Always checkpoint results from sub-agents before continuing to the next phase.
`)
.build();
.withAgentTool("analyst", {
name: "Data Analyst", // display name for the agent
description: "Analyzes datasets and produces statistics", // tool description shown to LLM
provider: "anthropic", // defaults to parent's provider
model: "claude-haiku-4-5-20251001", // use a cheaper model for sub-tasks
maxIterations: 10, // sub-agent iteration limit
strategy: "adaptive", // sub-agent reasoning strategy
tools: ["file-read", "code-execute"], // tools available to sub-agent
})
The sub-agent runs as a tool call — the LLM calls it with a task description and receives the result.
.withDynamicSubAgents({ maxIterations: 8 })
// Enables spawning ad-hoc agents at runtime.
// The agent can dynamically create and call sub-agents based on task needs.
// Sub-agents inherit the parent's provider and model by default.
.withRemoteAgent("data-service", "http://data-agent:8000")
// Connects to a remote A2A agent at the given URL.
// Remote agent is exposed as a tool — called exactly like a local sub-agent.
// Remote agent must expose the A2A JSON-RPC interface (see a2a-agent-networking skill).
const agent = await ReactiveAgents.create()
.withProvider("anthropic")
.withReasoning({ defaultStrategy: "plan-execute-reflect", maxIterations: 25 })
.withAgentTool("researcher", {
name: "Researcher",
description: "Research a topic and return key findings",
tools: ["web-search", "http-get", "checkpoint"],
})
.withAgentTool("writer", {
name: "Writer",
description: "Write a document given research findings",
tools: ["file-write", "checkpoint"],
})
.withAgentTool("reviewer", {
name: "Reviewer",
description: "Review a document and return critique",
tools: ["file-read"],
})
.withTools({ allowedTools: ["researcher", "writer", "reviewer", "final-answer"] })
.withSystemPrompt(`
1. Call researcher to gather information on the topic.
2. Call writer with the research to produce the document.
3. Call reviewer with the document path.
4. Revise if the reviewer finds critical issues.
5. Return final-answer when approved.
`)
.build();
| Parameter | Type | Notes |
|---|---|---|
name | string | Human-readable display name |
description | string | Tool description shown to the orchestrating LLM |
provider | ProviderName | Defaults to parent's provider |
model | string | Defaults to parent's model — use cheaper models for sub-agents |
maxIterations | number | Sub-agent iteration cap |
strategy | string | Sub-agent reasoning strategy |
tools | string[] | Tools available to the sub-agent |
| Method | Notes |
|---|---|
.withAgentTool(name, opts) | Registers a local sub-agent as a named tool |
.withDynamicSubAgents(opts?) | Allows the agent to spawn sub-agents at runtime |
.withRemoteAgent(name, url) | Connects to a remote A2A agent as a named tool |
tools are scoped to that sub-agent only — the parent's tool set does not propagate downwithDynamicSubAgents is open-ended — the agent can create arbitrary sub-agents, which can significantly increase costs.build()"final-answer" in the orchestrator's allowedTools or it cannot completeAgentic harness diagnostic + improvement loop. Probes the framework with real model runs, uses the rax-diagnose CLI to root-cause failures from structured trace data, ships ONE coordinated architectural fix, verifies via before/after diff, commits with empirical evidence. Use at the start of any harness improvement session — replaces ad-hoc grep + log-spelunking with a deterministic feedback loop.
Use when the architecture may have drifted from documentation, packages have grown complex, dead code or disabled systems are suspected, or before planning a major refactor — scoped to the reactive-agents-ts 22-package monorepo.
Reactive Agents framework architecture — layer stack, dependency graph, build order, and package structure. Use when planning work, understanding package relationships, or determining build dependencies.
Use when analyzing the Reactive Agents codebase for architectural improvements, abstraction opportunities, composability gaps, or Effect-TS engineering quality — before proposing refactors, during design reviews, or when codebase complexity is growing.
LLMService API contract — the correct signatures for complete(), stream(), embed(), and response types. Use when calling LLMService from any layer, writing reasoning strategies, or building LLM-dependent features.
LLM provider streaming patterns and per-provider quirks. Use when adding a new provider, implementing adapter hooks, or debugging streaming tool call behavior in packages/llm-provider.