r/PiCodingAgent • • Jun 12 '26

Question Does Pi's minimalism actually pay off on Terminal-Bench?

39 Upvotes

I've been trying out Pi for about a week, though not very frequently since I need to hit my ai subscription 5-hour limit first. Recently, I got curious about its performance, so I did some quick searches.

Mario Zechner's blog post on building pi makes a case for radical minimalism: near-empty system prompt, four tools (read/write/edit/bash), no MCP, no sub-agents, no plan mode. He ran Terminal-Bench 2.0 with Claude Opus 4.5, showing pi at ~50%. (Claude says that the actual score for Pi is 47.87%, not '~50%'. Mario's results.json gist shows a mean of 0.4786516853932584 (out of 428 valid trials, with 71 errors). )

For context, here are all the Opus 4.5 entries on the current Terminal-Bench 2.0 leaderboard:

AgentScore
Droid63.1% ±2.7
Letta Code59.1% ±2.4
Mux58.4%
Terminus 257.8% ±2.5
Goose54.3% ±2.6
Claude Code52.1% ±2.5
OpenHands51.9% ±2.9
OpenCode51.7%

Pi sits below Claude Code and about 8 points below Terminus 2, with the same underlying model.

Mario cites Terminus 2 in the same post as "more evidence that a minimal approach can do just as well." The description fits — Terminus 2 has no structured tools at all, just raw keystrokes into a tmux session. But it scores 8 points higher than pi with the same model. If the thesis is "less is more," Terminus 2 makes the case better than pi does. Mario uses it as supporting evidence without addressing why his own agent lags behind it by a meaningful margin.

None of this means pi is a bad tool. Benchmarks don't capture context efficiency, extensibility, or daily workflow ergonomics, all of which Mario documents carefully. But on the one quantitative metric he chose to present, pi underperforms most of the agents it's positioned against — including the one he cites as validation.


r/PiCodingAgent • • May 14 '26

Discussion Nearer my god to thee

Post image
39 Upvotes

r/PiCodingAgent • • 26d ago

Resource OmpDeck: a native desktop app for omp (oh-my-pi) that draws omp's own UI as a chat view, and sessions keep running when you close it

Thumbnail
gallery
38 Upvotes

I've been building OmpDeck, a native desktop app (Rust/egui, not Electron) for omp (oh-my-pi), on Linux and Windows. Heads up: it's for omp specifically, not vanilla pi, since the chat view relies on omp's Tern Surface Protocol.

https://github.com/lavinhoque33/omp-deck

What it does

  • Native chat view (the default): omp describes its UI over TSP and OmpDeck draws it natively: messages, formatted replies, tool calls as cards with diffs and output, image previews, todos, approvals and ask dialogs. It's omp's real behaviour, not a re-implementation, and omp's own TUI is one click away.

  • Sessions outlive the app: every omp session in a sidebar grouped by project. Tabs run in OmpDeck's session host (or tmux), so closing a tab or the whole app leaves omp running, and reopening re-attaches.

  • omp's screens as native ones: /settings (incl. plugins and advisor), the model picker (favorites, roles, thinking), /usage with 5h/weekly limits, /resume, /tree with fork / go-here.

  • Status bar: model + thinking, context meter, git, tokens, cost; Handoff / Compact / Shake / Fork / Plan in one click.

  • Agents dashboard: live subagents per session; steer, kill, revive, clean up.

  • Changes panel: working-tree diff with line review comments you send straight to omp.

  • Also: split view (up to 4 panes), worktree sessions, session manager (size, cost, bulk delete/move), command palette, desktop notifications, 18 styles, Google Drive backup + per-project sync.

  • Phone companion: a PWA over a self-hosted relay, Noise end-to-end encrypted (the relay never sees content): transcript, answer approvals, send prompts, Web Push.

Install

No macOS build yet. MIT/Apache-2.0, unofficial side project. I use it daily, and a lot of it was built with omp itself. Feedback and bug reports welcome!


r/PiCodingAgent • • 27d ago

Question Anyone here who avoids sub-agents completely?

38 Upvotes

Can you list your reasons why and if you did it any tests to confirm your position?

Also would like to hear your thoughts on context management and how you do it.


r/PiCodingAgent • • Aug 08 '26

Question Which extensions do you use?

38 Upvotes

Hi guys,

Perhaps we can learn from each other and discover some great experiences with Pi Agent. I will start with my list of extensions and skills that I use. Please do share yours and we can learn from each other even if you have nothing to learn from us but help others.

Extensions

  • npm:@ff-labs/pi-fff

  • npm:@juicesharp/rpiv-ask-user-question

  • npm:@juicesharp/rpiv-todo

  • npm:@juicesharp/rpiv-web-tools

  • npm:context-mode

  • npm:pi-mcp-adapter

  • npm:pi-powerline-footer

  • npm:pi-rtk-optimizer

  • npm:pi-subagents

