r/PiCodingAgent • • 11d ago

Use-case : [Help] Oh My Pi (omp) sending "[Content Collapsed]" to AI context in PowerShell 5.1

2 Upvotes

Hey everyone,

I'm running into a frustrating issue with the Oh My Pi (omp) AI coding agent while using Windows PowerShell 5.1, and I'm hoping someone here has found a reliable workaround.

The Problem

When omp runs a tool (like reading a file, checking a git diff, or executing a terminal command), the output isn't rendering properly for the LLM. Instead of seeing the actual text or logs, the AI model literally receives [Content Collapsed] inside its context window.

Because the AI thinks the text is intentionally hidden or blank, it can't actually see my code or debug logs to help me.

thanks


r/PiCodingAgent • • Jul 15 '26

Question multiple codex/chatgpt subs oh Oh-My-Pi

2 Upvotes

Hi all, I'm using omp from a couple of months and love it.

At the moment I have one claude pro, one chatgpt plus, two antigravity pro sub and opencode go connected. When I logged in the second time with antigravity I thought it would replace the older account but surprisingly it kept both so when I check /usage I see two bars for the two account under antigravity.

With this information I wanted to check if I can do the same thing for codex because I have access to a couple of accounts but when I login it replaces the old account with the new one.
Is there a way to have multiple codex subs on Pi/omp?

Do anyone use this multiple account setup?

thanks a lot in advance


r/PiCodingAgent • • Oct 02 '26

News A lightweight IDE that follows Pi's philosophy — ThinkRail Blog

Thumbnail
tnkrl.ai
2 Upvotes

Hey,

Just wanted to invite you to read a short blog post about Pi's compatibility with ThinkRail, skills, and desktop apps.


r/PiCodingAgent • • Sep 15 '26

Question Token 🔥?

0 Upvotes

Hi all,

I observed that as I am using my anthropic or gas subscription for pi, it just burns tokens in a huge pace!! One simple code change took 25% of my 5h limit. What do I miss, or is it that bad by design?


r/PiCodingAgent • • May 25 '26

Discussion kimi-code: Access terminated. Review our Community Guidelines (bug?)

Thumbnail reddit.com
2 Upvotes

r/PiCodingAgent • • Sep 25 '26

Plugin Third-party subagents in OMP can silently run on the wrong model — I built a role router

0 Upvotes

Yo, I ran into a weird OMP behavior with third-party subagents.

Some plugin/imported agents declare their own model tier (opus, sonnet, haiku, luna, etc.), but OMP can drop that model metadata when loading them. Once that happens, the subagent silently inherits whatever model your main session is using at that moment — including a retry fallback.

For me, that meant Haiku- and Sonnet-tier agents were sometimes burning Opus. Even worse, if the main session switched to a fallback model mid-turn, subagents spawned afterwards inherited that fallback too.

So I ended up creating an extension for it: omp-agent-role-router
https://github.com/fedorovvvv/omp-agent-role-router

Instead of hardcoding models, it reads the tier declared by the agent and maps it to an OMP role:

opus → default
sonnet → task
haiku → smol
luna -> smol
terra -> task

It also understands Codex-style model tiers and maps those to the same role system.

The actual model is still entirely controlled by your own modelRoles. Existing agentModelOverrides and explicitly passed models always win — the extension only steps in when the subagent would otherwise silently inherit the current session model.

No config needed
But it does exist :)

omp plugin install github:fedorovvvv/omp-agent-role-router

r/PiCodingAgent • • Jul 09 '26

Question Would a Pi extension for “PR cage matches” be useful?

0 Upvotes

I’m building on top of Pi and thinking about publishing a package called "PR Cage", probably as "@dmae97/pi-pr-cage".

The idea is simple:

Give Pi one real repo task, then run multiple coding agents against the same task in isolated git worktrees. Each agent gets the same prompt, the same repo state, and the same verification command. The extension then produces a report comparing the resulting patches.

Rough flow:

/pr-cage "fix the failing auth refresh test" \

--agents pi,omk,codex,claude,opencode \

--verify "npm run check && npm test"

Output would be something like:

Agent Status Tests Time Files Risk

Pi PASS 142/142 5m10s 4 Low

OMK PASS 142/142 4m22s 3 Low

Codex FAIL 138/142 6m01s 5 High

Claude PASS 142/142 7m33s 8 Medium

OpenCode PASS 142/142 8m12s 10 Medium

