Agent approvals with Temporal or Inngest, or an approval service?

Temporal and Inngest wait durably for a signal. What they leave to you is the person's side: inbox, notifications, rules, limits, a pause switch, a record.

Facts checked . Written by the people who make VariantGate, so read our section with that in mind; every claim about another product links to its own pages.

The short answer

  • The engine alone if the person deciding already has a screen you built, such as your own app or admin tool, no routine case should be answered by a rule, and workflow history is record enough.
  • VariantGate alone if there is no long-running workflow: a script or agent asks, waits a few minutes at most, and acts on yes.
  • Both is the usual answer when you already run an engine: it waits and resumes, VariantGate decides who may say yes, tells them, and keeps the record.

A durable workflow engine makes waiting for a person easy to get right. Whether a wait for a Signal is enough depends on who the person is and what you will be asked later. Facts about Temporal, Inngest, Restate, Cloudflare Workflows and the Workflow SDK come from their own docs and pricing pages on 22 November 2026; we have not used them hands-on.

What the engine already solves

The hard part of waiting. A Temporal workflow can sit in condition() for days, an Inngest function in step.waitForEvent, and neither loses its place when a worker restarts or a deploy rolls through. Timers, retries and resuming exactly where the run stopped are what these engines are for, and no approval service replaces them.

What they hand back to you is everything on the person’s side of the wait. Temporal’s approval pattern says a separate interface sends the Signal, and its AI cookbook sends it from a command-line script. Inngest’s AgentKit example leaves messaging the person to a comment. That side is:

  • an inbox that works on a phone, and a notification by email, push, Slack, Teams or Discord that reaches someone who is not watching;
  • knowing who decided from their sign-in or the emailed link sent to them, so that whoever can send a Signal cannot also approve;
  • rules that answer routine cases at once, with amount limits and budgets that fail towards asking;
  • one switch that stops every agent, approvals already given included;
  • a record of every decision that you can show someone else.

What differs

Temporal, Inngest and VariantGate compared on the parts of a human approval
OptionTemporalInngestVariantGate
Waiting and resumingTemporalA Signal or an Update reaches the running workflow, which waits in condition(). State survives restartsInngeststep.waitForEvent or step.waitForSignal suspends the run. State survives restartsVariantGateNot a workflow engine. It keeps the request and its answer, not your agent's state; your code or your engine does the waiting
When nobody answersTemporalA timeout on condition() resolves to false; what that means is your codeInngestThe wait returns null; what that means is your codeVariantGateEvery request has an end, from 10 seconds to 7 days. Expired means no, checked when it is read
Where the person answersTemporalA separate interface you build; the AI cookbook sends the decision from a command-line scriptInngestNot described; AgentKit's example leaves messaging the person to a commentVariantGateWeb inbox, email, push, Slack, Microsoft Teams and Discord, with a page that works on a phone
Who decidedTemporalWhatever the Signal carries; the approval pattern says to validate the approver yourselfInngestWhatever the event carriesVariantGateThe signed-in person, or the member an emailed link was sent to; never the request body, and an agent key cannot decide anything
Rules for the routineTemporalCode in your workflowInngestCode in your functionVariantGateAllow, ask or deny by action and agent key, with amount limits and budgets per day, week or month (Pro)
Stopping every agentTemporalNot part of the wait; a check you would addInngestNot part of the wait; a check you would addVariantGateA pause switch turns every answer into no, even ones already given; any member may pause, only an owner resumes
The recordTemporalSignals are kept in workflow history, with whatever data you sentInngestTrace history for 24 hours on Free, 7 days on Pro, 14 days on BusinessVariantGateA sealed record of every decision: who, when, by which rule, what was changed, and how it went
PriceTemporalTemporal Cloud from $0 a month plus 10% for support, $50 per million Actions; the server is MIT-licensedInngestFree: 50,000 executions a month. Pro from $99 a month for 1M; self-hosting supportedVariantGateFree: 1 person, 100 requests a month. Pro €9 a month with webhooks. Team €15 per person a month, or per request

