Minimal HITL seam for external consumers: should ActionRequest carry tool_call_id? #2798
Replies: 1 comment
|
Good catch. Carrying The workaround today is to pull state = agent.get_state(config)
interrupt_val = state.tasks[0].interrupts[0].value
tool_call_id = interrupt_val.get("tool_call_id")The exact shape of On resume, pass it back as: agent.invoke(
Command(resume={"approved": True, "tool_call_id": tool_call_id}),
config,
)Exposing |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi! Really enjoying building with Deep Agents. Wanted to share one small thing we hit around the human-in-the-loop seam, in case it is useful signal.
We built a tiny external-consumer adapter around one paused approval flow. The pause-only artifact comes together nicely, the continuation anchor reads cleanly out of
agent.get_state(config), and we can emit everything before resume is ever called. That part was a joy to work against.One small friction point. To fill in
tool_call_idon our review artifact we have to correlate across two public surfaces:HITLRequest.action_requestscarriesname,args, anddescription.tool_call_idis only reachable viaagent.get_state(config)on the lastAIMessage.tool_calls[*].id.So the adapter bridges those two surfaces to emit one bounded
tool_call_idfor review purposes. It works fine, it just feels worth checking with you.Question: for external HITL consumers, is that cross-surface correlation the intended path, or would it be reasonable for
ActionRequestitself to carry the originatingtool_call_id?Thanks for building this, it has been great to work with.
All reactions