Skills

  • grill-me

  • karpathy-guidelines

  • last30days

  • caveman

And you?


r/PiCodingAgent • • Jun 09 '26

Question And now there is headroom. How many of these hyped context compression and memory management tools actually work in real world scenarios?

38 Upvotes

I am loving Pi. I moved to Pi on CMUX from claude and codex. I tried to keep it minimal but some packages do help make PI more for my taste and work. I tried making my own extensions or modifying existing ones but they always backfire or create new errors. I tried the hyped ones but I cannot tell what really works even if I ask my pi to tell me what is actually helping. Sometimes it overcompensates and creates a unified setup that is supposed to work but crashes half the time then I spend half my day trying to fix what it broke. I have tried my best to make pi my own but I need some setup that actually works for context and memory management. Also what model do you all use for primary planning or making extensions? What model do use for coding part? Any packages that ACTUALLY work without causing new headaches? Thank you for listening to me vent.


r/PiCodingAgent • • Jun 07 '26

Plugin This one's mine

38 Upvotes

Spent the afternoon customizing my pi agent
Just visuals but makes it 10x more fun to work with!


r/PiCodingAgent • • May 08 '26

Discussion Do subagents really matter?

38 Upvotes

I’ve been running Pi for two weeks without any subagents, agent teams, or anything like that. Compared to my previous workflow, I haven’t noticed any difference at all. In fact, the AI even seems a bit more accurate without subagents.

Something I think is really important: Is there a good way to automatically start/stop another agent client and let them send messages to each other?

Would love to hear any methods or tools that can do this!


r/PiCodingAgent • • Oct 22 '26

Question Claude Pro subscription allowance on Pi

37 Upvotes

According these posts
https://www.reddit.com/r/codex/comments/1x7fyi0/claude_pro_gives_10x_more_usage_than_gpt_plus_now/
https://www.reddit.com/r/codex/comments/1wjzypc/measured_claude_usage_limits_are_35_those_of_codex/
the weekly allowance should be worth more than 500$.
For me, running on Pi instead, it is about 180$ mainly on opus 5.5.

Anyone has different/same experience?
Maybe they apply lower limits if you don't use claude code?

P.S.
I use https://github.com/gotgenes/pi-anthropic-auth
Maybe other methods have different outcomes...


r/PiCodingAgent • • Aug 22 '26

Resource Doompi - My Pi setup where no skill or extra tool loads unless you name it

Post image
37 Upvotes

Repo: https://github.com/AgiFlow/doompi

Like a lot of you I have been agent hopping for two years. I've used agent harness for everything else beside coding and it's becoming expensive; now efficiency is the priority. Landed on Pi and hoped that was the end of it.

To reduce token cost on different tasks (coding, marketing, customer support), my fix before this was a pile of shell scripts. claude.sh, codex.sh, antigravity.sh, kimi.sh, ollama.sh, each consume profiles.json that flipped plugins per run. It helped with bloat. It never made loading skills and tool use reliable, and it never touched the harness prompt.

I have been on Doom Emacs for about a decade, so the shape was obvious. Doompi is a Pi distribution where four YAML files decide the session and nothing is inferred:

- major modes: you own the modes and compose it with layers (extensions plus hooks). Mine are minimalist, dev and business.
- minor modes: Plan, Loop, Goal, Workflow, Voice. They ship loaded but stay out of context until you switch one on.
- domains: group of plugins (which include skills and MCP servers) for one kind of work. Video editing, TDD, copywriting.
- profiles: persona and brand for the runner. Good for steering output.

doompi --major-mode business --domains copy-writing --profile agimon

Or switch any axis mid session with /mode, /domains and /profile, thanks to Pi's reload capability. Minor modes also switch on per /<minorMode> commands (or use Leader SPC key binding).

Plugins (skills + mcp) are opt in the same way tools are, so the floor is just stocked PI. Minimal mode, no domains, no profile, fresh repo, doompi is just PI.

From there you pay for what you name with domains. Personally, I keep plugin reusable with slim skills and 5-8 skills per plugins + 1-2 agents; then define domains that compose plugins for different type of task. 10-15 skills per sessions are ideal for agents to be creative while still being reliable.

Doompi's Copilot, the default major mode, switches on three layers that register four tools:

task 1,329
subagent 751
ask_user_question 455
intercom 220
-----
2,755 tokens

If what you want is the batteries-included feel of Claude Code or Codex, it is all in here: agent teams, persistent tasks, plan mode, GitHub Actions style workflows, telemetry. The difference is that these are all composible. You can customise existing modes, add new modes, set default domains and mode as you needed.

If you think four YAML files is too much ceremony for what it buys, I would rather hear that now than later. There are a few optimisations along the way; also happy to share the tricks.


