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

Aperta
#38 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@dhl123 ci sta già lavorando.

Dal 10/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
Lingua principale
Python
Stelle
17
Fork
6
Merge medio
4g 31m
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IBM/smith

Tutte le issue di IBM/smith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.