cloudwego / cloudwego/eino

ADK ChatModelAgent 支持基于 tool 执行结果动态终止 ReAct 循环

Open
#1,187 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13k
Forks
1.1k
Avg merge
4h 6m
Merged PRs (30d)
41

Description

在使用 ADK 的 NewChatModelAgent 构建 agent 时,希望能根据 tool 的执行结果动态决定是否终止 ReAct 循环并直接返回该 tool 的结果,而不是在构建 agent 时静态配置 ToolsConfig.ReturnDirectly 。

这是一个常见的需求场景,例如:

- tool 执行后发现结果已经是最终答案(如查询类 tool 命中缓存、检索类 tool 召回质量足够好)
- tool 执行后根据业务规则判断无需再调用 LLM 做后续推理
- 同一个 tool 在不同参数下,有时需要继续 ReAct、有时应该直接返回

Contributor guide

Open the contributing guide

Research direction

Start at the ADK NewChatModelAgent entry point and the ToolsConfig.ReturnDirectly configuration, then trace how tool execution controls the ReAct loop. Done means a tool’s result can dynamically choose between continuing the loop and returning directly; the issue does not name implementation files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ai
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.