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

Đang mở
#38 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@dhl123 đang làm issue này rồi.

Từ ngày 10/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
Python
Star
17
Fork
6
Merge trung bình
4 ngày 31 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IBM/smith

Tất cả issue của IBM/smith

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.