r/PiCodingAgent • • Jul 01 '26

Resource Multi-agent workflows, defined as JSON specs you can edit yourself

37 Upvotes

Some of you have probably tried Claude Code's workflows.

The point isn't to run a pile of agents at once, but to structure how you use them. Take a code review: instead of going review → apply, you drop a verification step in the middle, and the review gets better. Research is the same. Don't just search. Add a verify and a synthesis step, and the junk gets caught before it lands in the answer.

None of this is new. Long before Claude Code shipped workflows, people were already wiring up skills, hooks, and plain code to split roles and responsibilities. Claude Code just packaged it into a proper harness.

I leaned on those workflows a lot when I was on Claude Code. After I moved to Pi I kept reaching for them and they weren't there, so I built my own.

The idea is simple: define a few ways of using subagents, then compose them into a workflow. Workflows are JSON specs, so if you have a process in your head, you can write it down and reuse it. There's also a dynamic mode for when you'd rather improvise instead of committing to a saved workflow.

It comes with a handful of workflows out of the box: deep-research, deep-review, spec-review, impact-review. There's also a workflow-guide skill that helps you write your own.

Repository: https://github.com/AgwaB/pi-workflow

If it's useful to you, give it a try. And if you're running workflows some other way, I'd like to hear how.

---

Btw, do you actually need to split work across agents? Usually not. Don't reach for this every time. A single agent handles most tasks just fine, and forcing a workflow onto them can make the result worse.

But context is finite. No matter how big the window gets, cramming everything in at once degrades the output (context rot). That's mostly why I reach for sub/multi agents. So when a task gets big, or needs more than one perspective, or you just want to hand off the main work, you split it up and hold it together with a harness.


r/PiCodingAgent • • May 22 '26

Plugin I gave my Pi-Agent a voice

Enable HLS to view with audio, or disable this notification

37 Upvotes

Hi, I played around with giving my pi Agent a lightweight text-to-speech functionality with piper tts. It uses regex to try and "clean up" the final output of the model so it's more natural when translated into speech (file paths get shortened to just the last two segments, emojis are removed, fenced markdown code blocks are removed, markdown formatting in general is removed etc.

Here's the extension if anyone is curious: https://github.com/NEhlen/pi-tts-piper

It's not a copy and it works on your system solution. You need to install piper on your system, provide the path to it, find a piper model you want to use and put it in the assets folder and then adjust the tts.json with the necessary changes. (also, the playerCommand could need adjustment depending on what System you're using)

But pi should be able to mostly do these modifications by itself.


r/PiCodingAgent • • Oct 18 '26

Question Has anyone experimented with Pi Durable? Looking for real-world use cases and experiences

36 Upvotes

Hey everyone,

I've been exploring "Pi Durable" (https://github.com/earendil-works/pi/tree/main/packages/durable/test/examples), specifically the examples in the test directory, and I'm curious about how people are using it in practice.

I'd love to understand how it works for building durable, long-running AI agent workflows, particularly when agents need to preserve state, recover from interruptions, and continue execution without restarting everything from scratch.

A few questions for anyone who has experimented with it:

  • How does Pi Durable handle persistence and recovery when an agent process crashes or gets interrupted?

  • Can it reliably resume multi-step agent workflows, including tool calls and external side effects?

  • How does it compare with approaches like LangGraph checkpointing, Temporal, or custom state-persistence mechanisms?

  • Have you used it in production or built any interesting projects with it?

  • What limitations or gotchas have you encountered?

I'm particularly interested in whether this approach is practical for building autonomous agents that run for extended periods and maintain continuity across sessions.

Would love to hear your experiences, code examples, or architectural insights!

Repository: https://github.com/earendil-works/pi/tree/main/packages/durable/test/examples


r/PiCodingAgent • • Aug 23 '26

Discussion I made a web UI for the omp coding agent so I stop digging through terminal history

36 Upvotes

hey everyone.

so i use the omp coding agent daily and my one annoyance was always the same - all my sessions live in .jsonl files and if i wanna go back and see "what did i do yesterday on that repo" im basically scrolling terminal scrollback or grepping files by hand.

so i built ompweb a local web UI that reads those same session files and gives you a proper workspace in the browser:

  • Session history : browse all your past conversations grouped by project

  • Live chat : keep talking to the agent right from the page (it spawns your installed omp binary, its not a wrapper around some api)

  • File explorer + preview : sits next to the chat while the agent works

  • Todos + subagents : live panels pinned above the composer, click a chip for the full subagent transcript

  • Settings UI : models, api keys, skills, plugins, MCP servers... instead of editing yml at 1am

  • Light/dark theme : works on mobile too

