Pi Durable logo

Pi Durable

Visit

Pi Durable is an experimental agent harness that persists conversations and tasks so interrupted work can resume.

Share:
View alternatives

Pi Durable

Pi Durable is an experimental agent harness in the Pi repository. It commits conversations, model turns, tool calls and application state to storage before presenting them. Reopening persistent storage lets interrupted work continue from saved checkpoints, making it relevant to applications whose agent tasks outlast a single process.

Features and intended use

The package builds on pi-ai for model access and Chord for document state. Conversations contain immutable entries; atomic commits can append entries, edit documents and create tasks together. Durable tasks save progress as state machines rather than treating an entire conversation as one disposable function call.

A registry defines tools, hooks, extensions and tasks. Agent choices are stored per conversation. Submissions can be awaited, and cancellation of the wait does not itself cancel the underlying work. These distinctions help developers build an interface that survives a disconnected client without losing the agent's task.

Practical workflow

Install the official pi-durable, pi-ai and Chord packages together and reproduce the README's small example. MemoryStorage is useful for understanding the API, but it does not preserve data after the process exits. For recovery testing, choose SQLite or JSONL storage, open the harness, submit a short task and deliberately restart the process.

Reopen the same storage and call the documented resume mechanism. Inspect the persisted answer and task state before expanding to external tools. Then introduce one tool with a reversible side effect and test the interruption boundary. Persisted conversation state alone does not prove that an external service applied an action exactly once.

Pricing and limitations

The repository is MIT licensed. Model calls, storage and deployment still have their own costs; this is a library rather than a fixed-price hosted assistant. The README explicitly marks the API experimental and says it can change without notice between releases. Pin dependencies and test migrations before upgrading a deployment with stored conversations.

Use the documented storage implementation rather than assuming a transcript export is enough for recovery. Tool integrations also need their own retry and idempotency rules. Begin with a narrow tool surface so failures remain observable.

FAQ and alternatives

Does the memory example survive restarts? No. Use a persistent storage backend for that requirement.

Is this the Pi terminal application? It is a separate harness package in the same ecosystem, intended for application developers.

Read the official package documentation, compare the Pi coding agent, and browse agent infrastructure. The next step is an interruption-and-resume test, followed by validation of the actual external side effects your application depends on.

Comments

No comments yet. Be the first to comment!