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

## Executive summary

This talk introduces Restate, an open-source framework designed to provide a flexible, durable foundation for building resilient, long-running, and stateful agentic systems. Restate addresses the infrastructure gap in agent development by handling complex concerns like retry logic, recovery, session isolation, and process cancellation. It operates as a server proxying requests to the agent service, using an event journal to ensure that processes can survive crashes, redeploys, and long periods of suspension (e.g., waiting for human approval) without losing state or consuming serverless execution time.

## Key takeaways

- Durable Execution and Resilience: Restate enables durable execution, allowing an agent process that runs for extended periods (e.g., a week) to crash and restart exactly at the point of failure, rather than starting over. This is achieved by recording all events in a journal.
- Modeling State with Virtual Objects: Instead of modeling agents as simple workflows, Restate uses 'virtual objects' to model persistent, stateful entities (like a session). These objects have unique IDs and isolated state, allowing multiple agents to interact with a single run without interfering with each other's state.
- Advanced Control and Interaction: The framework supports advanced control primitives, allowing external processes to signal, inject state into, or completely cancel an already running agent loop. This capability is crucial for complex, multi-agent interactions.
- Low Latency via Push Model: Unlike traditional workflow orchestrators that poll for new tasks (pull model), Restate uses an event-driven, push model for invocations. This design significantly lowers latency, achieving low latencies (e.g., 45ms p99) even for multi-step workflows.

## Technical details

- Architecture and Components: Restate functions as a server/proxy sitting in front of the agent service. It uses a journal to capture events, which acts as a 'lifeline' for the agent. The design is heavily inspired by Apache Flink and Meta's event infrastructure.
- Implementation Model: Applications are built by writing HTTP handlers and making them durable using the Restate SDK. Durable steps ensure that if the process fails, it can recover to the exact point of failure.
- Concurrency and Isolation: To handle thousands of concurrent sessions, Restate guarantees that only one execution can run at a time for a given virtual object, queuing subsequent requests to prevent state overwriting.
- Extensibility and Customization: Restate provides a durable programming model that is not tied to a specific application structure. It allows developers to pull out components (like an LLM call) into dedicated handlers, enabling service fabrics and flow control (e.g., limiting calls to an LLM gateway).

## Practical implications

- Build engineers can implement complex, long-running agentic workflows that survive infrastructure failures, network partitions, and extended periods of inactivity.
- The framework simplifies the development of stateful, distributed processes by abstracting away complex retry and recovery logic.
- It enables the creation of interactive agents that can be controlled and updated mid-run, moving beyond simple linear workflow execution.

## Topics

Agentic Systems, Durable Execution, Distributed Computing, Event Sourcing, State Management, Serverless Architecture, GitHub Repo, restate

Source: https://www.youtube.com/watch?v=cI7zfqusmFU
