Vinayak Dubey

Notes on the design of Kestrion

5 November 2026

Kestrion is an open-source framework for building production AI agents. It is published on PyPI. This post explains the ideas behind it. It is early work, and I expect parts of the design to change.

The starting point

Many agent frameworks focus on how to describe an agent, with prompts, tools and loops. Fewer focus on what happens when the process running that agent dies. Yet in production, processes die: deploys, out-of-memory kills, network failures, upstream outages.

Kestrion starts from that fact. The goal is simple. If an agent crashes, it resumes where it stopped instead of starting over.

Principles

  • The event log is the source of truth. Everything that happens in a run is recorded as an event. The current state is derived from the events, and a run can be rebuilt from them.
  • Resume, do not restart. On recovery, finished steps are not repeated. Their recorded results are reused.
  • Approvals are part of the flow. A run can stop before a risky action, wait for a decision and continue afterward, without holding a process open.
  • Parallel tool calls must be safe. When several tools run at once, their results and side effects need to be recorded in a way that survives a crash partway through.

These ideas build on the earlier posts in this series: checkpointing, idempotent tool calls, stateless services and approval steps.

What it is not

It is not a replacement for good prompts, good tools or good evaluations. Durability makes failures survivable. It does not make the agent smarter.

Where to look

The code and documentation are linked from kestrion.in. If you try it and something is unclear or broken, I would like to hear about it through an issue on GitHub.