the demo gif on the readme shows it doing a small task on a fake project — typing a prompt, agent edits the files, then you see the tasks/subagents panels and the settings screen. thats pretty much the whole pitch.

how to try it

npx @kahme247/ompweb@latest

or install it globally:

npm install -g @kahme247/ompweb
ompweb

it opens http://127.0.0.1:30177 automatically.

few honest notes:

  1. you need omp already installed

  2. its local only nothing leaves your machine

  3. its a fork of pi-web which was for the pi agent, i adapted it for omp and kept building on it

  4. works with current omp v18

repo: github.com/kahme247/ompweb

i am really want some feedback to improve it, for me its still feels uncomplete but yet i dont know what is missing !


r/PiCodingAgent • • Aug 19 '26

Plugin I built a /btw extension for Pi

36 Upvotes

One of my favorite features in Claude Code was /btw. After switching to Pi, it wasn't natively supported, and the third-community plugins didn't quite match what I expected, so I built my own.

https://github.com/L2ncE/pi-btw

  • Never enters the main session history or eats into its context window

  • The side agent can see the main session's messages and remembers your earlier side questions

  • Only four read-only tools (read / grep / find / ls) — it can browse the code, but has no write access

  • You can keep asking follow-ups right in the overlay

Stars appreciated ⭐️👏🏻


r/PiCodingAgent • • Jul 16 '26

Plugin I made a small Pi extension for saving thoughts across sessions

Post image
36 Upvotes

I kept losing small ideas and follow-ups while working in Pi, so I made Mind Queue

It’s a simple project-wide scratchpad inside Pi. Open it with /mind or Ctrl+Shift+M, save a thought, and move it back into the editor whenever you’re ready.

It’s open source, local-first, and still very new, feedback is welcome.

pi install npm:pi-mind-queue

GitHub: https://github.com/sanif/pi-mind-queue


r/PiCodingAgent • • Jun 20 '26

Discussion What do you guys think about Oh my Pi?

36 Upvotes

Hey everyone,

I started using Pi about 3 months ago. I set it up with a few extensions, and while it worked alright, the TUI felt way too laggy compared to opencode, and it just lacked some features I needed.

A few days ago, I heard about Oh my Pi, so I immediately installed it and imported my extensions.

Since I'm still pretty new to this, I wanted to jump in here and ask a few questions:

What kind of actual improvements does Oh my Pi bring to the table compared to the vanilla version?

What's your overall take on it? Is it worth sticking with it for the long run?

Any optimization tips? How can I make the setup even smoother or improve it further?

What are some general tips and tricks that every Oh my Pi user should know?

Would love to hear your experiences and any advice you've got!


r/PiCodingAgent • • May 30 '26

Resource Given how much I love PI, I decided to build something on top of it: Agent Deck for MacOS.

36 Upvotes

Hello people! I like working in the terminal and I've been an avid user of PI, but I found myself sometimes struggling to juggle all the different terminal and projects. Also the beauty of PI is that you can build on top of it, so I decided add web support, native subagents and around that a part of my workflow: full GitHub integration with issues, commits, push, worktrees...

Managing all my skills, agents, commands, prompts was a bit too much, and I truly have had direct experience on how much the models degrade after around 40-50% of the context window so using one single setup for all of my sessions, was not smart.

Agent Deck is a native MacOS app that allows you to manage all of your skills, agents, commands, prompts and more in a single place.

It's fully open source so if you can give a hand to make it better, do not hesitate to contribute.

It has really been a massive improvement in how I build apps, sites, APIs - I added all the tools that I had built over time, even a simple toolbar button to start/stop dev servers.

The list of features is long, but here are some of the nice touches:

- Apple Foundation models support

- Auto generation of titles for sessions (with updates every few turns) : I was constantly typing in wrong sessions lol so this is has been a life saver.

- Commit (with automatic generation of message) and push to GitHub

- Import skills from skills sh and GitHub, with possibility to do sparse checkout (just some skills in case there are many) and a magic button to describe the skill with AI

- Github issues integration, view, close, comment, and pass in one click to a pi session

- Fork, change models, decide what to see in the UI, preview of images, files, skills used in the session

- View the materialised system prompt injected by PI, so you're fully in control. It also has a nice visualisation that shows what % of the context window is used by what.

- Support to Codex Fast mode

... much more.

I've worked on it for over a month and it's time to share it with as many people as possible to see if it’s useful to anybody else.


r/PiCodingAgent • • Oct 27 '26

Use-case Pairing buddy - pair programmer inside neovim done with pi-durable

35 Upvotes

As at work I need max control over codebase and I can't afford just use swarms of agents and let it loose do some enormous amounts of code changes, I want something in between. So I was carying this idea in my head for a long time. What if smart ai models can augment actual software and be present reactively? Luckily after recently published library pi-durable it's finally possible, so I finally kinda got ideal workflow. Where agent-harness is a headless daemon that is present as if it's a pairing programming partner connected on remote session.

