Every step you take, every call you make: the reliable agent stack — Giselle van Dongen, Restate
Read the talk
The reliable agent stack: durable execution, stateful sessions, and control
Giselle van Dongen explains how Restate supports long-running agents through journal-based recovery, suspended approval waits, isolated session state, and communication with work already in progress.
From a talk by Giselle van Dongen
At a glance
Ideas worth remembering
Reliable agents require more than an agent loop: durable progress, consistent session state, distributed communication, and deliberate execution control address separate infrastructure problems.
The journal supports both failure recovery and intentional suspension. The search demo recovers progress after a tool error, while a durable promise preserves a human-approval wait without consuming serverless function execution time during suspension.
Session IDs isolate persistent state, and execution IDs make individual runs addressable. Together they let a controller preserve conversation history while signaling or cancelling ongoing work.
The controller's LLM chooses between adding context and replacing a run. Signaling does not establish that all prior work is retained, and cancellation through the call chain does not establish automatic reversal of completed external effects.
A shared LLM gateway creates a boundary for policy checks and flow control. The example's 300 simultaneous calls per department limits concurrency; it does not define a total spending cap.
Restate's distributed log and event loop coordinate state, timers, and service requests. Push-based invocation supports serverless activation and is presented as a latency advantage, but the reported 45-millisecond p99 for a 10-step workflow comes without benchmark conditions.
From question answering to persistent agents
Giselle van Dongen begins with the infrastructure needed to run agents reliably in production. She describes three waves of interaction: a website that answers a question after a few seconds, an application that uses tools with a user's involvement, and persistent asynchronous agents that run inside an organization's infrastructure. In the third wave, agents become long-running processes with access to tools, other agents, and organizational context.
That progression changes what the surrounding system must do. Agent SDKs and memory help developers get started, but connecting distributed parts of an organization also requires infrastructure for retries and recovery. These mechanisms become necessary when a process holds state, runs for a long time, and crosses service boundaries. Van Dongen introduces Restate as an open-source durable foundation for backends, including agents, with ideas drawn from Apache Flink and the architects behind Meta's event infrastructure.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Four responsibilities beneath the agent
The foundation has four responsibilities. Durable execution lets an agent recover after a failure without losing a week's progress. Session management keeps state consistent while thousands of sessions run concurrently. Communication connects agents to other agents, MCP servers, and tools. Execution control lets an operator stop work that is stuck or should no longer continue. Recovery and cancellation therefore serve different purposes: one preserves wanted work through failure, while the other ends work deliberately.
Restate runs as a separate server in front of the agent service, resembling a proxy or message broker. It receives a request and pushes it to the service, opening a connection that van Dongen describes as the agent's lifeline. As the agent performs work, it sends events to Restate. Those events form a journal used to recover the process after failure. The intended programming experience is an ordinary function that can run durably, retain state, and continue over long periods.
The demonstration puts that foundation beneath a research agent connected to Slack. The scenario is a company making an agent available to its employees, so the infrastructure must support both the research process and the conversations around it.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A research workflow survives a failed search
Van Dongen asks the Slack agent what is new in AI, then opens Restate's UI to inspect the execution. The UI lists registered agents and active invocations. The research agent first calls an LLM as a planner and sends a list of proposed subtopics back through Slack. Approval unblocks the workflow and launches parallel research agents; a writer agent later produces the report. This separates planning, human authorization, research, and synthesis into distinct stages.
The execution journal makes progress and failures visible. Van Dongen has injected tool errors: a subagent calls an LLM, begins web searches, and encounters a search that fails because the API is down. She points to its retry and eventual successful completion. The journal supports recovery of the accumulated progress, allowing the failed operation to complete without restarting the entire research run. This example demonstrates recovery from a tool failure; it does not establish that every failure will eventually become recoverable.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Making a function step durable
In code, the basic application unit is an HTTP handler made durable through the Restate SDK. The deep research handler receives a Restate context as its first argument. That context represents the connection to the server: operations through it generate events sent to Restate. Durability is therefore introduced through the SDK operations used by the handler.
The planner's LLM call is a Python function wrapped in restate.run. Van Dongen presents this wrapper as the boundary that makes the step durable. By expressing work as durable steps, the process can recover its progress even if failure occurs two hours or two months later. Her claim concerns recovery to the recorded execution point; the example does not specify how an external provider call is handled if failure occurs between its completion and recording its result.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Waiting for a human without keeping a function running
Durable execution also supports intentional pauses. A human approval might take weeks or a month, during which the service may restart or be redeployed. The research process must preserve its place across those events. Restate represents the wait with a durable promise stored in the journal, creating a suspension point that can outlive the active function execution.
After requesting the button click, the process suspends while waiting. Van Dongen says that on serverless infrastructure this consumes no function execution time during the wait. When the response arrives, the promise unblocks and the process continues where it left off. The stated benefit is avoiding an active serverless function for the duration of human deliberation; it is not a claim that storing and operating the durable wait has no infrastructure cost.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Modeling a session as a stateful actor
A sequence of durable steps resembles a workflow, but van Dongen argues that an agent often fits a persistent stateful entity better. It has memory and remains available for interaction over time. In the Slack example, a user should be able to add context while research is underway, rather than wait 10 minutes for completion before sending a follow-up.
Restate's virtual object supplies that model. It behaves like a stateful actor with a unique identifier, such as a session ID, isolated key-value state, and handlers that execute durable functions for the session. Message history is one example of the stored state. The demo's session controller uses its Restate context to retrieve chat history and perform recoverable operations against the session store.
Isolation between sessions is only part of the consistency problem. Two messages in the same Slack conversation could otherwise start agents that overwrite each other's session state. In the controller example, Restate permits one execution at a time and queues a second behind it. This preserves orderly state updates within a session while allowing many separate sessions to run concurrently. The tradeoff is that a later execution for that session waits for the current one.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Sending context to work already in progress
An execution also has its own unique identifier. Other processes can use it to retrieve the output, cancel the execution, or signal it with additional state. This gives the session controller a way to communicate with a research run that is already active, instead of treating every incoming message as an unrelated request.
The controller implements an application decision on top of that communication mechanism. If a run is ongoing, it asks an LLM whether the new input is relevant to the current agent loop. Relevant input is injected through a signal; input judged unrelated causes cancellation and a new run. Restate provides the control primitives, while the LLM determines which path this application takes. The talk does not establish the classifier's accuracy or explain how ambiguous follow-ups are handled.
For the live example, van Dongen asks again what is new in AI and adds a request to focus on frontier models once the plan arrives. The controller calls an LLM to classify the input, and she describes the new message being injected into the research loop. The research agent takes that context into account and starts over again. The account leaves the scope of that repetition unclear: signaling reaches the ongoing loop, but it does not establish exactly which planning or research work is repeated.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Cancelling through the call chain
Van Dongen next changes the request to research AI policy. She describes the coordinator cancelling the current run and starting another for the new topic. Cancellation propagates as a signal through the call chain: if the agent has spawned subagents, those are cancelled before the controller itself. This unwinds the active stack and gives agents an opportunity to roll back. The explanation does not establish that completed external side effects are automatically reversed, so ending execution and undoing its effects remain distinct concerns.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Moving model calls into a shared gateway
The final application example addresses a requirement that appears after deployment: a new model is good but expensive, and research costs begin to rise. Van Dongen uses this scenario to explain why the durable programming model should allow the application to evolve. An LLM call initially implemented as an inline Python step can move into its own handler when it needs more centralized control.
That handler becomes an LLM gateway. It can perform a policy check before making the model call, and other agents use Restate's distributed communication primitives to invoke it. Flow control can then constrain access to the shared service: her example allows a department to run 300 gateway calls at the same time. This is a concurrency limit, rather than a stated total-spend budget. It supplies a place to enforce policy and bound simultaneous work without embedding the same controls in every agent.
Van Dongen presents the broader foundation as supporting recovery from advanced infrastructure failures, including network partitions and zombie failures, while providing tools for customization as requirements grow. These are stated reliability capabilities; this part of the presentation does not show their failure-detection or recovery protocols.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The distributed log underneath the programming model
Inside Restate, an event-driven distributed log persists journal events between clients and services. An event loop receives service events and responds according to their type: it persists state in an embedded store, sets a timer, or sends a request to another agent. These operations connect the execution journal to the application's state, waiting points, and distributed calls. Van Dongen describes the log design as an iteration on Meta's core event infrastructure, generalized into an open-source system.
A central architectural choice is pushing invocations to services. Van Dongen contrasts this with workflow workers polling a server for tasks and attributes lower latency to the push model. She gives an example of 45 milliseconds at p99 for a 10-step workflow. The presentation supplies no benchmark conditions, so that number is an illustrative reported result rather than a general latency guarantee. Pushing also suits serverless functions, which wake when a request arrives.
The server packages the state store and UI in a single binary. Van Dongen describes a highly available deployment as running multiple instances and snapshotting to object storage. This reduces the number of separate infrastructure components the developer must assemble, although her overview does not detail replication, coordination, or restoration behavior.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Integration and deployment choices
Van Dongen closes with the ways developers can adopt the foundation. She reports six SDKs and integrations with popular agent frameworks. Custom agents can also use an LLM SDK directly and wrap selected steps in Restate's SDK constructs. The integration approach leaves the agent implementation flexible while introducing durable boundaries around its work.
Deployment options include open-source self-hosting, a bring-your-own-cloud offering that deploys Restate into the customer's cloud account, and a managed cloud offering. Van Dongen identifies keeping data inside that account as a benefit of the bring-your-own-cloud option. These choices concern where the Restate layer operates; the presentation does not describe data handling by external tools or model providers.
She ends by pointing attendees to the publicly available demo code and Restate repository, mentioning roles across engineering and marketing, including in the Bay Area, and inviting questions outside the conference hall. The presentation concludes with thanks and closing music.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:12
Hi everyone. This talk will be about how
- 0:14
to run agents reliably in production. It
- 0:17
will not be about the eile part, but it
- 0:19
will be about all the other things you
- 0:22
need to get going in order to run agents
- 0:24
resiliently. So the infrastructure layer
- 0:27
basically. I want to set the scene with
- 0:30
this uh quote of Andre Apathy of last
- 0:32
week. It describes that the way we
- 0:34
interact with agents and LLMs has been
- 0:37
evolving in three waves. The first wave
- 0:40
was an LLM being something like a
- 0:42
website where we go to we ask it a
- 0:44
question, it thinks for a few seconds
- 0:47
and then gives us a response. The second
- 0:49
wave was going towards agents. It was an
- 0:52
app that we download to our computer. It
- 0:54
has some tools at its disposal and it
- 0:57
can do some work with our interaction.
- 1:00
Now the third wave will be going more
- 1:02
and more towards persistent and
- 1:04
asynchronous entities. So agents being
- 1:07
longunning processes in our
- 1:09
infrastructure with access to tools and
- 1:12
other agents around the organization and
- 1:14
context.
- 1:17
And so as our use cases are evolving
- 1:19
more and more from single agents to
- 1:21
agentic platforms that connect parts
- 1:24
around uh the organization our
- 1:26
infrastructure layer should also evolve
- 1:28
with that. So when we look at the types
- 1:31
of tools that are currently out there to
- 1:33
implement agents, a lot of innovation
- 1:35
has been done on sites such as agent
- 1:37
SDKs and memory. And agent SDKs are
- 1:41
really cool to implement PC's and get
- 1:44
started quickly, but they don't
- 1:46
necessarily help with like connecting
- 1:47
the distributed bits around an
- 1:49
organization.
- 1:51
And if you want to implement more
- 1:53
complex agentic systems, you actually
- 1:56
need all of those things. So that is the
- 1:58
layer that you see below here where um
- 2:01
you have to deploy extra infrastructure.
- 2:03
Uh you need to write things like retry
- 2:05
logic, recovery logic and all of that is
- 2:08
actually pretty complex to get right but
- 2:11
completely necessary to run longunning
- 2:13
stateful and distributed processes in
- 2:15
production.
- 2:17
So today I want to talk about an
- 2:19
open-source framework called restate.
- 2:21
And you can see it a bit as a flexible
- 2:23
durable foundation that lets you build
- 2:26
any backend. So it's not specific for
- 2:28
agents but a as agents are also just a
- 2:32
type of a backend uh it also works well
- 2:34
for them. The ideas behind restate come
- 2:37
from Apache Flink which is a popular
- 2:40
distributed stream processing engine and
- 2:42
also from some of the exarchitects
- 2:45
behind Meta Score event infra.
- 2:49
So what are the ingredients in restate?
- 2:51
Basically four parts. First of all, it
- 2:54
makes sure that a single run of an agent
- 2:56
is resilient. This is called durable
- 2:59
execution in the industry. Think about
- 3:02
things like when an agent runs for a
- 3:04
week and then crashes. We want to be
- 3:06
able to bring it back and let it
- 3:08
continue exactly at the point where it
- 3:10
failed. We don't want it to start over
- 3:12
from the beginning.
- 3:14
Another um area here is running many
- 3:18
concurrent sessions in parallel. Imagine
- 3:20
running thousands of concurrent agent
- 3:22
sessions at the same time and needing
- 3:24
needing to make sure that state is
- 3:26
always consistent and that different
- 3:28
agents don't interfere with each other.
- 3:31
And then going more towards things like
- 3:33
communication between agents, between
- 3:35
agents and MCP servers and other tools.
- 3:38
And finally also control, making sure
- 3:40
that when an agent for example uh is
- 3:43
doing um something you don't want it to
- 3:45
continue or when it's stuck being able
- 3:47
to actually cancel or kill the
- 3:48
execution.
- 3:51
So the way that you can think of it is
- 3:53
as follows. Restate is basically a
- 3:55
server which runs in front of your agent
- 3:58
service. So as a separate component it
- 4:00
sits there a bit like a like a message
- 4:02
broker or a proxy and when there's a
- 4:05
request for your agent restate proxies
- 4:07
the request to the service and pushes it
- 4:10
to the service basically and from that
- 4:12
moment there's a connection open
- 4:15
connection between restate and the agent
- 4:17
and that connection will basically be a
- 4:19
bit like a lifeline for the agent. So as
- 4:21
the agent is doing stuff, it sends
- 4:24
events over to restate and restate will
- 4:27
use that journal of events to recover
- 4:29
the process after a failure.
- 4:33
So from a slightly higher level um
- 4:35
explanation, you could say that it's
- 4:37
turning a normal function in your
- 4:39
application into something that is long
- 4:41
running, durable, and stateful without
- 4:44
having to do um a lot of the complex
- 4:46
things you otherwise need to do for
- 4:48
this. So my talk today will be mainly a
- 4:51
demo. So I'll be showing you um a
- 4:54
research agent that is connected to
- 4:55
Slack. Imagine we are like working at
- 4:58
some company and we want to make an
- 5:00
Slack agent available to all of our
- 5:02
employees.
- 5:03
So if I go here into Slack then can I
- 5:06
can here in this channel for example ask
- 5:09
what is new in AI.
- 5:12
Now let's have a look at what it's doing
- 5:14
under the hood. So if I go back here, I
- 5:17
have here the restate uh UI. This is a
- 5:20
bit like a cockpit for your agents. So
- 5:22
you can see a registry of all the agents
- 5:25
that are currently registered and you
- 5:27
can also see for example which execution
- 5:29
is currently happening. So here is the
- 5:32
deep research agent that I spinned up a
- 5:34
few seconds ago. We can see what it's
- 5:37
currently doing. Now it called first an
- 5:39
LLM and then it sent me an answer via
- 5:42
Slack. This first LLM call was a planner
- 5:45
agent. So what it did is it planned the
- 5:48
research and sent me um a list of
- 5:50
subtopics that it wants to research.
- 5:53
Now if I press here approve then this
- 5:56
will unblock the workflow and will spin
- 5:58
up a set of parallel research agents. So
- 6:02
this is basically like the classical
- 6:03
deep research workflow, right? You have
- 6:05
a planner then a set of subress research
- 6:08
agents and then finally someone uh who
- 6:11
writes a report on this like a writer
- 6:13
agent
- 6:15
and so this journal you see here on the
- 6:17
left that is basically the events that
- 6:19
get sent from the agent to the restate
- 6:21
server and if this now crashes at some
- 6:24
point this journal is what will be used
- 6:27
to uh recover the execution to the point
- 6:29
where it failed. I don't know if uh
- 6:31
there were some errors. I injected a bit
- 6:34
of like tool errors in here. Yeah, here
- 6:36
you can for example see that um the sub
- 6:39
agent first did an LLM call then started
- 6:42
doing some web searches and eventually
- 6:44
uh one of the web searches didn't go
- 6:46
through because the API was down and
- 6:48
then you see here on the right how it
- 6:50
got retrieded and eventually completed
- 6:52
successfully. So instead of starting
- 6:54
over, it uses the journal to recover the
- 6:57
progress.
- 6:58
Let's now have a look at what this looks
- 7:00
like in code.
- 7:02
So the basic unit of how you implement
- 7:06
applications in restate is by writing
- 7:07
HTTP handlers and those handlers become
- 7:10
durable by using the restate SDK. So
- 7:13
here in this case we have here our deep
- 7:16
research handler and here as a first
- 7:18
argument we have a restate object
- 7:20
context and the way you can imagine that
- 7:22
is basically as that uh connection to
- 7:25
that restate server. whenever I do an
- 7:28
action on this uh restate object, it
- 7:30
will lead to an event being sent to
- 7:32
restate. So for example, when I did that
- 7:36
planner LLM call, what actually happened
- 7:39
under the hood was it executed here this
- 7:41
Python function. This is just a simple
- 7:44
light um light lm like
- 7:48
LLM call and the way I made it durable
- 7:51
is by wrapping it in restate.run.
- 7:54
So what happens is by doing these
- 7:56
durable steps if this fails somewhere
- 7:59
here two hours or two months later it
- 8:02
will recover to exactly that point.
- 8:05
So that's the idea of durable execution.
- 8:07
You're always able to recover a process
- 8:09
to where it was. You can also use that
- 8:11
for other things not necessarily for
- 8:13
failure recovery. For example, imagine
- 8:16
we want to ask a human to approve
- 8:17
something and this approval might take
- 8:20
weeks or a month. this process needs to
- 8:23
be able to um to survive restarts and
- 8:27
redeploys uh over those kind of long
- 8:29
periods of time and so with durable
- 8:32
execution you can actually also uh
- 8:34
suspend a function and let bring it back
- 8:38
when it's able to make progress. So in
- 8:40
the case of a human approval what we do
- 8:42
here is basically we we create a durable
- 8:44
promise which lives in that journal a
- 8:47
bit like a suspension point. Then we ask
- 8:51
uh a human to click that button in
- 8:53
select as I showed in the beginning and
- 8:56
while we are waiting this process
- 8:57
actually suspends. So if it's running on
- 8:59
serverless this is not using uh
- 9:02
execution uh time on our functions.
- 9:06
Once the response comes in this then
- 9:08
gets unblocked and can continue where it
- 9:10
left off. So what we see here is a bit
- 9:13
like a workflow. It's a set of steps
- 9:15
that get executed durably. But when we
- 9:18
think about agents and also the way that
- 9:20
Karpathy described it in the tweet, it's
- 9:22
more like a persistent stateful entity
- 9:24
that lives for a longer period of time
- 9:27
that has some memory. Um, so a workflow
- 9:30
is not the nicest way to model this kind
- 9:32
of thing. So the way that we can model
- 9:36
this in restate is by using something
- 9:38
called a virtual object. So imagine in
- 9:41
the use case that I'm showing this slack
- 9:43
research agent. Imagine that I don't
- 9:45
want to wait for 10 minutes to give it
- 9:48
some follow-up context or maybe I think
- 9:51
about something else that I should have
- 9:52
told it. Um I want to actually be able
- 9:54
to interact with it, not wait till that
- 9:56
research is finished before I can send a
- 9:59
follow-up.
- 10:00
And so this is basically what a virtual
- 10:03
object in restate is. It's a bit like a
- 10:05
stateful actor. It has a unique ID, for
- 10:07
example, a session ID. It has uh some
- 10:10
key value states that is isolated for
- 10:14
that specific session that you can write
- 10:16
to. Uh imagine for example your history
- 10:18
of messages and it also has like a set
- 10:21
of handlers that can execute durable
- 10:25
functions uh for this session. So here
- 10:28
the way I implemented this use case that
- 10:30
I mentioned of interacting with a
- 10:33
running process is as follows. This is a
- 10:37
um a bit a session controller. Again, it
- 10:40
has like this restate object context at
- 10:42
its disposal to do things in a
- 10:45
recoverable way. Uh it can write to this
- 10:48
session store. Here it I'm retrieving
- 10:50
the chat history.
- 10:52
And one thing that's interesting there
- 10:54
is that in order to run these kind of
- 10:56
sessions in very high uh paralyzed ways,
- 10:59
so thousands of sessions at the same
- 11:01
time, we need to make sure that agents
- 11:04
do not interfere with each other.
- 11:06
Imagine I'm sending two messages on
- 11:08
Slack and now two agents are actually
- 11:10
overwriting each other each other's
- 11:12
session state. To prevent that, this
- 11:15
will guarantee that only one execution
- 11:18
is running at a time. So a second
- 11:19
execution will be cued behind the
- 11:22
current one.
- 11:26
Then let's have a look at how we
- 11:28
implement this like interacting with
- 11:30
another execution. So an execution in
- 11:32
reset has a unique identifier and you
- 11:35
can use that identifier to connect to it
- 11:38
from other processes. for example, to
- 11:40
retrieve uh the output, but also to
- 11:43
cancel it or maybe to signal it being
- 11:46
injecting a bit of state into an already
- 11:49
running agent loop. And so this is like
- 11:52
a very flexible type of um uh
- 11:56
capabilities that you can do to
- 11:57
implement things like for example
- 12:00
signaling an already ongoing agent loop.
- 12:02
So what we do here is if there is a
- 12:04
current execution ongoing then we will
- 12:07
ask an LLM is this like something that
- 12:10
is relevant for the current agent loop.
- 12:13
If that is the case inject this via a
- 12:16
signal if it's not really relevant for
- 12:19
what we're currently doing then cancel
- 12:21
what you're currently doing and start
- 12:22
over again with this new information.
- 12:26
And so this goes a little bit further
- 12:28
than workflows. it goes a bit more
- 12:29
towards like writing persistent stateful
- 12:32
entities that can interact with each
- 12:34
other and have memory at uh their
- 12:36
disposal. So let me show you uh how this
- 12:40
works. So here if I now ask again what
- 12:42
is new in AI and I wait a few seconds
- 12:46
then it should respond again with a
- 12:48
plan. Um and then I can say for example
- 12:51
some extra info focus on frontier models
- 12:55
let's say.
- 12:59
So once I have the plan I will inject
- 13:02
that bit of extra state.
- 13:06
Now let's look at the UI of what this is
- 13:09
now doing. So here I have that
- 13:10
controller which I just showed. It
- 13:13
started calling an LLM to classify uh
- 13:16
this new input.
- 13:19
Once this comes back, it will probably
- 13:21
decide that it should signal it because
- 13:23
it's it's still relevant to the research
- 13:25
it's currently doing. So this inject
- 13:28
that new message into the ongoing agent
- 13:30
loop. So let me show you in the deep
- 13:32
research agent again. Um so first it
- 13:35
called an LLM then asked us then we
- 13:38
injected this uh new message of focus on
- 13:41
frontier models and then it uh took that
- 13:44
into account and started over again.
- 13:47
Here
- 13:49
I can now for example also say something
- 13:51
like uh forget about that
- 13:57
research AI policy.
- 14:00
And if I send this then the coord
- 14:02
coordinator will um decide to cancel the
- 14:05
ongoing run and start a new one that
- 14:08
will
- 14:10
research this new topic. And so this
- 14:12
cancellation is basically like a signal
- 14:14
that gets um sent down the stack of or
- 14:19
the call chain. So if my agent was
- 14:21
already spinning up sub agents first
- 14:23
those sub aents would be cancelled then
- 14:25
uh the controller itself and like that
- 14:28
it would basically rewind the stack and
- 14:30
give agents also the ability to roll
- 14:32
back.
- 14:34
Okay. Okay, so this went a bit more into
- 14:36
the direction of like stateful
- 14:37
persistent entities that we can interact
- 14:40
with over longer periods of time. Now
- 14:42
the last part of the demo that I want to
- 14:44
show is um going more towards like being
- 14:47
able to write highly customized
- 14:49
applications. Imagine that we deploy
- 14:51
this in production but then a few months
- 14:54
later a new model provider brings out a
- 14:56
new model for example fabulous and even
- 14:59
though the model is very good it's also
- 15:01
very expensive and we notice that this
- 15:03
research agent is actually starting to
- 15:05
cost a lot. These kind of uh things that
- 15:08
pop up halfway through a project require
- 15:12
you to then deploy a a lot of new extra
- 15:15
infra or like find a good way to solve
- 15:17
this. This is the kind of things that
- 15:18
Restate really excels at. It doesn't
- 15:21
really peg you into a specific way of
- 15:23
how you should write your application.
- 15:25
It basically gives you like a durable
- 15:27
programming model that lets you
- 15:29
implement an application in the way that
- 15:31
fits for you and also extend it if
- 15:34
necessary. So first I showed this um LLM
- 15:39
call in the first example as an inline
- 15:41
step. It was just a Python function that
- 15:44
got persisted. But imagine this use case
- 15:47
that we want to actually have a bit more
- 15:49
control over those LLM calls. For
- 15:51
example, what you can do is then pull
- 15:53
this out into its own handler.
- 15:56
And this handler can now do things like
- 15:58
for example a policy check and then uh
- 16:01
do the LLM call. And the other agents
- 16:04
instead of doing this LLM call inline
- 16:06
can now use restates like distributed
- 16:09
communication primitives to actually
- 16:11
just call this LLM gateway instead of
- 16:14
doing it as an inline step. And this
- 16:18
service fabric that lets you communicate
- 16:20
between agents also gives you some um
- 16:23
things like flow control. So we can for
- 16:25
example say one department is only
- 16:28
allowed to run 300 calls to this LLM
- 16:31
gateway at the same time. So the reason
- 16:34
why I showed this was just to show you a
- 16:36
bit like that. Uh it's basically just a
- 16:38
a resilient foundation. It makes sure
- 16:40
that your process can uh recover from
- 16:43
even a more advanced types of
- 16:45
infrastructure failures, things like
- 16:47
network partitions and zombie failures.
- 16:50
And um it gives you like tooling to
- 16:53
extend and customize as your use case
- 16:55
grows.
- 16:57
Let's go back to the slides to have a
- 17:00
little more of an idea of how this thing
- 17:03
is actually implemented on the inside
- 17:05
because it's actually a pretty
- 17:06
interesting um design or architecture.
- 17:11
So the way it's implemented is basically
- 17:13
by having a a event-driven distributed
- 17:16
log implementation.
- 17:19
So inside the box you basically on one
- 17:20
side have the clients on the other side
- 17:22
the services and inside the box is a log
- 17:26
which persists all those journal events
- 17:28
and an event loop and that event loop
- 17:30
basically gets the events from the
- 17:32
service based on what the event is. It
- 17:35
either persists some state in the
- 17:37
embedded state store or it sets a timer
- 17:40
or it sends a request to another agent.
- 17:42
And by doing that you basically have a
- 17:45
durable um foundation for whatever an
- 17:48
application is doing.
- 17:50
The design of this distributed log is
- 17:53
heavily inspired by the way that the
- 17:56
core event infra layer at meta works. Uh
- 17:59
it's basically like an iteration on top
- 18:02
of that. Um and some of those architects
- 18:04
are now have designed that for restate
- 18:07
as an more generic solution that is
- 18:10
available in open source. There are two
- 18:12
important things related to this
- 18:14
architecture that make it interesting.
- 18:16
The first one is that it works as a push
- 18:18
model. So whereas most workflow
- 18:21
orchestrators actually pull for new
- 18:23
tasks um for pull from the workflow
- 18:26
server, restate actually pushes the
- 18:29
invocations and the benefit you get from
- 18:32
that is that it has a much lower
- 18:33
latency. So you can use these kind of
- 18:36
workflow guarantees in functions around
- 18:38
your application and uh have like a
- 18:41
latencies of for example 45 milliseconds
- 18:44
p99 for like a 10-step workflow.
- 18:48
Pushing invocations also works very well
- 18:50
for serverless because they require you
- 18:53
to basically uh send the request and
- 18:56
wake up the function. So this design
- 18:59
that I show here includes everything you
- 19:02
need. It includes uh as well that state
- 19:05
store where we were embedding the state
- 19:07
as the UI. It's a single binary so it's
- 19:10
pretty easy to operate as well to run it
- 19:13
in like a highly available way. You just
- 19:15
spin it up multiple times and let it
- 19:17
snapshot to object storage.
- 19:21
So restate has six different SDKs. We
- 19:24
also have integrations for most of the
- 19:26
popular agent frameworks out there. And
- 19:30
of course, because it's just like a
- 19:32
flexible layer, you can also just use
- 19:34
any LLM SDK and implement custom agents
- 19:37
by just wrapping some steps into uh
- 19:40
these SDK constructs. So, it's open
- 19:42
source. You can self-host it. We also
- 19:44
have a BYOC offering where we deploy
- 19:47
restate in your cloud account and uh
- 19:51
that gives you the benefit that data
- 19:52
doesn't leave your cloud account.
- 19:54
Otherwise, there's also a managed cloud
- 19:56
offering.
- 19:58
This was mainly what I wanted to show.
- 20:01
If you want to explore the code a bit
- 20:02
further, there is here this the GitHub
- 20:04
repo. It's publicly available. If you
- 20:07
like the project, then have a look at
- 20:09
the restate repo itself. We are hiring
- 20:12
across the board for all sorts of roles
- 20:14
going from engineering to marketing,
- 20:16
especially also here in the Bay Area.
- 20:18
So, if you're interested in that, uh,
- 20:20
then definitely check out our careers
- 20:22
page. and I will be outside in front of
- 20:25
the conference hall here if you want to
- 20:27
ask any questions or learn more about
- 20:29
restate. Thank you very much.
- 20:47
>> [music]