agent_signal

Template library

Start from code that runs.

Only templates marked ✓ Tested have passed an end-to-end run.

“this is how resume works: a node that raised has no saved result, so it runs again, and side effects need an idempotency key (the tool call id works well).”
@eliornl, langgraph #9185
OpenAI Agents SDK · v0.24.0 · Python✓ Tested

Approval + resume & tool error formatting

Pause tool calls for human approval, checkpoint the run to a string, approve/reject, and resume. Plus the new run-wide tool_error_formatter that scrubs secrets from crashed tools.

#human-in-the-loop#durability#error handlingTested on openai-agents 0.24.0Free
OpenAI Agents SDK · 0.21.0 · JavaScript✓ Tested

Approval + resume in a fresh process (TypeScript SDK)

@openai/agents 0.21.0: needsApproval pauses the run, RunState goes to disk, a new Node process restores, approves and resumes. The tool runs exactly once.

#human-in-the-loop#durability#tool approvalTested on @openai/agents 0.21.0 · last tested Oct 28Free
LangGraph · 1.2.24 · Python✓ Tested

Human-in-the-loop approval graph

A propose → approval → execute StateGraph that pauses with interrupt(), saves the pause in a checkpointer under a thread_id, and resumes with Command(resume=...) down the approve or reject path.

#human-in-the-loop#checkpointingTested on langgraph 1.2.24 · last tested Nov 28 · also passed on langgraph 1.2.16 (Oct 18)Free
LangGraph · 1.2.24 · Python✓ Tested

Idempotent approval: no double charges on resume

Resume after interrupt() charged the card twice? LangGraph re-runs the paused node from the top. This template shows the bug and the fix: approval-only node, separate execute node, idempotency key derived from thread_id.

#human-in-the-loop#idempotency#checkpointingTested on langgraph 1.2.24 · last tested Nov 28Pro
OpenAI Agents SDK · v0.24.0 · Python✓ Tested

Idempotent approved side effects

The Agents SDK runs an approved tool once per resume, but side effects still repeat on a duplicate resume of the same RunState or a whole-run retry after a crash. Shows both failures (2 charges) and the fix (1 charge).

#human-in-the-loop#idempotency#durabilityTested on openai-agents 0.24.0Pro
LangGraph · 1.2.24 · Python✓ Tested

Multiple interrupts in one node

One node calls interrupt() three times and is answered one resume at a time (matched by position), plus two parallel nodes that interrupt in the same step and are resumed together with a dict keyed by Interrupt.id.

#human-in-the-loop#interruptsTested on langgraph 1.2.24 · last tested Nov 28 · also passed on langgraph 1.2.16 (Oct 18)Free
LangGraph · 1.2.24 · Python✓ Tested

Minimal web UI to approve paused runs

A stdlib-only web page (plain HTML forms, no JavaScript) that lists paused LangGraph runs and approves or rejects them with Command(resume=...), with 409/400/404 handling.

#human-in-the-loop#approval UITested on langgraph 1.2.24 · last tested Nov 28 · also passed on langgraph 1.2.16 (Oct 18)Free
Vercel AI SDK · 7.0.184 · TypeScript✓ Tested

Tool approval with generateText

generateText with the v7 toolApproval option: refunds over $100 pause as tool-approval-request, a human approves or denies, and the run resumes. Covers $50 auto-approved, $500 approved and $500 denied.

#human-in-the-loop#tool approvalTested on ai 7.0.184 · last tested Nov 28 · also passed on ai 7.0.143 (Oct 18)Free
Google ADK · 2.12.0 · Python✓ Tested

Tool confirmation step

An ADK agent whose transfer_money tool asks a human to confirm only large amounts (require_confirmation as a callable), then runs or rejects the original call in the same session.

#human-in-the-loop#tool confirmationTested on google-adk 2.12.0Free