Agent runs often fail after expensive model calls and executing tools that have real-world side effects. This problem is made even worse by how common it is to deploy agents to serverless environments. When your agent dies, it needs to be restarted, but doing so safely isn't easy and everyone building agents has to solve this same problem of durability.
The stack you're running probably already has half of what you need for durable execution already though, ie, a queue or job runner that can invoke work at least once. kassette gives you the other half by journaling completed steps to object storage (or a filesystem) so that it can replay them when you retry the same run again. This means you can have durability without having to add a workflow service or even a SQL database.
kassette is a tiny, zero-dependency TypeScript library that you can use to build agentic workflows that are just ordinary async functions. Each object storage backed run is a single object that serializes appends via CAS while session numbers fence zombies. Agentic workloads are usually dominated by (relatively) small number of slow llm/tool calls or waiting on approval so this simple design (writes grow large, full journal in a single read) has worked well (more here: https://lostinpatterns.github.io/kassette/docs/object-storag...).
repo: [https://github.com/lostinpatterns/kassette](https://github.com/lostinpatterns/kassette)
docs: [https://lostinpatterns.github.io/kassette/](https://lostinpatterns.github.io/kassette/)
Comments URL: [https://news.ycombinator.com/item?id=48896793](https://news.ycombinator.com/item?id=48896793)
Points: 3