disler/durable-pi

Durable Pi playground and agent network: persistent, multi-device durable agents with web and terminal clients

What it solves

Durable Pi solves the problem of AI agents losing their progress when a connection drops, a browser tab closes, or a machine restarts. While standard agents typically only remember the chat history, this project ensures that the agent's entire internal state—including active tool calls, queued tasks, and application data—is saved to a database. This allows agents to survive process interruptions and continue working even when you are offline.

How it works

Every device runs a lightweight server (dpi-backend) that manages its own agents and SQLite databases. Because the agent lives on the device rather than in your client, it acts as a persistent worker. You interact with these agents through thin clients—such as a web UI, a terminal interface, or simple API calls—that connect to the device. If a tool call is interrupted by a crash, the system uses checkpoints to resume exactly where it left off, ensuring that side effects are handled safely and consistently.

Who it’s for

This project is for developers and teams who need agents that can operate autonomously over long periods or across multiple sessions. It is ideal for those building proactive agents that trigger based on events (like log monitoring), developers who need to switch between different interfaces (web, terminal, or scripts) to steer the same agent, and teams requiring "multiplayer" agent access during collaborative tasks like incident response.

Highlights

  • Proactive Execution: Agents can monitor logs or events and complete tasks—such as investigating and fixing bugs—before you even open the interface.
  • Resilient State: Every action, tool call, and application state change is committed to SQLite, allowing for seamless recovery after a system restart.
  • Multi-Client Support: Use a web dashboard, a terminal-based UI, or direct API calls to monitor and steer the same agent session.
  • Shared Application State: Multiple agents on the same device can share a JSON document, allowing them to pass information or coordinate tasks.
  • Flexible Tooling: You can modify an agent's available tools, system instructions, or model settings mid-run without losing the current session context.

Related

  • Project
  • Project
  • Project
  • Project