最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
构建AI Agent影子团队:从单一助手到多Agent协作系统
时间:2026-07-17 17:19:49 编辑:袖梨 来源:一聚教程网
{"type":"doc","content":[{"type":"paragraph","attrs":{"id":"1ca266c4-1dc4-4c2a-800d-6661602c9602","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"原创-转载需留言-bobo.2026年7月5日17:12:29"}]},{"type":"paragraph","attrs":{"id":"338e3e71-e9f7-4d3d-b38f-342ee7442c40","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"文章比较长,如果要学习可以直接让你的agent读取全文"}]},{"type":"blockquote","attrs":{"id":"088381e5-e054-4e30-926d-d5e8ca506a80","textAlign":"inherit","isHoverDragHandle":false},"content":[{"type":"paragraph","attrs":{"id":"5020d0c9-a865-44ca-9a83-dfefe017ede9","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"从一个对话窗口到一支可自我组织的 Agent 团队,AI 不再只是“回答问题”,而是开始“分担工作”。"}]}]},{"type":"heading","attrs":{"id":"66c92f91-2bed-4e3d-ae0c-3a25d9761c41","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"一、为什么单一助手不够用了"}]},{"type":"paragraph","attrs":{"id":"b75027fa-3a93-44da-a2d8-bf986449918e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"大模型助手已经改变了我们获取信息的方式。但当工程复杂度上升、任务链路变长时,单一助手很快会遇到瓶颈:"}]},{"type":"bulletList","attrs":{"id":"8bd871d2-ea58-4eb6-a518-0bf3f38a31b4","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"6102011a-32e9-41bf-8010-8b8bfa1259d0"},"content":[{"type":"paragraph","attrs":{"id":"921d08b4-2b13-41fb-9847-81d7036d63fe","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"上下文爆炸"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":长期项目的信息无法全部塞进一次对话。"}]}]},{"type":"listItem","attrs":{"id":"48957910-2658-4713-a4d4-747b8d477926"},"content":[{"type":"paragraph","attrs":{"id":"bb682ca3-3ab7-4236-8636-d5dcd521d5e3","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"角色混杂"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":让它同时做设计、审计、代码实现,输出风格互相干扰。"}]}]},{"type":"listItem","attrs":{"id":"8f3ee238-ac74-4f48-b571-def1d60f76c3"},"content":[{"type":"paragraph","attrs":{"id":"0e214b74-1434-499c-9ab4-827860346ea6","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"调度缺失"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":没有人负责提醒、跟进、归档和跨任务协调。"}]}]}]},{"type":"paragraph","attrs":{"id":"1ede155f-a61c-4745-9dc1-dad682b9b2ca","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"这些瓶颈促使我开始思考:如果让多个具备不同角色的 Agent 协作,会是什么效果?"}]},{"type":"heading","attrs":{"id":"7383aa74-ae15-488e-83a0-1a1e67ead05a","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"二、什么是 Agent 影子团队"}]},{"type":"paragraph","attrs":{"id":"227c4024-d914-4bc5-8c94-35358aef9b90","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"Agent 影子团队(Shadow Team)指的是一组围绕用户目标运行的自动化 Agent,它们像“影子”一样在后台工作,各自负责不同职能,但统一接受一个核心调度者的协调。"}]},{"type":"paragraph","attrs":{"id":"bb3aa780-a7ff-4791-859f-504af4d987c1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"在我当前的实践中,团队里有几个典型角色:"}]},{"type":"table","attrs":{"id":"4d758645-7a9d-429d-b2ab-eed4f04d84df","isHoverDragHandle":false},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); word-break: keep-all;"},"content":[{"type":"paragraph","attrs":{"id":"9653bbc9-7f39-46a8-93d8-90d7fa85487d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"角色"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); word-break: keep-all;"},"content":[{"type":"paragraph","attrs":{"id":"fbb2b143-5ec6-4d13-b9fe-04d18c6fbb4b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"职责"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); word-break: keep-all;"},"content":[{"type":"paragraph","attrs":{"id":"40a0df2b-cdfa-420c-92af-164420214b45","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"工作方式"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"7616d555-514b-4e7e-8a82-c3152747332d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"秘书长"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"9eadc56c-e947-415a-bb75-2e5f9a681a50","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"状态守护、任务调度、记忆管理"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"614a73af-6357-4d89-a0f7-c48c9e3eb31b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"全天候监控用户状态,主动发起提醒和进度对齐"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"be5f1b07-ec34-4996-8622-7d79bcdcce18","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"研发工程师"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"fb4e9545-d31b-43d5-bfc1-39288e610abd","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"代码实现、Bug 修复、逻辑审计"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"56357506-2ab8-405c-b666-144bd556a99a","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"承接核心研发任务,输出可落地的代码"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"22a92df2-d82c-4f82-9e2c-dcabf331517e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"设计师"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"335991bf-952a-42cd-9b51-d6113ed20449","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"视觉创意、UI 方案"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"a81410f2-6436-4248-b5ac-1a9480159080","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"处理像素风素材与风格化视觉需求"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"086b4610-9a74-454f-ab85-2258b1ff99bc","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"审计员"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"6b4138c2-c759-4fba-b6ef-27f2c241d00b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"路径合规、安全审查"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"58165f70-2274-4165-9187-98b63e2aafe1","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"扫描代码中硬编码、安全风险和流程违规"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"cf8a723e-7164-4176-99d3-155845df0247","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"接待员"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"67b7a4f7-d3dc-443b-83a2-3221fcafeec9","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"闲聊、轻量接待、情绪缓冲"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"background":null,"color":null,"textAlign":null,"style":"padding: 0px; list-style: inherit; border-color: rgb(225, 230, 240);"},"content":[{"type":"paragraph","attrs":{"id":"674728fc-f842-47bd-a67a-9304c5b9abc7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"处理低优先级的社交与信息过滤"}]}]}]}]},{"type":"paragraph","attrs":{"id":"dea08ae7-4c0a-48e9-9f2f-05e299969972","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"角色分层的价值在于:每个 Agent 只处理自己擅长的事情,减少上下文污染,也让系统更容易扩展。"}]},{"type":"heading","attrs":{"id":"ad79d7fb-b47a-4bb8-803d-75d6a7acb243","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"三、多 Agent 协作的架构设计"}]},{"type":"paragraph","attrs":{"id":"af42b6d8-e43c-4bbf-8114-066fed4e73f7","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"一个可用的多 Agent 系统通常包含四层:"}]},{"type":"heading","attrs":{"id":"2ba56b49-e5ed-4e59-b328-803aa38917ee","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"1. 信号层:接收输入"}]},{"type":"paragraph","attrs":{"id":"7ca96d29-0f63-4a2e-95d5-0b5a2c7f3438","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"Agent 需要能接收来自不同渠道的输入。例如:"}]},{"type":"bulletList","attrs":{"id":"413b7500-4ff9-4630-93f5-b211382819f0","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"a80f21f4-360f-4230-935c-b3fd310094f6"},"content":[{"type":"paragraph","attrs":{"id":"88be74ce-53bc-4835-bd77-75d2f0bfc36e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"即时通讯(QQ / 飞书 / Slack)"}]}]},{"type":"listItem","attrs":{"id":"5adf9fa4-2389-4bf3-b567-ee4938480eb6"},"content":[{"type":"paragraph","attrs":{"id":"7645d27e-e737-43bf-a484-2db6841e6618","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"IDE 命令触发"}]}]},{"type":"listItem","attrs":{"id":"18a98b48-c84c-4301-a737-cdedbd99b71d"},"content":[{"type":"paragraph","attrs":{"id":"1bd89bf2-13ff-4052-91cb-fc0b124179d2","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"定时器周期性唤醒"}]}]},{"type":"listItem","attrs":{"id":"2f7a0a5c-88b1-423f-8210-bb6963de3aae"},"content":[{"type":"paragraph","attrs":{"id":"210c1b6c-1b62-4ea0-805c-c3d9b2b42dcd","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"Git / CI 事件"}]}]}]},{"type":"paragraph","attrs":{"id":"b35d6ffd-78c0-400b-9e2f-b1f6f8ca14fc","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"我用一个轻量网关把外部消息转换成统一格式的内部协议,再分发给对应 Agent。"}]},{"type":"codeBlock","attrs":{"id":"3fd04e06-8698-4886-935a-b54d08919f3c","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"外部消息 → 网关 → 内部协议 → 目标 Agent"}]},{"type":"paragraph","attrs":{"id":"65395d59-71b7-409a-beb6-256dcab3c009","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"复制"}]},{"type":"heading","attrs":{"id":"8ae46a7b-7aa5-40a2-b703-9c3d36ea3ff6","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"2. 协议层:统一通信格式"}]},{"type":"paragraph","attrs":{"id":"cef09e47-815e-40b2-8f69-054a5362f6a2","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"所有 Agent 之间使用同一套通信协议,至少包含:"}]},{"type":"bulletList","attrs":{"id":"da00632c-f39b-4ccd-80c9-bbf760060c30","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"8e2ca877-fb55-41cd-ae8f-e7d36c38eca0"},"content":[{"type":"paragraph","attrs":{"id":"9c19d0b3-760e-4682-a411-d1a30bc3ae10","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"发送者身份"}]}]},{"type":"listItem","attrs":{"id":"c72ac9d0-bdf9-4c84-aeb4-0408e3709cee"},"content":[{"type":"paragraph","attrs":{"id":"44e974fe-188a-46ab-8725-44c9f182ce78","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"目标群/私聊 ID"}]}]},{"type":"listItem","attrs":{"id":"0e5d76d3-8cee-4e8c-814f-fdd1d450149a"},"content":[{"type":"paragraph","attrs":{"id":"472bebaf-9f8b-4f61-9e22-f04797969fe4","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"消息类型(指令、回复、定时、广播)"}]}]},{"type":"listItem","attrs":{"id":"f5e375b4-723b-479a-98e0-f78533bc4d5d"},"content":[{"type":"paragraph","attrs":{"id":"2e42922e-62f8-4e5f-8b22-8d3409bdadc6","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"时间戳与路由元信息"}]}]}]},{"type":"paragraph","attrs":{"id":"4720ec35-6d57-4593-b66a-9452aa108c62","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"统一的协议让 Agent 之间可以互相转发、调用和协作,而不是各说各话。"}]},{"type":"heading","attrs":{"id":"ac262e38-db60-4366-99c4-83ef07db41b0","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"3. 调度层:任务分发与协调"}]},{"type":"paragraph","attrs":{"id":"7ee42239-7909-48cf-a5bf-d01af426a1ed","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"核心调度者负责判断输入该交给谁处理:"}]},{"type":"bulletList","attrs":{"id":"9f052bdc-cb2a-47cf-8ee3-9931562e8059","isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"e5e812f6-71f2-4104-852c-fca060bbc407"},"content":[{"type":"paragraph","attrs":{"id":"efbed3d5-5152-43ba-bb27-307584b727af","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"是研发任务?转发给研发工程师 Agent。"}]}]},{"type":"listItem","attrs":{"id":"00853ed7-f1d0-462b-84d5-e49257ed6f26"},"content":[{"type":"paragraph","attrs":{"id":"98635987-9cb0-40b8-8d7c-5791f2230dfe","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"是视觉需求?丢给设计师 Agent。"}]}]},{"type":"listItem","attrs":{"id":"10cc299a-ce53-4242-893c-3fd88b068e44"},"content":[{"type":"paragraph","attrs":{"id":"6010cd39-1bf4-4bf0-b3cf-97ddb763f39e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"是合规审查?让审计员 Agent 扫描。"}]}]},{"type":"listItem","attrs":{"id":"4c836e2f-964b-4e10-9131-79be7c1b2010"},"content":[{"type":"paragraph","attrs":{"id":"4e1d93a4-3e3a-454f-9220-a44c49c609c8","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"只是状态同步?自己处理。"}]}]}]},{"type":"paragraph","attrs":{"id":"a8c338d4-da0c-4d85-a7df-e454b16d8f9d","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"调度者还需要维护全局状态,避免重复启动、重复处理或资源争抢。"}]},{"type":"heading","attrs":{"id":"cc129e29-d2ef-4dbd-812c-3d077ccbaaed","textAlign":"inherit","indent":0,"level":3,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"4. 执行层:落地与回传"}]},{"type":"paragraph","attrs":{"id":"c6bf77e7-b801-44ce-96a1-fd6eb267d174","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"每个 Agent 执行自己的任务后,必须把结果回传到用户能看到的地方。在远程通讯场景中,这意味着所有输出都要同步到指定渠道,确保用户不遗漏任何信息。"}]},{"type":"codeBlock","attrs":{"id":"3905a970-99e5-4d94-a7e2-e37a7f0fda4d","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"Agent 输出 → 网关 → 即时通讯渠道"}]},{"type":"paragraph","attrs":{"id":"e4e18bc2-4947-4d8b-a03d-ee53833c700b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"复制"}]},{"type":"heading","attrs":{"id":"a8e66fd9-d884-40bd-a61a-e46221627413","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"四、实战:消息路由与协作协议"}]},{"type":"paragraph","attrs":{"id":"cb22aecf-f05f-4753-94ce-f350b8ac0651","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"以 Python 为例,一个最小化的网关接收器可以这样设计:"}]},{"type":"codeBlock","attrs":{"id":"1c9ac18b-d3de-46ef-bda4-c07e57e4abf8","language":"javascript","theme":"atom-one-dark","runtimes":0,"isHoverDragHandle":false,"key":"","languageByAi":"javascript"},"content":[{"type":"text","text":"from fastapi import FastAPI, Requestnimport jsonnnapp = FastAPI()[email protected]("/acp")nnasync def receive_acp(request: Request):npayload = await request.json()nn# 1. 解析协议头nsender = payload.get("sender")nchannel = payload.get("channel")ncontent = payload.get("content")nn# 2. 意图分型:决定交给哪个 Agentnif any(k in content for k in ["写代码", "实现", "修复"]):nroute_to("engineer", payload)nelif any(k in content for k in ["设计", "图", "UI"]):nroute_to("designer", payload)nelif any(k in content for k in ["合规", "审计", "路径"]):nroute_to("auditor", payload)nelse:nroute_to("coordinator", payload)nnreturn {"ok": True}"}]},{"type":"paragraph","attrs":{"id":"e64fb265-0bbf-44f7-ba34-d2d8d70da162","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","text":"复制"}]},{"type":"paragraph","attrs":{"id":"b0f4110e-4b80-4d4e-9d96-b12a7ac89a88","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"真正的调度器会更复杂,比如维护每个 Agent 的可用状态、负载均衡、失败重试和超时熔断。但核心逻辑始终是:先分型,再路由。"}]},{"type":"heading","attrs":{"id":"228b1959-984c-4cf2-8880-c6353ee2821b","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"五、我的系统演进:从单体到游牧式"}]},{"type":"paragraph","attrs":{"id":"d581fd2a-cd72-486f-a412-002ae13fd8df","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"早期我把所有功能都塞进一个 Agent,结果上下文越来越乱,输出也越来越“平庸”。后来我做了两次关键拆分:"}]},{"type":"orderedList","attrs":{"id":"30783b43-dc63-45e0-8c65-98d273866159","start":1,"isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"57479bf6-066d-4c7d-b233-fce5797fd066"},"content":[{"type":"paragraph","attrs":{"id":"528d01e6-7934-4f4b-a40a-77d2bd29f83f","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"角色分离"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":把视觉创意拆给设计师 Agent,把研发与审计拆给工程师和审计员 Agent。"}]}]},{"type":"listItem","attrs":{"id":"4ca86627-92d0-4bf3-a9e4-459182ae86b5"},"content":[{"type":"paragraph","attrs":{"id":"383f2e85-6252-478e-9851-54b1fef4151e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"底座解耦"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":把通讯系统从底层 AI 框架中抽离,让核心调度者可以“寄生”在不同宿主引擎上运行。"}]}]}]},{"type":"paragraph","attrs":{"id":"829c69f7-4d26-4991-8b64-f928549ae17b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"这种架构让系统更像一个“游牧式智能体”:人格稳定,但运行底座可以切换。即使某个引擎不可用,核心协作链路仍然能恢复。"}]},{"type":"heading","attrs":{"id":"f2930492-49dc-4f6c-ad1f-26396eed4971","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"六、常见陷阱与建议"}]},{"type":"orderedList","attrs":{"id":"1c0dcf18-7e88-4534-9b07-0fd21b5b8041","start":1,"isHoverDragHandle":false},"content":[{"type":"listItem","attrs":{"id":"59d9ccf3-2808-4003-ae4f-9a93a6842dd0"},"content":[{"type":"paragraph","attrs":{"id":"926a0c40-a26b-48ab-a266-b9f935923c07","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"不要为每个 Agent 都写同样的工具集"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":公共能力(如发送消息、读取文件)应该沉淀为共享技能,避免重复。"}]}]},{"type":"listItem","attrs":{"id":"a4068223-99c4-4b67-9c2c-c3a4f8882b7e"},"content":[{"type":"paragraph","attrs":{"id":"e0ae9860-fe45-4553-b6be-fa0a68259b81","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"警惕重复启动"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":服务化部署后,一定要做好单例控制,防止多个 Agent 实例互相抢端口或重复处理消息。"}]}]},{"type":"listItem","attrs":{"id":"abe74e16-c43f-4c53-acb3-b16e22cb701d"},"content":[{"type":"paragraph","attrs":{"id":"35de1de3-9807-4dcf-9b02-3b5a41db059c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"状态比对话更重要"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":Agent 的记忆力应该持久化到文件,而不是依赖单次会话的上下文。"}]}]},{"type":"listItem","attrs":{"id":"43b9d078-522c-4ff0-b869-5cbb2c88de28"},"content":[{"type":"paragraph","attrs":{"id":"2eca55c2-dad6-44e7-a0ef-966387a1888b","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}},{"type":"bold"}],"text":"先跑通链路,再优化智能"},{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":":先把 Agent 之间的消息收发、调度和回传打通,再纠结模型能力调优。"}]}]}]},{"type":"heading","attrs":{"id":"721f1ca6-ca73-4408-8bbe-2e635db650c8","textAlign":"inherit","indent":0,"level":2,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"七、总结"}]},{"type":"paragraph","attrs":{"id":"147db2ac-0f42-4903-9c94-11895e8fbd8e","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"多 Agent 协作不是简单的“多开几个大模型窗口”。它需要清晰的角色划分、统一的通信协议、一个可靠的核心调度者,以及持续维护的长期记忆。"}]},{"type":"paragraph","attrs":{"id":"1d2a542d-d6ad-48f0-ab3f-1f24f5ff2f14","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"当这些要素齐备时,AI 就从“工具”变成“团队”——一支在你身后静默运行的影子团队。"}]},{"type":"paragraph","attrs":{"id":"795795c5-1b8a-47c5-965c-c5128673925c","textAlign":"inherit","indent":0,"color":null,"background":null,"isHoverDragHandle":false},"content":[{"type":"text","marks":[{"type":"textStyle","attrs":{"color":"","background":""}}],"text":"如果你也在构建类似系统,欢迎一起探讨:你的第一个 Agent 应该是什么角色?"}]}]}","createTime":1783243371,"ext":{"closeTextLink":0,"comment_ban":0,"description":"","focusRead":0},"favNum":0,"html":"","isOriginal":0,"likeNum":0,
相关文章
- 神行九歌伏羲轩辕阵容搭配选择攻略 07-17
- 《王者荣耀》英雄碎片用途详解-碎片多了怎么办 07-17
- 崩坏星穹铁道姬子启行遗器搭配选择指南 07-17
- 魔兽世界守护者的援手任务攻略 07-17
- 手术机器人第一股收购骨科龙头:行业迎来最强战力 07-17
- Claude 进军 K12: AI 巨头终于开始抢学校了 07-17