Framework integrations

Confirm works in any agent framework: TypeScript stacks use the SDK (@confirm/sdk), and everything else makes the same plain HTTPS calls. The pattern is always the same: gate your dangerous action behind a human, and only execute what they approved. These guides walk through it step by step:

On TypeScript, guard() from the SDK wraps your whole tool layer with policies (fail-closed, so nothing slips through unwrapped). The Python guides use raw HTTP today (a Python SDK is coming); anywhere you can define a tool and make an HTTPS request, the same three steps apply: create the request, wait for the verdict, execute effectivePayload. The API reference has the raw contract.

The shape of every integration

  1. Gate tools, not agents. Wrap only the irreversible call (the refund, the send, the DROP TABLE). Read-only tools shouldn't pay approval latency.
  2. Block or resume. Framework tools expect a synchronous return, so create the request and wait for the verdict. On TypeScript the SDK does this for you (guard(), or createAndWait); the Python guides use a small poll loop. For agents that can suspend and resume (queues, LangGraph checkpoints, durable execution), skip polling and resume on the webhook instead.
  3. Execute effectivePayload. The human may have edited the action. Their version is the approved one, and it's always in that field.
  4. Return rejections as text. The rejection note is context the model can re-plan with ("billing still reads that table"). Don't throw; explain.
  5. Set a short ttlMinutes. A blocking tool should fail safe after an hour, not hang a run overnight.
  6. Park state for long waits. If approval can take hours, don't hold the agent's memory in a process. Pass serialized context as agentState (≤256KB) on create; the webhook returns it and a fresh worker rehydrates. Details in Webhooks.
All the guides gate on a threshold and escalate big actions with notify: "group:finance". Groups are Pro and up; on Hobby, use a single email and everything else works identically. See Teams & approval groups.