feat: support multi-tool ReAct agents in test-case translation

未关闭
#38 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 4 天内回复

@dhl123 已经在做这个了。

开始于 2026年9月10日。

评估

这个 Issue 还没有评估数据。

描述

enhancement
Summary

For ReAct agents (e.g., employee hub), the current /extract_tool_call endpoint only returns the first tool call from a single LLM inference. This causes false mismatches — a prompt targeting update_passport gets classified as get_passport because the agent's first step is a lookup before the mutation.

This PR adds a react agent mode that:

  • Calls /chat (full agent execution) instead of /extract_tool_call
  • Returns all tool calls made during the ReAct loop
  • Uses the last tool call as the target tool name
  • Snapshots and restores user-declared protected resources (DB files) between each test case to prevent state pollution
Plan
  • Add env config — AGENT_MODE (simple|react) and PROTECTED_RESOURCES (comma-separated file paths relative to TARGET_AGENT_PATH)
  • Modify /chat response in employee agent — return tool_calls: [{name, args}, ...] alongside the text response
  • Add run_extract_tool_args_react() in extract_tool_args.py — snapshot resources → call /chat → take last tool call → restore resources → same comparison logic
  • Wire up in CLI — read new env vars, dispatch to react or simple path
主要语言
Python
星标
17
派生
6
平均合并
4 天 31 分钟
30 天内合并 PR
16

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

IBM/smith 的其他 Issue

查看 IBM/smith 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。