Both together: a Temporal workflow that asks first

A refund workflow asks VariantGate in an Activity, waits for a Signal that a small webhook route sends, and refunds only on an explicit yes. Imports are left out: ApprovalClient from @variantgate/agent, Decision from @variantgate/agent/types, ApprovalApiError from @variantgate/agent/errors, verifyWebhook from @variantgate/agent/webhook, the workflow functions and Client from Temporal’s SDK, and ApplicationFailure from @temporalio/common.

// vg.ts: one agent key for the worker and the webhook route,
// since a key can read only its own requests.
export const vg = new ApprovalClient({
  agent: "refunds", apiUrl: "https://api.variantgate.com", key: process.env.VARIANTGATE_KEY ?? "",
});

// activities.ts: the workflow's only contact with VariantGate and with money.
const toAnswer = (d: Decision) => ({
  expiresAt: d.expires_at, id: d.id, pending: d.status === "pending", yes: d.allowed === true && !d.changed,
});
const vgCall = <T,>(call: Promise<T>) => call.catch((e) => {
  const refused = e instanceof ApprovalApiError && e.status >= 400 && e.status < 500 && e.status !== 429;
  throw refused ? ApplicationFailure.nonRetryable(e.message) : e; // a 4xx will not get better on retry
});
export const ask = async (order: Order, workflowId: string) => toAnswer(await vgCall(vg.ask({
  action: "payment.refund", amount: order.amount, currency: "EUR", ttlSeconds: 24 * 3600,
  details: { order: order.id, workflowId }, summary: `Refund €${order.amount} for order ${order.id}`,
})));
export const read = async (id: string) => toAnswer(await vgCall(vg.check(id)));
export const withdraw = async (id: string) => { await vgCall(vg.withdraw(id)).catch(() => undefined); };
export const refund = async (order: Order, requestId: string) => {
  // Retries can run hours later: ask again each time, so a pause or a change still stops it.
  if (!toAnswer(await vgCall(vg.check(requestId))).yes) return "not refunded";
  if ((await payments.refundsFor(order.id)).length > 0) return "already refunded"; // the provider's own list
  await payments.refund({ amount: order.amount, idempotencyKey: requestId });
  return "refunded";
};

// workflow.ts
const { ask, read, refund, withdraw } = proxyActivities<typeof activities>({ startToCloseTimeout: "1 minute" });
const decided = defineSignal("decided");

export async function refundOrder(order: Order): Promise<string> {
  let woken = false;
  setHandler(decided, () => { woken = true; }); // set before asking, so an early signal counts
  let answer = await ask(order, workflowInfo().workflowId); // a rule may answer at once
  const until = Date.parse(answer.expiresAt); // Date.now() is replay-safe inside a workflow
  while (answer.pending && Date.now() < until) {
    await condition(() => woken, "1 hour"); // the webhook wakes it; otherwise look every hour
    woken = false;
    answer = await read(answer.id); // the answer comes from the API, never from the signal
  }
  if (answer.pending) {
    await withdraw(answer.id); // out of time: take the question back
  }
  if (!answer.yes) {
    return "not refunded"; // denied, expired, withdrawn, paused, changed, or still no answer
  }
  return await refund(order, answer.id);
}

// webhook.ts: a route in your web app
const temporal = new Client(); // connection options left out

export async function POST(request: Request) {
  const body = await request.text(); // the raw body, before any JSON parsing
  const secret = process.env.VARIANTGATE_WEBHOOK_SECRET ?? "";
  const event = await verifyWebhook(secret, request.headers, body).catch(() => null);
  if (!event) {
    return new Response("bad signature", { status: 400 });
  }
  if (event.type !== "webhook.test") {
    // The event says something happened. Read the request to learn what, and for which run.
    const decision = await vg.check(event.data.request_id).catch(() => null);
    const workflowId = decision?.details.workflowId;
    if (decision && decision.status !== "pending" && typeof workflowId === "string") {
      await temporal.workflow.getHandle(workflowId).signal("decided").catch(() => undefined);
    }
  }
  return new Response(null, { status: 204 });
}