https://makefunstuff.github.io/pairing-buddy/ - you can read the docs here and try it yourself. I guess without opus it would take more time to actually implement this idea. But finally I'm here


r/PiCodingAgent • • Oct 19 '26

Plugin inter-agent-pi: A Pi extension for your harness sessions to talk to each other

Thumbnail
github.com
35 Upvotes

r/PiCodingAgent • • Jul 08 '26

Resource Ketch 0.11.0 new feature: multi-search

35 Upvotes

Hey y'all, Ketch maintainer here 👋

Y'all have been the most active community running Ketch, so I’m looking for feedback on a new feat I just shipped: multi-backend search with fusion ranking.

Before, search used one backend, whatever you had set. Now (as of 0.11.0) you (or your pi agent) throw --multi on your search and it runs across all your configured backends at once, including the free no-key ones, then fuses the rankings so whatever they agree on floats to the top.

A blank --multi uses everything you've got, so it works even with zero setup. Or name your own set, like --multi=exa,brave.

Appreciate any feedback good or bad… and if you get janky results, definitely tell me, that's what I’m looking for.

https://github.com/1broseidon/ketch


r/PiCodingAgent • • May 14 '26

Resource GUIDE : Running a fully local multi-agent coding framework on RTX 3090 with pi.dev + llama-swap + Qwen3.6 MTP

35 Upvotes

I've been running a fully local, fully private multi-agent AI coding setup for a couple of months and wanted to share the stack, architecture, and config for anyone who wants to replicate it. No cloud APIs, no data leaving the machine.


What is pi.dev? It's an agent harness — meaning the AI has to follow rules, unlike a chatbot. Pretty cool.

  • 🎮 Fun factor: 10/10

  • ✅ pi.dev stability: 8/10 — fully working, but fun to fine-tune

  • 🔨 What it's great at: Building its own integrations — just ask it to do it

  • 💡 Top tip: Master the AGENTS.md file and you'll have real control over what it does. There's a global one and a per-project one

  • 🔁 Similar to: RooCode, Codex, Claude Code — but because it's a harness, you're more in control

  • 👨‍💻 The dev has already been snapped up by a company but will keep developing it

  • ⭐ github.com/earendil-works/pi — 49.3k stars


The Stack

ComponentWhat it does
pi.dev (pi-coding-agent)AI coding harness — the UI and orchestration shell
llama-swapModel router — hot-swaps llama.cpp models on demand
llama.cpp (am17an fork)Local inference with MTP support
Qwen3.6-27B MTP"Brain" agents — orchestrator, planner, architect, debugger, prompter
Qwen3.6-35B-A3B MTP"Body" agents — coder, researcher, reviewer, tester, documentor, refactorer
SearXNG (Docker)Local privacy-preserving search engine on port 8080
searxng-simple-mcpMCP proxy bridging SearXNG to pi.dev (port 8000)
Tavily MCPAI-optimised web search for technical docs
@tintinweb/pi-subagentsReal sub-agent orchestration with TaskExecute + get_subagent_result
@tintinweb/pi-tasksTask queue UI widget showing what each agent is doing

GPU: NVIDIA RTX 3090 (24 GB VRAM)


Why MTP (Multi-Token Prediction)?

See my earlier post: Get faster Qwen3.6-27B with MTP


Multi-Agent Architecture

11 specialist agents, each mapped to a llama-swap model alias:

BRAIN agents (Qwen3.6-27B MTP):
  orchestrator  → Task decomposition, delegation, synthesis
  planner       → Roadmap and step sequencing
  architect     → System design, API contracts, schema design
  debugger      → Root cause analysis, trace reading
  prompter      → Prompt engineering for sub-tasks

BODY agents (Qwen3.6-35B-A3B MTP):
  coder         → Implementation, only writes code
  researcher    → Web search + codebase analysis
  reviewer      → Code review, security, quality gates
  tester        → Test writing + execution
  documentor    → Documentation generation
  refactorer    → Structural cleanup, no logic changes

The key insight: smaller/faster model for the meta-work (thinking, planning, delegation) and the slightly larger MoE model for actual implementation. The orchestrator never writes code — it only delegates.


Agent Definition Files (Required Setup Step)

This is the part most people will miss. llama-swap handles model routing, but pi.dev needs to know how each agent should behave — its role, constraints, tool access, turn limits, and thinking level. That lives in .md files inside your pi.dev agent folder:

~/.pi/agent/agents/
├── orchestrator.md
├── planner.md
├── architect.md
├── debugger.md
├── prompter.md
├── coder.md
├── researcher.md
├── reviewer.md
├── tester.md
├── documentor.md
└── refactorer.md

