Every step you take, every call you make: the reliable agent stack — Giselle van Dongen, Restate

Read the talk

Every step you take, every call you make: the reliable agent stack

Giselle van Dongen shows how Restate gives long-running agents journal-based recovery, suspended human approvals, isolated session state, midflight signals, cancellation, and shared infrastructure controls.

From a talk by Giselle van Dongen

At a glance

Ideas worth remembering

  • Reliable agent infrastructure separates four concerns: recoverable execution, consistent concurrent sessions, distributed communication, and deliberate execution control.

  • Journaled durable steps preserve completed progress through failures, and durable promises use the same mechanism to suspend human-approval waits across restarts and redeployments.

  • Virtual objects isolate state by session key and serialize updates within a session; execution IDs separately make active runs retrievable, signalable, and cancellable.

  • Signaling can amend work already in progress, while cancellation unwinds active subagents and controllers. Completed external side effects still require application-specific compensation.

  • Moving inline model calls into a shared gateway creates one place for policy checks and concurrency limits, such as the example limit of 300 simultaneous calls per department.

  • The distributed log and event loop connect journal events to state updates, timers, and service requests; push-based dispatch is intended to reduce latency and wake serverless functions directly.

Persistent agents change the infrastructure problem

A question-answering model can finish in seconds. A tool-using application may stay active for a session. The next step is harder: persistent, asynchronous agents that remain in an organization’s infrastructure, use tools and context, and communicate with other agents. Once work becomes long-running, stateful, and distributed, the surrounding infrastructure must survive failures and connect components that no single agent SDK owns.

Recording frame at 123 secondsOpen full source frame
Recording frame at 123 seconds

Agent SDKs and memory can accelerate a proof of concept, but production systems still need retries, recovery, state consistency, communication, and operational control. Restate is presented as an open-source foundation for those backend concerns rather than an agent framework. Its ideas draw on Apache Flink and work by architects associated with Meta’s event infrastructure.

0:120:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Four jobs underneath the agent loop

The infrastructure layer has four distinct jobs. Durable execution preserves a run through failure instead of restarting a week-long task. Session consistency lets thousands of conversations proceed without corrupting one another’s state. Distributed communication connects agents, MCP servers, and tools. Execution control stops work that is stuck or no longer wanted. Recovery preserves desired work; cancellation deliberately ends it.

Recording frame at 218 secondsOpen full source frame
Recording frame at 218 seconds

Restate runs as a separate server in front of the agent service, acting somewhat like a proxy or message broker. It pushes an invocation to the service and keeps an open connection that van Dongen calls a “lifeline.” As the service works, operations emit events to Restate. Those events form a journal from which the execution can be reconstructed after a failure.

What relationship does that journal create between an ordinary request and a recoverable agent run? The flow below makes the persistence boundary visible: application work produces journal entries before later recovery depends on them.

The result is intended to feel like an ordinary application function while gaining long-running execution and state. The demonstration applies that model to a Slack research agent available to employees inside a company.

The journal is the recovery path

Incoming requestA request targets the agent service through Restate.
Restate serverinfrastructure — Proxies and pushes the invocation while maintaining the connection.
Agent serviceapplication — Runs application logic and emits events as durable operations occur.
Execution journalinfrastructure — Persists the event history used for recovery.
Recovered executionapplication — Continues from recorded progress rather than restarting the whole run.
Restate pushes work to the agent service, records events emitted through the open connection, and uses those persisted events to resume after failure.
Read the diagram as text
  • Incoming request. A request targets the agent service through Restate.
  • Restate server. infrastructure — Proxies and pushes the invocation while maintaining the connection.
  • Agent service. application — Runs application logic and emits events as durable operations occur.
  • Execution journal. infrastructure — Persists the event history used for recovery.
  • Recovered execution. application — Continues from recorded progress rather than restarting the whole run.
  • Incoming request → Restate server: enters.
  • Restate server → Agent service: pushes invocation.
  • Agent service → Execution journal: emits events.
  • Execution journal → Recovered execution: replays recorded progress.