Only allowed: true, read from the API, moves money. Pending, denied, expired, a pause and a wait that runs out all end in “not refunded”.

  • The first answer may already be final. A rule can allow or deny the request the moment it is made, so the workflow checks pending before it waits at all. The signal handler is set before asking, so a webhook that lands before the wait still counts.
  • The webhook is a nudge. It carries no allowed and no details. The route checks the signature, reads GET /v1/requests/{id} to find out what happened and which run asked (the workflow id is in the request’s details), and wakes that run. The run then reads the request again itself, so a pause that came after the decision still stops it.
  • The same agent key on both sides. Webhooks cover the whole workspace, but a key reads only its own requests. Another agent’s request reads as not found, and the route does nothing.
  • A lost webhook only makes it slower. The workflow looks every hour anyway, until the request’s own expiry time. The request lives 24 hours, so after that it reads as expired, and expired means no refund. A request still open at the end is withdrawn.
  • Retries are safe. Temporal retries Activities with no limit by default, and a refund cut off halfway runs again, maybe hours later. So each attempt reads the approval again first (a pause in the meantime stops it), then asks the payment provider, not your own database, whether the order was already refunded, and keys the refund on the request id. A 4xx answer from VariantGate is not retried. A retried ask can leave an extra request in the inbox; nothing ever acts on it, and it expires as a no.
  • An approval with changes is not done. If the person lowered the amount, changed is true and this code, which can only do what it asked, stops. To honour the change, refund approved_amount instead. Call reportOutcome afterwards to put how it went on the record.

The same in Inngest and the others

Inngest. Ask in a step.run, and if the answer is still pending, wait in step.waitForEvent for an event your webhook route sends with inngest.send, matched on the request id with if. One thing differs from Temporal and matters here: the wait only sees events sent after it starts listening. A rule that answers while the run is between the two steps is missed, so treat null as “read the request now”, not as “no answer”. step.waitForSignal wakes one run directly by a signal string.

Cloudflare Workflows. step.waitForEvent throws when it times out and keeps an event that arrives before the wait. Our Cloudflare Agents page has a full refund workflow that we ran.

Restate. ctx.awakeable() gives an id to hand to the webhook route, which resolves it over HTTP; orTimeout adds the deadline. The Workflow SDK: createHook in the workflow, resumeHook in the route, raced against sleep. Its docs warn that knowing a hook’s token does not make the caller an approver, which is the person’s side again.

Cost for 2,000 approvals a month

Take a team of five and 2,000 refund approvals a month, run as in the sample. Each one costs Temporal about six Actions (the start, three Activities, a timer and a Signal), so 12,000 Actions, which is $0.60 at $50 per million on pay-as-you-go, plus 10% for support. On Inngest a run with three steps is four executions, five if the wait counts too (its pricing page does not say), so at most 10,000 of the free 50,000. Both list prices in US dollars.

VariantGate’s Team plan is €15 per person, so €75 a month for five. Paid per request it would be €100 (2,000 at €0.05, rule answers included), so per person is cheaper here. One person alone needs Pro at €9 a month, which includes webhooks. See pricing. The engine’s bill is not what decides this; the time to build and keep the person’s side is, and building it yourself lists what that involves.

Which one, case by case

  • An order pipeline in Temporal needs a manager’s yes for discounts, and you already have an internal admin app. Temporal alone. Add an Approve button to the admin app that sends an Update, which can refuse an approver who is not allowed to decide.
  • A support agent in Inngest refunds small orders alone and asks above €50. Both. A VariantGate rule answers the small ones at once, with a daily budget, and the rest wait in Inngest for a person who gets a push or a Slack message. See the refunds guide.
  • Your SaaS lets customers approve what their own agents do, inside your product. The engine alone. The screen is part of your product, and an outside inbox would be the wrong shape.
  • Agents run in Temporal, in Claude Code on laptops and in an n8n flow. VariantGate, with Temporal waiting for the workflow ones. Everyone asks in one place under one set of rules, and one record answers who allowed what.
  • A short script asks before a deploy and then exits. No engine needed. The SDK waits up to 30 seconds per call and keeps reading until the request ends.