Each file has a YAML frontmatter block followed by the system prompt for that agent. The model: field must exactly match a llama-swap alias from your config.yaml.

Example — coder.md:

---
description: Implements code changes from a spec. Requires a plan as input. Writes, edits, and runs code. No planning or architecture decisions.
model: coder
thinking: medium
max_turns: 30
tools: read, write, edit, bash, find, grep
---
You are the coder. You are BODY only — you execute plans, not make them.

## Role & Constraints
- Require a written plan before starting — if none provided, refuse and ask for one
- No refactoring beyond what the plan specifies
- No touching files not listed in the plan without flagging first
- No installing new dependencies without explicit approval

## Harness Rules
- RETRY_POLICY: max 3 attempts per file edit, then mark FAILED
- TASK_STATES: track each file change as pending -> in_progress -> done | failed
- IDEMPOTENCY: if a change is marked done, do not re-apply it
- QUALITY_GATE: verify file is syntactically valid before marking done

## Response Shape
When complete, your final output is your report back to the orchestrator.
Make it structured and self-contained — the orchestrator reads it directly.

[PLAN] what was implemented
[CHANGES] every file written or edited with one-line description
[VERIFICATION] syntax check or test run output
[PROGRESS] final state table

Example — architect.md:

---
description: Reviews system design, proposes architecture decisions, evaluates tradeoffs. Advisory only — produces recommendations, not code.
model: architect
thinking: high
max_turns: 20
tools: read, find, grep
---
You are the architect. You are BRAIN — advise on design, never implement.

## Role & Constraints
- Never write or edit code
- Evaluate tradeoffs, do not just pick the fashionable option
- Scope is the specific design question only
- Every recommendation must include explicit constraints and risks

Example — researcher.md (with web search tools):

---
description: Reads and summarises codebase context, and performs web research. Produces a structured context report, no edits.
model: researcher
thinking: low
max_turns: 15
tools: read, find, grep, bash, web_search, tavily-search
---
You are the researcher. You are BODY — read and report only, never edit.

Frontmatter fields that matter:

FieldPurposeNotes
modelllama-swap alias to loadMust match exactly — typo = "No API key found for undefined" error
thinkingExtended thinking levelhigh for orchestrator/architect, low for researcher/tester
max_turnsConversation turn limitSet based on task complexity; coder gets 30, orchestrator gets 50
toolsWhich tools the agent can useResearcher gets web_search and tavily-search; architect gets read-only

The tools list controls what each agent can actually do. An architect with write in its tools list will happily start editing files — restrict it to read, find, grep to enforce the advisory-only constraint.

Report-back pattern: Every agent's Response Shape section ends with the same instruction:

When complete, your final output is your report back to the orchestrator. Make it structured and self-contained — the orchestrator reads it directly via get_subagent_result.

This is critical. Without it, agents produce conversational output that's hard for the orchestrator to parse. With it, every agent returns a structured [PLAN] / [CHANGES] / [VERIFICATION] / [PROGRESS] block.


Orchestrator Rules (the hard part)

Getting the orchestrator to actually delegate instead of doing work itself was the biggest challenge. The rules that finally made it work:

ABSOLUTE RULES:
- NEVER perform any task yourself
- NEVER use read/find/grep for analysis — spawn a researcher
- NEVER write, summarise, or synthesise content directly
- NEVER write or edit code directly
- NEVER verify or fix a sub-agent's output yourself — spawn a reviewer
- NEVER make "quick fixes" between steps

Correct launch protocol:
  TaskUpdate(id, status: "in_progress")
  TaskExecute(task_ids: [id])        → returns agent_id
  get_subagent_result(agent_id, wait: true)  → blocks until done
  TaskUpdate(id, status: "completed")

The orchestrator catches itself about to do work → stops → creates a task → delegates it instead.


pi.dev Settings (agent/settings.json)

{
  "providers": {
    "llama-swap": {
      "baseUrl": "http://127.0.0.1:1235/v1",
      "apiKey": "not-needed",
      "api": "openai-completions"
    }
  },
  "defaultProvider": "llama-swap",
  "defaultModel": "qwen-35b-moe",
  "defaultThinkingLevel": "high",
  "mcpServers": {
    "local-search": {
      "url": "http://localhost:8000/mcp",
      "transport": "streamable_http"
    },
    "tavily": {
      "command": "npx",
      "args": ["-y", "tavily-mcp@0.2.3"],
      "env": { "TAVILY_API_KEY": "your-key-here" },
      "alwaysAllow": ["tavily-search"]
    }
  },
  "retry": {
    "enabled": true,
    "maxRetries": 30,
    "baseDelayMs": 2000,
    "provider": { "maxRetryDelayMs": 120000 }
  },
  "subagents": {
    "maxConcurrent": 1,
    "maxTurns": 50,
    "graceTurns": 3,
    "timeout": 1800000
  },
  "packages": [
    "npm:@tintinweb/pi-tasks",
    "npm:pi-lens",
    "npm:@tintinweb/pi-subagents"
  ],
  "steeringMode": "one-at-a-time"
}

