docs(adk): add NOT RECOMMENDED advisory to agent transfer and workflow APIs#970
Open
shentongmartin wants to merge 3 commits intoalpha/09from
Open
docs(adk): add NOT RECOMMENDED advisory to agent transfer and workflow APIs#970shentongmartin wants to merge 3 commits intoalpha/09from
shentongmartin wants to merge 3 commits intoalpha/09from
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha/09 #970 +/- ##
===========================================
Coverage ? 82.26%
===========================================
Files ? 162
Lines ? 20589
Branches ? 0
===========================================
Hits ? 16938
Misses ? 2458
Partials ? 1193 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…uptInfo The field was only written by the framework but never read to drive any logic. Remove it along with the propagation code and dedicated tests. Change-Id: Idabac6458b027ca9ab9a26224e581758e89ec18e
…w APIs Agent transfer with full context sharing between agents has not proven to be more effective empirically. Add advisory comments to all related exported APIs directing users toward ChatModelAgent with AgentTool or DeepAgent for multi-agent scenarios. Change-Id: Ic8966c6bb99380b4bd68f512fe407c775f834447
Change-Id: I9de18cf5bd3e8ebca7247b83ffc492d4ae280fcc
67833d6 to
2c80d70
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NOT RECOMMENDED:advisory comments to all transfer/workflow exported APIsKey Insight
Agent transfer with full context sharing between agents has not proven to be more effective empirically. The recommended patterns are
ChatModelAgentwithAgentToolorDeepAgent. Rather than formally deprecating these APIs (which triggers IDE strikethroughs and linter warnings), we use aNOT RECOMMENDED:advisory — stronger thanNOTE:but softer thanDeprecated:— to guide users without breaking existing code or tooling.What Changed
Added
NOT RECOMMENDED:doc comments to ~25 exported APIs across 9 files in theadkpackage:Core transfer APIs (
flow.go,interface.go,deterministic_transfer.go):SetSubAgents,AgentWithOptions,AgentWithDeterministicTransferToWithDisallowTransferToParent,WithHistoryRewriter,AgentOptionHistoryEntry,HistoryRewriter,DeterministicTransferConfigTransferToAgentAction,NewTransferToAgentAction,NewExitActionRunStep,RunPathfield,OnSubAgentsinterfaceChatModelAgent transfer fields (
chatmodel.go):Exitfield,OutputKeyfield,ExitTooltypeOnSetSubAgents,OnSetAsSubAgent,OnDisallowTransferToParentWorkflow agents (
workflow.go):SequentialAgentConfig,ParallelAgentConfig,LoopAgentConfigNewSequentialAgent,NewParallelAgent,NewLoopAgentBreakLoopAction,NewBreakLoopAction,WorkflowInterruptInfoHelpers (
utils.go,call_option.go,interrupt.go):GenTransferMessages,WithSkipTransferMessagesPrebuilt agents (
supervisor/,planexecute/):supervisor.Config,supervisor.Newplanexecute.Config,planexecute.NewAlso includes a minor formatting fix for struct field alignment in
compose/graph_run.go(drift from priorFromGraphInterruptremoval).Test Results
All existing tests pass with
-race— no behavioral changes, comment-only updates.概要
NOT RECOMMENDED:建议性注释核心思路
Agent Transfer 及其全上下文共享模式在实践中并未被证明更有效。推荐使用
ChatModelAgent+AgentTool或DeepAgent。我们没有使用正式的Deprecated:标记(会触发 IDE 删除线和 linter 警告),而是选择NOT RECOMMENDED:—— 比NOTE:更强,但比Deprecated:更温和 —— 在不影响现有代码和工具链的前提下引导用户。变更内容
在
adk包的 9 个文件中为约 25 个导出 API 添加了NOT RECOMMENDED:文档注释,覆盖核心 transfer API、ChatModelAgent transfer 字段、Workflow Agent、辅助函数以及预构建 Agent(Supervisor、PlanExecute)。同时修复了
compose/graph_run.go中因先前移除FromGraphInterrupt字段导致的结构体对齐问题。测试结果
所有现有测试通过
-race检测 —— 仅注释变更,无行为变化。