A windswept bonsai on a floating island

Get to know Cadenya

We’re developers who love to build. We set out to create a yes-code platform that makes building agents feel like the best parts of building software.

Restate vs Temporal for AI agents (2026)

Durable execution

By Cadenya

Temporal and Restate are durable execution engines, and for an AI agent they do the same job: the run survives a crash, a deploy, or a human-in-the-loop wait for approval. The difference is what you self-host. Temporal is four services and a database. Restate is one binary that keeps its own state.

So pick Temporal when you want an MIT license and the choice of pinned or auto-upgrading versions. Pick Restate when you’d rather run one process and the Business Source License works for you. And if you’d rather self-host neither, Cadenya is a hosted agent loop with durable execution and approvals built in, and a coding agent can set it up with no account, in a temporary workspace you claim later. What it offers is at the end.

Every price and limit below comes from each vendor’s own pages, checked on September 28, 2026.

Restate and Temporal side by side

TemporalRestateCadenya
What you run yourselfFour services (Frontend, History, Matching, Worker) and a database: PostgreSQL, MySQL, or CassandraOne binary that stores its own state. A cluster adds an S3 bucket for snapshotsNothing. The loop runs on Cadenya
Managed optionTemporal Cloud, from $0 a month, pay as you goRestate Cloud, a free tier, then from $75 a monthHosted: free for 1,000 loops a month, then from $49 a month
What you pay forActions ($50 per million for the first 5 million), storage, supportDurable actions, one per started 64 KiB of payloadLoops: one per LLM request, then $0.0015 a loop
The waiting primitiveSignals, Updates, and durable timersAwakeables (durable promises)Tool approval: the objective pauses on toolApprovalRequested
Code that changes while runs waitWorker Versioning (pinned or auto-upgrade) and patchingImmutable deployments: a run ends on the version it started onEach objective keeps its variation’s configuration snapshot
Server licenseMITBusiness Source License 1.1, Apache 2.0 four years after each releaseNo server to license. SDKs are Apache-2.0
SDKsGo, Java, Python, TypeScript, .NET, Ruby, PHPTypeScript, Java and Kotlin, Python, Go, RustTypeScript, Python, Ruby, Go, plus a CLI and an HTTP API
Latest server releasev1.32.0v1.7.12, September 22, 2026Not applicable: hosted. SDKs at 1.9.0

Self-hosted or managed: what you run

Temporal’s server is four services that scale on their own: Frontend, History, Matching, and Worker. The only hard dependency is a database. Temporal tests Postgres (PostgreSQL 13 to 16), MySQL 8.0.19 and later, and Cassandra. Searching across runs (Temporal calls it Visibility) works on SQL from server 1.20, and Temporal recommends Elasticsearch in production.

Restate ships “as a single binary that implements all features required to run a single- or multi-node cluster.” It keeps its state on local disk, so a single node needs a persistent volume and nothing else.

What does the single binary give up? Restate’s own docs name two things. Scaling a cluster is “an operator-driven procedure rather than something to put behind an autoscaler”, capped by the partition count you choose at the start. And a single node “cannot remain available during its restart.”

In both cases, your agent code runs in workers or services you host. Temporal Cloud and Restate Cloud run the engine, not your code.

Human-in-the-loop approvals: how a run waits

Both engines park the run and spend no compute while it waits.

In Temporal, the workflow waits on a condition, and a Signal from your app flips it:

import { condition, defineSignal, setHandler } from '@temporalio/workflow';

export const decide = defineSignal<[boolean]>('decide');

export async function refundApproval(refundId: string): Promise<string> {
  let approved: boolean | undefined;
  setHandler(decide, (value) => {
    approved = value;
  });

  // Pass a timeout such as '7 days' as a second argument to expire the wait.
  await condition(() => approved !== undefined);
  return approved ? `refund ${refundId} sent` : `refund ${refundId} denied`;
}

Temporal’s AI cookbook says that “while waiting, the agent consumes no compute resources.”

In Restate, the handler creates an awakeable, hands its ID to the reviewer, and awaits the promise:

import * as restate from '@restatedev/restate-sdk';

// Your code: post the ID to Slack, an email, or a dashboard row.
declare function notifyReviewer(refundId: string, awakeableId: string): Promise<void>;

export const refundAgent = restate.service({
  name: 'refundAgent',
  handlers: {
    approve: async (ctx: restate.Context, refundId: string) => {
      const approval = ctx.awakeable<boolean>();
      await ctx.run('ask reviewer', () => notifyReviewer(refundId, approval.id));
      const approved = await approval.promise;
      return approved ? `refund ${refundId} sent` : `refund ${refundId} denied`;
    },
  },
});

The reviewer’s click resolves it over HTTP:

curl localhost:8080/restate/awakeables/sign_1M28aqY6ZfuwBmRnmyP/resolve --json 'true'

“If you wait for more than a minute, the invocation will get suspended.” A timer added with orTimeout survives restarts with the right time left on it.

Versioning: deploying while runs wait

This is where the two differ most for an agent that waits for a person.

Temporal lets you choose per workflow. A Pinned workflow “is guaranteed to complete on a single Worker Deployment Version.” An Auto-Upgrade workflow moves to the new version when you deploy, and you keep it replay-safe with patching. Pinned runs keep their old version draining until the last one closes.