2:423:12
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:42 · section reference included

A month-long wait without a month-long function

Durability also handles intentional inactivity. A human approval may take weeks or a month, spanning service restarts and redeployments. Keeping a conventional function active for that entire period would tie the workflow’s lifetime to one process invocation.

Restate instead creates a durable promise in the journal. The promise marks a suspension point; Slack presents the approval button, and the function suspends while it waits. On serverless infrastructure, van Dongen says the suspended process consumes no function execution time. When approval arrives, the promise resolves and execution resumes where it stopped. The claim concerns serverless execution time during the wait, not the absence of storage or platform operating costs.

This works well for a sequence of durable steps, but a persistent agent needs more than a workflow-shaped history. It also needs an identity, memory, and a way to accept new input while work is already underway.

8:128:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:12 · section reference included

Virtual objects turn sessions into stateful actors

Restate models that persistent entity as a virtual object, similar to a stateful actor. Each object has a unique key such as a session ID, isolated key-value state such as message history, and handlers that can run durable functions for the session. A user can therefore add context while research is underway instead of waiting ten minutes for the first run to finish.

Recording frame at 680 secondsOpen full source frame
Recording frame at 680 seconds

Isolation alone does not prevent two messages in the same session from racing. If both handlers updated the same conversation state concurrently, one could overwrite the other. The session controller prevents this by allowing one execution at a time for a given object key; another execution waits in a queue behind it. Separate sessions can still run concurrently, but serialization within one session trades some per-session latency for consistent updates.

9:129:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:12 · section reference included

Signal relevant context; cancel a new direction

A session ID addresses persistent conversation state. A separate execution ID addresses one active run. Other processes can use that execution ID to retrieve output, send a signal containing new state, or cancel the run. Together, the two identities let a controller remember the conversation while directly contacting the particular research execution already in flight.

Recording frame at 813 secondsOpen full source frame
Recording frame at 813 seconds

The application adds an LLM classifier on top of those control primitives. When a new Slack message arrives, the classifier asks whether it is relevant to the current research. Relevant context is sent as a signal; unrelated context causes cancellation followed by a new run. Restate supplies addressability and control, while the classifier makes the application-level routing decision.

The first follow-up—“focus on frontier models”—stays within the original “What is new in AI?” assignment. The controller classifies it as relevant and injects it into the active loop. The UI then shows the message entering the research execution, which takes the added focus into account and starts its work again. The talk does not evaluate classifier accuracy or establish precisely how much prior research is reused after this signal.

The second follow-up changes the assignment: “Forget about that. Research AI policy.” The coordinator cancels the existing run and starts a new one. Cancellation travels through the call chain, stopping spawned subagents before the controller unwinds. This can give application code an opportunity to roll back, but stopping execution does not by itself reverse external effects that have already completed.

What decides whether a live run is amended or replaced? The comparison below separates the classifier’s semantic choice from Restate’s execution mechanisms.

Routing a follow-up into an active session

New Slack messageAdditional context arrives while research is active.
Relevance classifiercontroller — An LLM decides whether the message belongs to the current task.
Signal active executioncontinue — Injects relevant state through the execution ID.
Cancel call chainreplace — Stops subagents before unwinding the controller.
Start replacement runreplace — Begins research for the newly requested topic.
The controller classifies new input, then either signals the addressed execution or cancels its call chain and starts a replacement.
Read the diagram as text
  • New Slack message. Additional context arrives while research is active.
  • Relevance classifier. controller — An LLM decides whether the message belongs to the current task.
  • Signal active execution. continue — Injects relevant state through the execution ID.
  • Cancel call chain. replace — Stops subagents before unwinding the controller.
  • Start replacement run. replace — Begins research for the newly requested topic.
  • New Slack message → Relevance classifier: classify.
  • Relevance classifier → Signal active execution: still relevant.
  • Relevance classifier → Cancel call chain: new direction.
  • Cancel call chain → Start replacement run: after unwinding.