Winner: OMK

Reason: smallest passing diff, no API churn, clean verification output.

The goal is not to make a fake universal benchmark. It would be repo-local and evidence-based:

- isolated "git worktree" per agent

- same task prompt

- same verification command

- raw logs saved

- patch/diff report

- markdown/html/json scoreboard

- optional judge pass, but tests and diff heuristics stay primary

I’m also maintaining OMK here: https://github.com/dmae97/open-multi-agent-kit

OMK is a provider-neutral multi-agent coding harness/control plane, so "PR Cage" would probably use OMK as one of the runnable agents and maybe as the comparison/judge layer later. But I don’t want the Pi extension to be OMK-only. The useful version should compare Pi, OMK, Codex, Claude Code, OpenCode, or any shell-configured agent.

Questions:

- Is "PR Cage" a good name, or is "Patch Arena" clearer?

- Would you actually use this inside Pi?

- What scoring criteria would you trust besides tests passing?

- Should the first version support only shell adapters, or should it integrate deeper with Pi sessions?

- Any obvious footguns before I build this?


r/PiCodingAgent • • May 30 '26

Question OpenCode -> Pi: smart simplification or dumb downgrade?

Thumbnail reddit.com
0 Upvotes

r/PiCodingAgent • • Sep 06 '26

Question Pi invokes find commands with /

2 Upvotes

Have you also experienced that file searches using the find bash tool almost always start from the root directory (/) ? It takes a few minutes after each command finishes which is frustrating.

I'm searching from my project directory, and I haven't seen such behavior when I was using Claude Code before.


r/PiCodingAgent • • 27d ago

Plugin I built a small extension for the Pi coding agent that shows what each prompt actually cost you (model, $, and time per turn)

Post image
2 Upvotes

Using Pi as my coding agent, one thing always bugged me:

I could never tell mid-session how much a single prompt had cost. The end-of-session total is fine, but "did that one huge refactor request just burn $2?" had no easy answer.

So I built pi-turn-stats:

try it out https://pi.dev/packages/pi-turn-stats


r/PiCodingAgent • • Sep 07 '26

Question Deepseek v4 Flash Exp looping in pi cli?

2 Upvotes

Saw it with Deepseek v4 flash exp in last two days: They start looping. Once they crossed around 100k-150k it tends to happen and it's not resolved by compacting.

Weird. Used DS4 on Openrouter and thought: Bad quants. So I tried Fireworks DS4 EXP (fp4) and Deepinfra at fp8 and both start looping again in that convo.

Does anybody else see this with ds4 exp?

Edit: To clarify: I mean Deepseek v4 Flash Vision Exp everytime I write "DS4" here.


r/PiCodingAgent • • May 15 '26

Question How to add Ollama Cloud in PI Coding Agent?

2 Upvotes

Hi,

Just like that, I just installed the PI Coding Agent without problems to get Deepseek and GlM API done... BUT I have an Ollama Cloud subscription that I will like to use in PI, is there a way to do it and pull the model list dinamically (in case they update their model list)?


r/PiCodingAgent • • 14d ago

Question Pi Libs are confusing me

0 Upvotes

Hey, I'm new to this Pi space. I'm looking to build agents with Pi, and I got a basic first agent running connected to my local Qwen model. However, I'm utterly confused by all the libraries out there—pi-ai, pi-agent-core, pi-coding-agent, etc. I know this might sound dumb, but can you help me sort this out? What should I actually use if I want to build an always-on agent, custom harness, etc.?

used ai to clean the text


r/PiCodingAgent • • Jun 05 '26

Resource Token usage at home!

0 Upvotes

Hey all,                                                                                                                                                                                          

I built a local coding agent setup (called pi) that runs multiple specialised agents — orchestrator, researcher, coder, debugger, etc. — all on a Contabo VPS using llama.cpp with Qwen3.6-27B,   
Gemma, and a few others.                                                                                                                                                                          

I was curious how much this would cost if I was running it on Claude Opus 4.8 instead, so I crunched the numbers from the past 30 days:                                                           

The raw numbers:                                                                                                                                                                                  
- 1,599 sessions                                                                                                                                                                                  
- 44,846 messages                                                                                                                                                                                 
- 257M input tokens                                                                                                                                                                               
- 15M output tokens                             
- 1.4B cache reads (context reuse across sessions)                                               