Where each falls short

VariantGate does not run your workflow: it keeps no agent state, retries nothing and restarts nothing, so for long waits you still want an engine or your own store. It is one more service on the path of every action, and when it cannot be reached agents stop rather than go ahead. Webhooks need Pro, it is hosted unless you are on Enterprise with self-hosting, and making a request takes no idempotency key, so a retried ask can leave a stray request that expires unused. It is also new, public since November 2026.

Temporal does what VariantGate does not try to: durable state, timers, retries without limit, and an MIT-licensed server you can run yourself. For approvals it gives you the wait and the history, and the rest is yours: the screen, the notifications, checking who may approve, rules for routine cases, limits on amounts and a way to stop everything.

Inngest has a free tier of 50,000 executions a month and can be self-hosted. The same person’s side is left to you, its trace history is kept for 24 hours to 14 days depending on the plan, and a decision that arrives before waitForEvent starts is not seen by it.

Using a framework’s pause rather than an engine? Human-in-the-loop agent frameworks compared covers LangGraph, the OpenAI Agents SDK and the coding agents, and approval webhooks for AI agents goes further into receiving events safely. The webhooks docs list every event.

Sources

  1. Temporal TypeScript SDK, message passing: defineSignal, setHandler, sending a Signal from a client by definition or by name, only to a Workflow that has not closed; Updates return a result and can be rejected by a validator.
  2. Temporal TypeScript API reference: condition(fn, timeout) resolves to whether the condition became true before the timeout; durations are milliseconds or an ms-style string.
  3. Temporal approval pattern: a Signal with the approver's decision, a wait with a timeout, Signals kept in Workflow history; a separate approval interface sends the Signals, and approvers should be validated.
  4. Temporal AI cookbook, human-in-the-loop agent: the decision is sent as a Signal from a command-line script, the default wait is 5 minutes, and the notification step only prints to the worker's terminal.
  5. Temporal retry policies: Activities retry by default with exponential backoff and no limit on attempts; Workflows do not retry unless given a policy.
  6. Temporal Cloud pricing, in US dollars, billed monthly: pay-as-you-go from $0 plus support at 10% of usage, Business from $500 a month with 2.5M Actions, $50 per million Actions for the first 5M; Activities, timers and Signals each count; $150 of credits for 90 days.
  7. Temporal server source code on GitHub, under the MIT license.
  8. Inngest, wait for an event: returns the matching event or null when the timeout passes; only sees events sent after it starts listening; a person approving work is a listed use.
  9. Inngest step.waitForEvent reference: event, timeout, and match or if (a CEL expression comparing the trigger and the awaited event).
  10. Inngest step.waitForSignal reference: resume one run by a unique signal string, sent with inngest.sendSignal or step.sendSignal.
  11. Inngest AgentKit, human in the loop: a tool calls step.waitForEvent with a 4-hour timeout; messaging the person is left as a comment in the example.
  12. Inngest pricing, in US dollars: Free with 50,000 executions a month, Pro from $99 a month with 1M, Business from $499 with 10M; a run with five steps is six executions; trace history 24 hours to 14 days by plan.
  13. Inngest self-hosting, supported since its 1.0 release.
  14. Restate TypeScript SDK, awakeables: ctx.awakeable() returns an id and a promise, resolved from another handler or over HTTP; human approvals are a listed use.
  15. Restate durable timers: orTimeout on a RestatePromise throws a TimeoutError when time runs out.
  16. Cloudflare Workflows, events: step.waitForEvent waits 24 hours by default, up to 365 days, throws on timeout, and keeps an event sent before the wait for it.
  17. Workflow SDK hooks: createHook and resumeHook, raced against sleep for a timeout; knowing a hook's token does not authorise the caller.

See it before you decide.

The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.