AI Team Agent 协作问题 #676
Unanswered
jason-aelf
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
范围
这里讨论的两种 Aevatar Agent 协作方式分别是:
核心结论是:两种方式都能表达 Agent 间调用,但当前都还不能直接等同于完整的 Agent-to-Agent 协作协议。固定流程的问题是协作关系清楚,但结果 continuation、可信 caller identity 和 caller allowlist 通过方式都不完整;智能委托的问题是它更接近受审批的 Service 工具调用,还缺可信 caller identity 和标准结果闭环。
固定流程:Workflow 编排 Service / Member
这种方式适合表达确定流程、强审计和可控业务链路。它的问题主要不是不能协作,而是目前还缺少“调用目标 Agent 后等待其结果并继续”的完整协作闭环;同时,如果 workflow step / member invoke 最终仍走 ServiceInvoke admission,它也同样缺少可用于受保护 endpoint 的可信 caller identity。
Caller.ServiceKey;必须有平台侧的“workflow/member 代表哪个 service identity 调用”的签发契约。Caller.ServiceKey为空或来自请求体/参数,不能安全通过InvokeAllowedCallerServiceKeys。候选解决方案:Call Team Member Workflow Step
Call Team Member应定位为 Workflow extension / workflow step,而不是新的 runtime 或新的 Multi-Agent 平台 primitive。它作为当前 workflow run 内的成员调用节点,由 step 按memberId + action/endpoint + typed input mapping解析StudioMemberbinding,找到目标成员背后的 published Service、active revision 和 endpoint contract,再通过平台注入的 trusted caller service context 调用IServiceInvocationPort.InvokeAsync(...),继续走 admission、governance 和 EventEnvelope dispatch 到目标 Workflow / Script / GAgent runtime。建议链路是:
这里的关键边界是:
accepted receipt不是当前 workflow step 的完成信号。如果本轮只实现到 accepted receipt,这个 step 的产品语义只能是 fire-and-observe:Console 可以展示调用已接受、运行中和审计轨迹,但不能把目标成员输出作为后续 step 的权威输入。如果要解决“调用目标成员后等待其结果并继续”的 workflow 问题,至少需要补齐以下契约:
workflowRunId、stepId、invocationId / correlationId、目标memberId、目标serviceId / endpointId、timeout deadline 和 expected result contract,避免把 accepted 当完成。invocationId / correlationId以及强类型输出或错误,作为当前 workflow 恢复的权威输入。callerServiceKey。StepCompletedEvent.Output自动跨 Service 传递。result / failure event 的来源边界
上表中的
result / failure event不是要求所有 Service 额外发明同一种完成事件,而是要求Call Team Member对不同 Service 类型声明清楚“哪个已提交事实可以作为本次 step 的业务输出”。accepted receipt只表示调用已被接受;Workflow 能否继续,取决于目标 runtime 是否存在可观察、可对账的业务完成事实。WorkflowCompletedEventWorkflowCompletedEvent,并将output / error / success映射为 step 执行结果。RoleChatSessionCompletedEventRoleChatSessionCompletedEvent获取执行结果;调用时需要用invocationId绑定ChatRequestEvent.session_id,避免不同会话结果混淆。ScriptDomainFactCommittedScriptDomainFactCommitted,但一次执行可能产生多条 fact,暂无法确定哪条 fact 是 step 输出。因此,
Call Team Member的expected result contract至少需要表达目标 Service 类型、可观察结果事件、匹配键和结果载荷来源。Workflow Service 和 Static RoleGAgent Service 已经有明确完成事实,可以先纳入可等待结果的范围;Script Service 需要补结果选择契约;Static custom GAgent Service 在没有标准结果事件前只能作为 fire-and-accepted 调用。这个方案对应解决的 workflow 问题是:用
memberId + action + typed mapping降低 SaaS 用户理解成本;用IServiceInvocationPort保留 endpoint contract、policy、revision、admission 和 ServiceRun 记录;用 pending continuation、result/failure event 和 timeout 对账恢复 workflow;用平台注入身份支持受保护 endpoint 的 caller allowlist。智能委托:GAgent 通过 AgentTool ServiceInvoke 调其他 GAgent
这种方式更灵活,适合让 Agent 根据上下文自主决定是否委托其他能力。但它的问题是:当前能力更像“Agent 使用工具调用一个 Service”,还不是完整的 Team Member 协作模型。
invoke_service返回的不是目标 GAgent 的最终业务输出,因此调用方 GAgent 不能天然接着推理。invoke_service默认可能需要 approval;Agent A 决定委托 Agent B 后,流程可能停在等待用户批准。Caller.ServiceKey可能为空或不可信;这会影响受保护 endpoint 的调用。InvokeAllowedCallerServiceKeys,调用方必须有平台可信的 caller service identity;不能让 LLM、前端或工具参数自报身份。对比总结
最小结论
All reactions