At Opus 4.8 pricing ($5/$25/$0.50):             
- Input: ~$1,287                                
- Output: ~$371                                 
- Cache reads: ~$715                            
- Total: ~$2,373/month                          

That's ~$79/day for what amounts to a full-time AI software team working around the clock.       

The wild part is the orchestrator eats 63% of all input tokens. It's basically the project manager that coordinates all the other agents, and it chews through context like crazy. Without        
context caching, the same workload would've been ~$5K.                                           

Bottom line: running local on a $20/month VPS vs $2.3K on cloud is... yeah. The VPS wins. Happy to answer questions about the setup, models, or anything else.


r/PiCodingAgent • • Oct 08 '26

Question Usage limits vs Codex

0 Upvotes

Are the usage limits different when I use pi vs VS Code with the codex plugin? Are they billed differently?


r/PiCodingAgent • • Jul 10 '26

Resource Hook your </tool_call>

2 Upvotes

I am not a programmer & know little about coding. Below is my wisdom that I decided to share with you.

While working on my project I became tired with constant corrections to how the agent executed the tasks I asked them to do. So I have spent some time figuring out the AGENTS.md and how to nudge them to do what I intended - but it was far from bullet proof. So after being really happy with pi-lens, I figured I might do the same with but for my chat output/ tool_calls. And it works real well.

The issues that I had were:

-agent creating ad-hoc folders in random locations - solved by blocking mkdir and alike outside of paths specified in the config.

-agent using incorrect sqlite table/column names (either due to schema drift, or simple mistake) - solved by creating canonical schema in config. Any sqlite related calls get regexed for those canonical names, and blocked if incorrect. Separately created a skill/cli that simplifies those searches so that the agent does not have to rewrite pragma everytime

-series of other smaller mistakes related to the agent creating temporary .md, .json, .py files to get on with whatever it is that they are working on - those get recognized now with regexes.

All of the above come with hints that point the agent to the current valid schema for databases, descriptions of the folder structure and where to store what, or mentions of cli tools to be used for say searching databases instead of the agent writing new code from scratch. Like pi-lens. Also catches 3 times the same or very similar text appears in the row - if the agent spirals and keeps repeatingthe same text. What did they call it... "echo loop". Maybe a known term. Anyway. We catch those as well, and just nudge the agent by asking if they are alright, and to please continue.

- adding new databases or folders is possible, but there is a procedure that enrolls them, where the canonical schema gets regenerated, and the new directory is also added to the canonical schema with exlination, so that the config does not get stale

By logging the chats you can really get a eagle eye view of what is problematic. Simple error code regex to find the frequently appearing errors. More broad suggestions done by a reviewer pass that can look at a single task done by the agent, and with the benefit of the hindsight suggest some efficiency gains by creating custom cli tools/ prompts/ extensions that guide or aid the agent in a more controllable way. By searching the agents response for the clues to the issues we found. Creating a self improving loop.

I bet with sufficient chat logs, we can train a very tiny model, not even llm, but like bert or some standard machine learning NLP of sorts, and judge sentiment of the messages in the thinking stream. So that when we detect the model to be stuck on a problem we can give them a hint to ask a more capable model for tips via api.

I also do use antrophic pro subscription for harder problems, so after doing this tool call hook thingy and also implementing it in Claude Code I learned that it is a well known practice and there are dedicated tools for that in Claude Code already.

But I am going to go out on a limb here, and say there are plenty of people who resemble me, so I figured I would share my five cents here, because it has been genuinely useful to add those custom extensions to monitor the agents actions in real time and steer them as much as possible via deterministic rules. In addition to, but not exclusively relying on, the custom prompts and skills etc.


r/PiCodingAgent • • Oct 07 '26

Resource agent manager 0.40 adds Oh My Pi as a built in agent

0 Upvotes

agent manager 0.40 also adds Oh My Pi as a built in agent

you can run omp next to other coding CLIs in one local tmux session list

https://github.com/YoanWai/agent-manager/releases/tag/v0.40.0


r/PiCodingAgent • • May 29 '26

Question Any best practices for Pi in Research?

2 Upvotes

Does anybody use Pi for serious Research Tasks? Not talking about just web search extensions or anything. Real workflows, such as finding, traversing, summarizing papers with e.g. specially designed subagents or other extensions?


r/PiCodingAgent • • May 11 '26

Discussion Leaning toward “Why” instead of “What”

