pi-agents0.34.1
Durable, named agents for Pi: delegate tasks, compose agents into graphs, and watch them work.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
๐ค pi-agents
Give Pi durable, named agents. Delegate a job, keep working while the agent runs, and get its result back as a message. Watch any agent live, talk to it, or stop it. Agents survive crashes and restarts.
Agents run inside your Pi process on pi-durable, which checkpoints every step. When you resume a session, interrupted agents continue where they stopped.
[!CAUTION] Agents can't use MCP servers (earendil-works/pi#10837) or tools from other extensions, such as web search (earendil-works/pi#10386). They work with Pi's built-in tools:
read,bash,edit,write,grep,find,ls, andcodemode. MCP servers and extension tools live in Pi's session, while agents run on pi-durable.
![]() |
![]() |
|
Delegate work to agents and graphs Run parallel reviews, follow progress, and bring the findings together. |
Agents message each other Coordinate a fix between agents, then browse their conversation. |
๐ Installation
pi install npm:pi-agents
โจ Usage
Have an agent review src/run for error handling while we keep going.
Spawn two agents in parallel: one maps the API surface, one checks the tests.
Merge their findings once both report back.
Start a graph: three agents review src/run, src/ui, and src/host, and a
fourth merges their findings into one list of issues.
Start an agent that may delegate: it finds every module under src, has one
helper review each, and returns one merged review.
Pi starts agents only when you ask for delegation. An agent's result is its final message. Agents work in the background and their results arrive as messages in your conversation, so you can keep talking to Pi meanwhile. In a graph, agents pass their results to each other, and Pi gets one message at the end.
The usage manual covers the rest: the panel, attaching to agents, graphs, delegation, messaging, profiles, and configuration.
๐๏ธ Architecture
Agents run inside your Pi process. Pi-agents keeps one pi-durable harness per Pi session, with its own store, kept apart from Pi's session file:
โญโ Pi process โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โญโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โญโค โ Pi session: MCP, extension tools โ โ โค panel โ โ
โ โโฐโโโโฌโโโโโโโโโโโฒโโโโโโโโโโโโโโโโโโโโโโโฏ โ โ attach view โ โ
โ โ โ agent_* โ results โ โก /agents โ โ
โ โ โผ โ โ โ /messages โ โ
โ โโญโโโโโโโโโโโโโโโดโโโโฎ โฐโโโโโโโโโโฒโโโโโโโโโโโฏ โ
โ โโ โฆ pi-agents โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โโฐโโโโฌโโโโโโโโโโโฒโโโโฏ โ
โ โ โ start โ state โ
โ โ โ message โ results โ
โ โ โผ stop โ โ
โ โโญโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โโ pi-durable harness โ โ
โ โโ โ โ
โ โโ โ scout โโโ message โโโถ โ notes โ โ
โ โโ โ โ
โ โโ โญโ graph โโโโโโโโโโโโโโโโโโโโโโโโโโฎ agent tools: โ โ
โ โโ โ โ map โโฌโโถ โ core โโฌโโถ โ report โ read bash edit โ โ
โ โโ โ โโโถ โ ui โโโโ โ write grep โ โ
โ โโ โ โโ โ โ โ helpers โ find ls codemode โ โ
โ โโ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ โ
โ โโ โ โ
โ โโ agents are conversations; turns, tool calls, and graphs โ โ
โ โโ are durable tasks that own what they start โ โ
โ โโฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โฐโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ saves โ checkpoint every step
โผ โผ
โญโโโโโโโโโโโโโโโโโโโโโโโฎ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โค Pi's session file โ โ โค pi-agents store, one per โ
โ your conversation, โ โ session: agents, graphs, โ
โ saved results, and โ โ messages, tasks โ
โ message cards โ โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโฏ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
docs/architecture.md explains how agents, graphs, and results stay durable across crashes and restarts.
๐ Documentation
- Usage: glossary, states, skills, UI, commands, and tools.
- Graphs: coordinating agents and delegating to helpers.
- Messaging: using messages and their guarantees.
- Agent profiles: reusable settings and instructions.
- Configuration: models, requests, and footer counts.
- Architecture: durable tasks, recovery, and storage.

