Skip to content

[Feature] 让 subagent 拥有与主 agent 对话的上下文 #8411

@Hola-Gracias

Description

@Hola-Gracias

Description / 描述

当前 _execute_handoff 调用 ctx.tool_loop_agent() 后,只拿到 LLMResponse(最终文本),子 Agent 内部的完整对话(系统提示 → 任务 → 工具调用 → 工具结果 → ... → 最终回复)全部丢失

下次主 Agent 再委派同一个子 Agent 时,子 Agent 又是"白纸一张"——不记得上次主 Agent 让它做过什么

可以将子 Agent 的完整对话历史保留,实现主 Agent 与子 Agent 之间多次委派的持续性对话记忆

Use Case / 使用场景

适用于主 Agent 与子 Agent 多次、连续交互的场景

Willing to Submit PR? / 是否愿意提交PR?

  • Yes, I am willing to submit a PR. / 是的,我愿意提交 PR。

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:providerThe bug / feature is about AI Provider, Models, LLM Agent, LLM Agent Runner.enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions