← Catalog

@pi-unipi/unipi

All-in-one extension suite for Pi coding agent

Extension

Install

Install with PiG

pig install npm:@pi-unipi/unipi

Install with Pi

pi install npm:@pi-unipi/unipi
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.

{
  "skills": [
    "packages/memory/skills",
    "packages/btw/skills",
    "packages/ask-user/skills",
    "packages/mcp/skills",
    "packages/utility/skills",
    "packages/compactor/skills",
    "packages/notify/skills",
    "packages/kanboard/skills",
    "packages/updater/skills",
    "packages/subagents/skills",
    "packages/web-api/skills",
    "packages/dream/skills"
  ],
  "extensions": [
    "packages/unipi/bundled.js"
  ]
}

README

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

UniPi logo: Unicrab behind three terminal screens

UniPi

Extensions that make the Pi coding agent finish long work, remember it and show it.

npm version CI status MIT license Pi 0.87.1 or later

Getting started · Docs · Architecture · Commands · Meet Unicrab · Changelog

Install

pi install npm:@pi-unipi/unipi

Needs Pi 0.87.1+. Installs 21 packages; each also works alone. Coming from 2.x: upgrade guide.

A UniPi session in simple mode with memory recall, memory save and the glance footer

Why UniPi

UniPi adds what long Pi sessions need.

UniPi gives youHow
Memory between sessionsFacts and decisions go to Markdown files and to a MemPalace index.
Two models as oneFusion pairs a lead model with a sidekick model.
Work that finishesgoal, ralph, swarm and graph modes keep the agent on a long task.
A warm prompt cacheChanging state goes into new tail messages. The prefix stays the same.
One driver for each turnA turn arbiter selects one continuation when the agent stops.
Compaction with no model callThe default vcc method rebuilds the summary from the full session history.
Parallel handsSubagents and background tasks work while the lead continues.
A board for deferred workKanboard keeps tasks in Markdown files, with a web UI and a terminal UI.
Hang detectionWatchdog asks a small judge model about long tool calls.
A short transcriptSimple mode shows one line for each tool call. Ctrl+O expands it.
A view of the session/unipi:info shows cost, context use, spend history and what compaction saved.
A recap at the endThe summarize skill gives the answer first, then open items, in plain words.

Proof

Published results behind each feature (not UniPi benchmarks).

FeatureBenchmarkSource
Memory96.6% recall@5 on LongMemEval, with raw semantic search and 0 API calls.MemPalace · LongMemEval
FusionFrontier-level FrontierCode score at up to 60% lower cost.Devin Fusion
Fusion with two frontier models69.0% on DRACO for two frontier models together. The best single model scored 65.3%.OpenRouter Fusion · Mixture-of-Agents
GoalHumanEval pass@1 went from 80% to 91% with a loop on test feedback.Reflexion · Self-authored verification
RalphSix repositories overnight for $297 in API cost (a reported hackathon result).Ralph loop · YC hackathon report
Swarm90.2% higher than a single agent on Anthropic's research eval.Anthropic multi-agent research
GraphUp to 3.7× lower latency, 6.7× lower cost and about 9% higher accuracy than ReAct.LLMCompiler (ICML 2024)
Prefix cacheUp to 90% lower cost and 85% lower latency for long prompts.Anthropic prompt caching · Modular handbook · our cache study

Kanboard

A task board per project, shared by you and the agent. The agent claims a task, works it and sends it to review.

Kanboard dashboard: tasks waiting on you, running agents, ready tasks and a 14-day throughput chart

Kanboard board view with Backlog, Todo, In Progress, Blocked, In Review and Done lanes

  • Run /unipi:kanboard open to open the board in your browser.
  • Run /unipi:kanboard-add <title> to add a task without an agent turn.
  • Run /unipi:kanboard-do <request> to give the agent a budget of tasks and board writes.
  • Run /unipi:kanboard-autowork start to let the agent work every ready task.

More: Kanboard README.

See your session: /unipi:info

Cost, context use, heaviest tool output, spend history and what compaction saved.

The This session page: cost, tokens, replies, time, the context bucket, billed tokens and tools

More: Info Screen README.

Harness architecture

MechanismProblem it solves
Event bus21 packages must work together without import-time coupling.
Turn arbiterSeveral packages want to continue the run when the agent stops. Only one may act.
Prefix cacheOne changed byte in the request prefix makes the provider bill the full context again.
CompactionA summary must keep the live task, and it must not grow at each compaction.
Long-horizonMulti-turn work needs one driver, a separate judge and hard budgets.
DelegationWork goes to other models and processes. Each one needs a known context boundary.
Harness messagesText from the harness reaches the model as user text. The user must see where it came from.
WatchdogA timer cannot tell a hung command from a slow build.
flowchart LR
  stop(["agent stops"]) --> arb{"turn arbiter<br/>1 nudge maximum"}
  arb -- "priority 100" --> lh["long-horizon<br/>goal · ralph · swarm · graph"]
  arb -- "priority 50" --> claims["kanboard<br/>claimed task"]
  arb -- "priority 40" --> auto["kanboard<br/>autowork"]
  lh --> tail["new tail message<br/>(prefix stays cached)"]
  claims --> tail
  auto --> tail
  tail --> next(["next turn"])

Packages

AreaPackages
Finish long workLong-Horizon · Workflow · Kanboard
Keep contextCompactor · Memory
Work in parallelFusion · Subagents · Background Tasks · BTW
Reach outsideWeb API · MCP · Notify
Stay safeWatchdog · Skill Registry · Ask User
See and controlFooter · Info Screen · Input Shortcuts · Command Enchantment
MaintainUtility · Updater · Core

Meet Unicrab

Unicrab pixel art

The UniPi mascot. It says hello when Pi starts and leaves hints above the input (Alt+H, /unipi:hint). The making of Unicrab.

Docs

Development

git clone https://github.com/Neuron-Mr-White/unipi.git
cd unipi
npm install
npm run typecheck
npm test

To add a package:

  1. Create packages/<name>/ with a package.json and an index.ts.
  2. Import events and constants from @pi-unipi/core.
  3. Emit MODULE_READY when the package loads.
  4. Add the package to packages/unipi/index.ts and to the root package.json.
  5. Run npm run typecheck and npm test.

Import from @pi-unipi/core, never from a peer package (event bus).

Contributing

  1. Fork the repository.
  2. Create a branch.
  3. Make your change.
  4. Run npm run typecheck and npm test.
  5. Open a pull request.

One job per package. Docs follow the style guide.

License

MIT © Neuron Mr White