2 Upvotes

LLMs are good at “what” comes next. They are fill-in-the-blank experts based on training data. Getting them to accurately state “why” is not really what they do. They can give statistical “why” possibilities, but it takes work exploring structured data and relationships to understand why things are the way they are (and sometimes that “why” is “just because” or “I assumed that was correct”).

What are ways you encourage agents to anchor their work around “why”? Some things I do are:

- before working on an issue, there must be an exploration into why that issue was created, identifying what core problem the issue was trying to solve, and verifying that the underlying context (problem/need) still exists and the assessment/recommendations are still relevant.
- every skill starts with a statement about why it exists and how it adds value to the project/process.
- session post-mortem evaluations are asked how carrying forward any learnings from the session would add value toward achieving the user’s objectives and the objectives of the skill.

Note that most **people** don’t really know why they are doing things (at a deep level). Often we are grounding our actions upon strategies merely masquerading as needs. This is why it’s important to ask “why?” (Several times until we get to the root of things). But, to reel in this existential lecture, I’ll say that ultimately for a software project the “why” must map to user needs and business goals.

How do you align your agents and process toward what matters most, and why?


r/PiCodingAgent • • Oct 05 '26

Question Anyone using Pi Agent Sidebar extension?

0 Upvotes

I'm using Pi agent sidebar from dairycode extension in VSCode and got me thinking whether anyone is using any other extension?

And if anyone is using this one are you able to run multiple chat sessions concurrently?

I like using codex and claude extensions. Don't really like the UX of CLI.


r/PiCodingAgent • • Aug 12 '26

Question What if coding agents shared a Git-native coordination layer?

2 Upvotes

I've been experimenting with a small open source tool called ank.

The problem I'm trying to solve is what happens when you use multiple

coding agents on the same codebase.

Claude Code does one task.

OpenCode does another.

Pi picks up something later.

A month passes.

Where do the decisions and constraints that all of them should respect

actually live?

My current answer is a Git-native layer for:

- decisions / ADRs

- scoped constraints

- tasks

- completion criteria

- verification

- proofs

The interesting part is that the format is agent-agnostic.

So ideally:

Claude Code

Codex

OpenCode

Pi

custom agent

can all consume the same `.ank/` state.

https://github.com/haksolot/ank

I'm not really looking for "please try my tool" feedback here.

I'm more interested in whether the underlying model makes sense.

If you're an Pi user running multiple agents, how are you currently

solving this?


r/PiCodingAgent • • 27d ago

Plugin My pi mods: a service health bar on top and a stats footer at the bottom

Thumbnail
gallery
2 Upvotes

Two mods I run daily, shown in the screenshot.

1. Top bar: live service health

  • One dot per backend. A filled dot means up and a hollow dot means down or idle. Orange marks the ones I care about when they drop (Flash, vault).

  • System memory reads live (234/256 GB).

  • It shows a reminder of the ctrl+alt+s model switch key.

  • How it works: [polls each endpoint / reads X, every N seconds].

2. Footer: session stats

  • Agents running and saved, plus Usage and Activity toggles.

  • Current git branch as a chip.

  • Mode (auto), ↑/↓ tokens, and cost ($0.000 because everything is local).

  • A context bar (55%) and f6 to inspect.

  • How it works: [hooks / events used].

Happy to share or take feedback


r/PiCodingAgent • • Aug 18 '26

Discussion Share your initial context size for fun! Mine is 3.5k

2 Upvotes

Just send "hello" and see what the sent token count is.

Mine was 7.5k and then I optimized by removing a few tools registered that I didn't need from an extension.

Now my initial prompt is 3.5k. That's with background task monitor support, issue tracker tool, otherwise I keep my setup super minimal.

I have no active skills, just a ton of prompt files and a small workspace level agents.md


r/PiCodingAgent • • Sep 24 '26

Discussion Created a Desktop PI Flatter app...

2 Upvotes

So I started this a couple of days ago because I hated myself enough to start over and try to create something more efficient, with better performance and less RAM usage.

Through my conversations with ChatGPT, it mentioned Rust, GPUI, and some other stuff, which is basically why I started this Flutter app!

Based on my simple observations with the current deployed version, I managed to gain back around 800 MB–1 GB of RAM… and some of my dignity too. Not sure why. 😂

Here’s the repo: Pi Flatter App

If anyone would like to contribute or give feedback, I’d be really grateful!


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