Restate makes every deployment immutable: “Restate then makes sure that requests start and end on the same version.” Your code needs no version checks. The catch is on the same page: “you need to keep old deployments around until all invocations complete.”

Pricing

Temporal Cloud has no base fee. It’s “from $0/month”, billed on Actions ($50 per million for the first 5 million, less after that), on storage, and on support at 10% of usage. New accounts get $150 in credits that expire after 90 days. The Business plan starts at $500 a month with 2.5 million Actions included. Self-hosted Temporal is free under MIT, and you pay for the servers and the time.

Restate Cloud has a free tier. Its pricing FAQ says 100,000 durable actions a month, and its Cloud page says 50,000, so check the page when you sign up. Paid plans start “from $75 /mo.” Every step, sleep, call, and awakeable counts as an action, one per started 64 KiB of data. Self-hosting is free under BSL 1.1, which only forbids offering Restate itself as a public platform service.

For an agent that runs a few thousand times a month, neither bill is the big number. Restate fits in its free tier and Temporal Cloud costs a few dollars. The big numbers are the workers you run and the loop you write. The Temporal cost breakdown walks through a worked example.

What you still write for an AI agent

Neither engine is an agent. Both run your code durably, and your code is the agent: the loop that calls the model, the tool calls, the stream to your UI, the context compaction, and the screen where someone approves.

Both ship help for that. Temporal’s integration with the OpenAI Agents SDK runs the agent loop inside a workflow and each model call as an activity (it needs Python 3.10 or later), and Temporal lists integrations for the AI SDK by Vercel, LangGraph, Mastra, Pydantic AI, Spring AI, and more. Restate’s AI patterns cover the Vercel AI SDK, the OpenAI Agents SDK, Google ADK, Pydantic AI, and LangChain.

Cadenya runs all of those for you.

What does Cadenya offer that Restate and Temporal don’t?

Restate and Temporal run your code as durable workflows with human-in-the-loop approval waits, and your code still has to be the agent. Cadenya is the agent: durable execution, human-in-the-loop approvals, and the loop around them, with nothing to self-host. Here’s what that covers:

  1. Nothing else to run. No cluster, no server, no binary, no workers, and no sidecar. The loop runs on Cadenya and your app stays a stateless web tier, so your deploys and restarts never touch a running objective.
  2. The agent loop, already written. Cadenya calls the model, runs the tools, streams each reply, and compacts the context window when a conversation gets long. On Restate or Temporal, that’s the code you’d write, test, and version.
  3. No old code to keep alive. An objective keeps its variation’s configuration snapshot even when you edit the variation, so there’s no worker code to pin or patch. Restate and Temporal both need old code running until the runs that started on it finish.
  4. Tools generated from your OpenAPI spec. Point a tool set at an OpenAPI 3 document and every operation becomes a tool, with no OpenAPI-to-MCP generator to run and no hand-written tool list to keep in sync. Cadenya re-checks the document each hour, filters the list, and loads tools on demand, so a big API doesn’t fill the context window. MCP servers and plain HTTP endpoints work too.
  5. Human-in-the-loop approvals, screen included. Mark a tool as needing approval and the objective pauses on toolApprovalRequested, and the answer can come from your backend through the API, a webhook handler that posts to Slack, or a person in the React chat widget. A denial can carry a memo that steers the agent (“Offer store credit instead”).
  6. Any model, on your own keys. The model is a setting on a variation, not a line of code, so switching providers needs no deploy. Use any model on OpenRouter or your own endpoint that speaks the OpenAI chat format, and pay your provider directly. Weighted variations route more traffic to whichever model or prompt users rate higher.
  7. Resumable streaming. The event stream honors Last-Event-ID, so a dropped connection picks up where it left off, and the TypeScript SDK reconnects on its own.
  8. Acting on behalf of the signed-in user. A widget session can carry the user’s short-lived token as a secret that overrides the shared API credential, so your API sees that user’s token on each tool call. Pinned parameters fix the IDs the model can’t change.
  9. SDKs for the versions you run today. TypeScript on Node 18, Python 3.9, Ruby 3.1, and Go 1.22, all at 1.9.0 and Apache-2.0, plus a CLI and a plain HTTP API. Temporal’s Ruby SDK needs Ruby 3.2 at least, and its OpenAI Agents SDK integration needs Python 3.10.
  10. A price in one line. Free for 1,000 loops a month, $49 a month for 50,000, then $0.0015 a loop. A loop is one LLM request, so an agent turn that calls the model 6 times is 6 loops. There are no seats, and no server license like Restate’s BSL to check, since you host no server.

How objectives work walks through an agent turn, and the free plan needs no card.

No account yet? A coding agent can create a temporary workspace with cadenya workspaces create --temporary, run its first objectives there, and hand you a link to claim it, as auth.md explains. To create an account, sign up at app.cadenya.com/signup, then copy your API key from the API keys page at app.cadenya.com/account/apiKeys.

Grow wherever AI goes next.

Start shipping agents that are equipped to evolve.

A pine bonsai overlooking a mountain lake