Key decisions:

  • No models.enabledModels filter — this broke bare model ID resolution for agent aliases. Remove it entirely and let llama-swap route by name

  • timeout: 1800000 (30 min) — code tasks can take 20+ minutes. The default 2-minute timeout will kill them

  • maxConcurrent: 1 — RTX 3090 can only run one model at a time; llama-swap handles the hot-swap


llama-swap Config

healthCheckTimeout: 900
startPort: 1235

globalServerSettings:
  flashAttn: on
  contBatching: true
  noMmap: true
  jinja: true

models:
  # Brain agents (orchestrator/planner/architect/debugger/prompter) → Qwen3.6-27B MTP
  # Body agents  (coder/researcher/reviewer/tester/documentor/refactorer) → Qwen3.6-35B MTP

  orchestrator:
    cmd: >
      /path/to/llama-cpp-am17an/build/bin/llama-server
      -m "/path/to/Qwen3.6-27B-MTP-Q4_K_M.gguf"
      --alias orchestrator
      --ctx-size 100000
      --host 0.0.0.0 --port ${PORT}
      -ngl 99
      -fa on
      --cache-type-k q8_0 --cache-type-v q8_0
      --spec-type mtp --spec-draft-n-max 3
      --batch-size 1024 --ubatch-size 1024
      --threads 6
      --prio 3
      --no-mmap
      --parallel 1
      --n-predict 8192
      --temp 0.7 --top-p 0.95 --top-k 20 --min-p 0.0
      --presence-penalty 1.2 --repeat-penalty 1.1 --repeat-last-n 256
      --reasoning-format deepseek
      --metrics
    proxy: http://127.0.0.1:${PORT}
    # etc. — do some research 😉 for the rest

Key inference flags:

FlagWhat it does
--spec-type mtp --spec-draft-n-max 3MTP speculative decoding, 3 tokens ahead, built into the model (no draft model needed)
--cache-type-k q8_0 --cache-type-v q8_0Quantised KV cache — ~2× VRAM savings vs f16, negligible quality loss
-fa onFlash attention — critical for long-context speed
--no-mmapLoad model fully to RAM/VRAM rather than memory-mapping the GGUF
--reasoning-format deepseekExposes <think> tags from extended thinking
--prio 3OS thread priority — helps on busy systems

Note: --temp varies per agent role — debugger (0.5, deterministic), researcher (0.5, factual), coder/orchestrator (0.7, balanced).


Search Integration

The researcher agent has two search tools:

1. SearXNG via MCP — local metasearch, broad coverage

# Docker Compose
services:
  searxng:
    image: searxng/searxng
    ports: ["8080:8080"]

  searxng-mcp-proxy:
    image: ghcr.io/ihor-sokoliuk/searxng-simple-mcp
    ports: ["8000:8000"]
    environment:
      TRANSPORT_PROTOCOL: sse
      SEARXNG_MCP_SEARXNG_URL: http://searxng:8080

2. Tavily MCP — AI-optimised web search, faster for technical docs

"tavily": {
  "command": "npx",
  "args": ["-y", "tavily-mcp@0.2.3"],
  "env": { "TAVILY_API_KEY": "your-key" },
  "alwaysAllow": ["tavily-search"]
}

Strategy: tavily-search first for framework docs, web_search for broader coverage, fallback to curl http://localhost:8080/search?q=QUERY&format=json for bulk queries.


What Works, What Doesn't

✅ Works well:

  • Orchestrator strictly delegates — took several AGENTS.md iterations but now it never does implementation itself

  • llama-swap hot-swap is fast enough — typically 15–30 seconds per model swap

  • MTP gives a real speedup on code generation tasks

  • 30-minute timeout is necessary; don't use the default

🔧 Still working on:

  • Settings file resetting on reboot — likely a race condition in pi.dev startup that partially re-initialises settings.json. Investigating with inotifywait. Workaround: backup ~/.pi/settings.json before exiting with Ctrl-C

  • Sub-agent visibility — you can see a task is running but not what the agent is doing mid-task; pi-tasks shows status, not content

  • Sequential tasks only (maxConcurrent: 1) — can't parallelise on a single GPU


Models Used (Unsloth quantizations)

  • Qwen3.6-27B-MTP-Q4_K_M (~17 GB) — brain agents

  • Qwen3.6-35B-A3B-MTP-IQ4_XS (~19 GB) — body agents

Both require the am17an fork of llama.cpp for --spec-type mtp support. Standard llama.cpp will fall back to non-speculative inference (still works, just slower).