11:2711:57
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:27 · section reference included

Move shared model controls into a gateway

Production requirements rarely stop changing after the first deployment. If a newly adopted model is good but expensive, an inline LLM call offers no convenient place for organization-wide controls. Restate’s programming model allows that call to move from a local Python step into a separate handler without changing the broader durable-execution model.

Recording frame at 994 secondsOpen full source frame
Recording frame at 994 seconds

That handler becomes an LLM gateway. It can run a policy check before calling the provider, while agents invoke it through Restate’s distributed communication primitives. Flow control can then limit one department to 300 simultaneous calls. This bounds concurrency rather than total spending, but it creates one enforceable location for policy and capacity controls instead of duplicating them across every agent.

Van Dongen also presents the foundation as able to recover from infrastructure failures such as network partitions and zombie failures. Those capabilities are stated here rather than demonstrated; the demo’s directly observable recovery case is the failed web-search retry.

14:5715:27
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

14:57 · section reference included

The distributed log underneath the programming model

Under the SDK, Restate uses an event-driven distributed log between clients and services. The log persists journal events, while an event loop interprets them. Depending on the event, it may update an embedded state store, set a timer, or send a request to another agent. The same substrate therefore backs recorded function steps, session state, suspension points, and distributed calls.

Recording frame at 1060 secondsOpen full source frame
Recording frame at 1060 seconds

What turns the journal into actual application behavior? The diagram shows the event loop dispatching persisted events into three different effects rather than treating the log as passive history.

A notable architectural choice is push-based invocation. Van Dongen contrasts it with workflow workers polling a server for new tasks: Restate sends the request directly to the target service, which also fits serverless functions that wake on incoming requests. She reports 45 milliseconds at p99 for a 10-step workflow, but supplies no benchmark setup, workload, or deployment conditions, so the figure should be read as a reported example rather than a general latency guarantee.

The server packages the state store and UI in one binary. A highly available deployment is described as multiple instances snapshotting to object storage, although the talk does not detail replication, coordination, or restoration. Adoption options include six SDKs, integrations with popular agent frameworks, direct use with arbitrary LLM SDKs, open-source self-hosting, deployment into a customer’s cloud account, and a managed cloud. Keeping Restate in the customer account can keep this layer’s data there; external tools and model providers remain separate data paths.

The closing lesson is narrower than “use a workflow engine for every agent.” Persistent agents need recoverable steps, addressable sessions, communication with live work, and a reliable way to stop it. Putting those mechanics beneath the agent loop lets the application evolve—from an inline LLM call to a governed gateway—without rebuilding retries, state management, and control each time.

From journal event to durable effect

ClientsSubmit requests through the Restate layer.
Distributed logrestate — Persists the journal events produced by executions.
Event looprestate — Reads each event and selects the corresponding effect.
Embedded state storeeffects — Receives persistent state updates.
Durable timereffects — Represents work that must wait until a later time or event.
Agent or service requesteffects — Dispatches work to another application component.
The distributed log persists events; the event loop interprets them and applies the corresponding state, timing, or communication operation.
Read the diagram as text
  • Clients. Submit requests through the Restate layer.
  • Distributed log. restate — Persists the journal events produced by executions.
  • Event loop. restate — Reads each event and selects the corresponding effect.
  • Embedded state store. effects — Receives persistent state updates.
  • Durable timer. effects — Represents work that must wait until a later time or event.
  • Agent or service request. effects — Dispatches work to another application component.
  • Clients → Distributed log: submit work and events.
  • Distributed log → Event loop: feeds persisted events.
  • Event loop → Embedded state store: persist state.
  • Event loop → Durable timer: set timer.
  • Event loop → Agent or service request: send request.
16:5717:27
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

16:57 · section reference included

Resources

Transcript & slides

Loading transcript and slides…

Transcript download