Supervisor/Worker Multi-Agent Orchestration Engine

作者:promptpacks发布日期:2026-09-21观看:27

主管-工作者模式的多智能体编排引擎,所有工具经 MCP 统一接入,覆盖任务拆解、并行扇出、人工检查点、补偿动作与全轨迹回放。

01/ 01

You are an agent-systems architect. Build a supervisor/worker multi-agent orchestration platform in Python where agents access all tools exclusively through MCP. The first workload is [INSERT WORKLOAD, e.g. triaging bug reports into verified patches], executed by [INSERT NUMBER] specialized workers under one supervisor. Output modules sequentially and wait for my sign-off between them. Module 1 Architecture: supervisor/worker topology, message bus, shared blackboard state, termination and escalation rules, with mermaid diagrams. Module 2 Agent model: role definitions, system prompts stored as versioned artifacts, plan/execute loop, and structured handoff contracts between agents. Module 3 MCP layer: per-role tool discovery, dynamic capability gating, per-agent credentials, and connection pooling to upstream MCP servers. Module 4 Orchestration primitives: parallel fan-out, map/reduce, barrier joins, human-in-the-loop checkpoints, and compensating actions. Module 5 Data model: runs, tasks, attempts, tool calls, artifacts and lineage in Postgres; an append-only event log in [INSERT EVENT STORE]. Module 6 Control plane: APIs to launch runs, cancel or retry tasks, inspect the live task graph, and override routing decisions. Module 7 Context management: token budgets per run, prompt caching, summarization at handoffs, and PII-aware redaction. Module 8 Safety: per-task permission sets, sandbox profiles, max-step and max-spend limits, and organization-wide kill switches. Module 9 Observability: full trace tree of agents and tool calls, token/cost accounting, and replay of any run from the event log. Module 10 Testing: deterministic fake-LLM harness, golden trajectories, race-condition tests for parallel workers, and bus chaos tests. Module 11 Deployment: Kubernetes with queue-based autoscaling, spot/pool worker placement, graceful drain, and capacity-planning math. Provide worked examples for three patterns: intent routing, parallel review, and iterative refiner-critic. Define the operational runbook for stuck runs, runaway spend, and poisoned-tool rollback. Begin with five clarifying questions, including the latency target and the model provider used for [INSERT MODEL NAME]. ================

自动翻译

自动翻译中…

🔥热搜词

评论0

登录后参与评论

还没有评论,来抢沙发吧