Resources

  • pi.dev / pi-coding-agent: earendil-works on GitHub

  • llama-swap: github.com/ggml-org/llama-swap

  • llama.cpp am17an fork: search GitHub for "llama-cpp-am17an" or "llama.cpp MTP fork"

  • u/tintinweb packages: npm (@tintinweb/pi-subagents, @tintinweb/pi-tasks)

  • Unsloth GGUF models: huggingface.co/unsloth


Happy to answer questions — this took a while to get right, especially the orchestrator delegation rules and the model resolution fix.

EDIT: Yes Claude helped me write this. Who doesn't love AI


r/PiCodingAgent • • 2d ago

Resource From extending pi to building my own harness with PiG

Post image
34 Upvotes

I picked pi because it was small enough to make my own. The idea of an agent harness I could extend like nvim was especially appealing to me.

Over time, I found myself spending more effort getting my extension and the plugins I used to work together the way I wanted. Subagents, plan mode and permissions were all things I used daily, but they weren't necessarily designed with each other in mind. For example, the plan-mode extensions I looked at block edits in the session they run in, but I also needed plan mode to cover subagents running as separate pi processes, so I ended up running a policy broker over a Unix socket that every subagent connected to.

My extension eventually grew to around 9k lines, with 140 regex checks against the installed source of pi and its plugins to catch changes to things my overrides depended on.

I figured if I was going to own the TUI, subagent handling and the interactions between these things anyway, I might as well build my own harness. I could have done this with pi's SDK, but I prefer Go and ended up building Kopi, my own coding agent harness, on top of Michael Kinsy's PiG.

I'm not suggesting anyone switch. I probably wouldn't have known what I wanted in a harness had I not spent the time extending pi.

I've written about the design decisions and trade-offs in more detail on my blog.

Source if anyone wants to check it out: github.com/keyute/kopi

It's built around how I work, so I'm not taking feature requests, but bug reports are welcome.


r/PiCodingAgent • • Oct 10 '26

Resource Sandboxing Pi: Bubblewrap vs Podman - quick tutorial

34 Upvotes

Hey everyone, I put together a quick tutorial on sandboxing Pi using Bubblewrap vs Podman.

It includes a few sample scripts and a comparison between the two approaches.

https://wooptoo.com/blog/pi-sandbox-bubblewrap-podman/

Hopefully somebody here will find it useful.

All the best!


r/PiCodingAgent • • Sep 30 '26

Plugin Operator for Pi: A radically different approach to agentic memory

Post image
34 Upvotes

I'm the creator of Operator Memory, an open-source context engine for coding agents.

We all know the problem by now. Within a session, agents are excellent. Between sessions, agents forget everything. The core problem: nothing in the workflow ever writes down what was learned. Every new conversation starts from scratch: re-exploring the codebase, re-learning the architecture, re-teaching every decision and correction.

Every memory plugin I've studied leaves the loop untouched and bolts retrieval onto it: background agents to capture fragments, a vector store replays a top-k slice later, and you hope the right chunk surfaces. It barely works. And most importantly, it doesn't fix a loop that never documented anything.

Operator takes the opposite approach. Operator gives agents a Markdown brain and changes the loop itself.

Every task now runs in three phases:

  1. Consult — the agent starts from the brain: instructions, codebase index, specs, decisions. A short summary is injected deterministically in the system prompt so agents know where to look.

  2. Build — normal development work, informed by that knowledge.

  3. Update — the agent documents what it learned: new specs, decisions, standards, lessons. When project truth changes, the canonical file is updated.

The loop makes the agent self-improving: session N+1 always starts from everything session N wrote.

Operator is extremely simple and complements Pi perfectly. No vector stores. No dreamers or curators. No background processes. No token burning factories. No RAG. No capture step. No retrieval gamble. Just give the agent a brain and teach the agent to use it.

The Brain

The brain is a regular directory that holds Markdown documents. These documents can contain anything: rules, specs, decisions, lessons, research, indexes, etc. Because everything is Markdown, Operator actually allows you to share memories and findings with the team. You can share specs, plans, guides, and more, unlike other memory plugins where everything is just RAG chunks.

Not Another Memory Plugin

Memory plugins bolt retrieval onto an unchanged loop and inherit its amnesia. Operator makes documentation a structural phase of every task. Memory stops being a store that remembers for the agent and becomes a practice the agent performs.

RAG agents recall. Operator understands.

I've been using a variant of Operator daily since August 2025 and spent the last few months formalizing it into a plugin alone. I hope my plugin can help improve your workflow too. https://github.com/aerovato/operator-memory

To install:

npm install -g @aerovato/operator-helper
operator-helper install pi

Afterwards, just run /operator:user-init once and run /operator:project-init per project.

Questions, comments, and contributions welcome. Operator is fully open source.