← Catalog

@tshu-w/pi-agents

Multi-agent runtime for Pi: hand work to agents that run in the background, persist past your terminal, and report back.

Extension

Install

Install with PiG

pig install npm:@tshu-w/pi-agents

Install with Pi

pi install npm:@tshu-w/pi-agents
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./src/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.6.1 (README.md). PiG does not review it.

pi-agents

Multi-agent runtime for Pi: hand work to agents that run in the background, persist past your terminal, and report back.

Built on it is a personal agent that delegates and stays free to talk.

  • Async agents: Agents run in parallel and report back when done.
  • Persistent agents: Agents keep running after the terminal closes; check on and attach to them from the workbench.
  • Inter-agent messaging: Agents message each other, across Pi instances too.
  • Dynamic workflows: Programs extend Pi's codemode: the model writes JavaScript that calls tools and Agents to split long tasks recursively.

Install

npm install -g @tshu-w/pi-agents
pi install "$(npm root -g)/@tshu-w/pi-agents"

Requires Pi 1.2.0 or later. Enable program, which replaces Pi's codemode, with { "defaultTools": ["+program"] } in settings.json.

To use only the extension, without the workbench, run pi install npm:@tshu-w/pi-agents.

Quick start

pd main      # talk to your personal agent
pd agents    # the workbench: all your Agents, grouped by what they need from you

Ask it in plain words, such as "review each package in the background". It starts Agents for the work and passes their results back to you.

Key or commandDoes
Ctrl+Z, /detachLeaves the Agent running and returns to the shell
pd attach <session>Attaches to an Agent, starting it if needed
/tasksOpens an Agent or background Program to watch or talk to it

Plain pd starts Pi as an Agent that can delegate the same way. Limits and the extensions child Agents load are set under "pi-agents" in settings.json (SPEC §8).

Limitations

  • An Agent can be open in only one Pi instance at a time; quit the other or pd attach to it.

Evaluation

On BrowseComp and ProgramBench, pi-agents improved most models we tested by up to 10 points; its dynamic workflows can also cut tokens by 20% or more.

Docs

  • SPEC.md: Agents, messages, and limits
  • HOSTS.md: persistent Agents, pd commands, and the workbench
  • PROGRAM.md: Programs and their API

License

AGPL-3.0