r/PiCodingAgent • • Oct 11 '26

Plugin pi-multi-agent-skill: minimalist subagents approach for pi with no extension and no tool, just a skill and a small CLI to save your context window, with support for steer and persistent running.

25 Upvotes

TL;DR: I made a small multi-agent setup for pi. It is one skill and one Python script, with no extension and no tool. Your agent can start subagents in the foreground in parallel or in the background, and it can wait for them, steer them, abort them and resume them. Background jobs keep running after the main pi session is closed or killed. A new pi session—even one different from the original main session—can also retrieve their results. Until your agent decides to delegate, it costs a few dozen tokens of context.

Repo: https://github.com/milanglacier/pi-multi-agent-skill

Just install it with npx skills like any other skills, or clone the github repo and symlink it to ~/.pi/agent/skills.

Features

  • Almost no token cost. Until your agent delegates, only the skill description is in context, a few dozen tokens. Delegating loads SKILL.md, about 1.2k more.

  • Stdlib-only Python 3.9 or later. There's no extension, no npm package and nothing else to install.

  • Foreground runs for quick questions and --background for long ones. A background job keeps running even if the main agent is killed, and any later session can collect its result. Foreground runs stop when you stop at every level of nesting.

  • steer, abort and resume a job, and list, status and peek to see what it's doing.

  • Subagents load your full pi setup: extensions, MCP servers, skills and settings.

  • Profiles set the system prompt, model, thinking level and available tools. general-purpose and a read-only Explore are included. Profiles are just like any other subagent tool’s profiles.

  • --fork gives the subagent your current conversation.

  • Works from Claude Code, Codex or any agent with a shell.

How I got here

For months I used tintinweb's pi-subagents, and it is a really good extension. The UI is nice, it has many features, and it works well most of time. Thanks to tintinweb for building it and for everything they give the community. If you like it, keep using it.

A while ago a pi upgrade broke two things for me. MCP servers stopped loading in subagents, and subagents no longer inherited the parent's thinking level. Each fix was only a few lines, so I forked the extension and patched it. Upstream fixes took some time but also landed 2 days before this post.

Fixing those bugs made me read the extension more closely, and I noticed how much context it now uses. About two months ago it added a dynamic workflow tool. With it, the agent writes a JavaScript script that orchestrates many subagents. It's powerful, but it's also very complex, and its tool schema and instructions cost about 6k tokens. That schema is in every session from the first message, whether you use workflows or not. It's also opt-out, so you pay for it until you find the setting and turn it off. I suspect many people don't know it's there.

With the workflow tool off, the Agent tool still costs about 3k tokens, and it has grown along with the extension's features. I checked these numbers by starting sessions with the extension on and off and comparing them.

So I asked myself whether I need a full tool with a detailed JSON schema, listing options I rarely use (like worktree isolation), in my context all the time. My answer was no.

pi can already run headless with --mode rpc, and its CLI flags already cover what a subagent needs: tools, extensions, model, thinking level and session resume. So a small CLI that starts pi with the right flags, plus a skill that explains how to use it, can replace a dedicated tool. A skill also loads in steps, which a tool cannot do. The agent sees only the skill's short description at first. It loads the main instructions when it decides to delegate, and it reads the detailed references only when it needs an unusual option. Steering doesn't need a tool either, because it is just an RPC message sent to the running pi process.

Token cost compared

  • pi-subagents: about 3k tokens for the subgent tools and injected system prompt. On top of that, about 6k for the dynamic workflow tool, which is on by default and must be turned off by hand. Both are in every session from the first message, so with the default settings that's about 9k tokens before you've asked for anything.

  • This skill, before your agent delegates: only the skill description, a few dozen tokens.

  • This skill, once your agent delegates: SKILL.md is loaded, about 1.2k tokens, and that is enough for full multi-agent use.

  • Command details, profile format, lifecycle and troubleshooting are in separate reference files. The agent reads them only when it needs them.

For most sessions you don't delegate, you pay almost nothing. When you do delegate, it still costs less than the tool schema alone.

To be fair, this isn't a like-for-like comparison. pi-subagents does more than this skill. Its tool has many options, and each one needs a parameter in the schema, and it also adds text to the system prompt. Part of that token cost pays for features this skill doesn't have, such as worktree isolation. I just don't think features like that are needed for multi-agent work. If I want an agent to work in its own worktree, I tell it so in the prompt ("use worktree"), and it does. The agent already knows how to use git, so the tool doesn't need to do that for it.

None of this is meant as criticism of pi-subagents. It's still a great extension, and it works well for a lot of people, especially if you want a rich UI and many features built in. It's just not the right fit for me anymore. I prefer a more minimal setup, where the agent loads only what it needs and does the rest itself.

The tradeoff

I give up the nice UI. It really does look nice, but for me it turned out to be like the exercise bike you buy in January. It looks great in the corner of the room, and by March it is where you hang your clothes. I watched the subagent transcripts for the first week, and after that I almost never read them. I just realized the subagent's final answer is mostly for the main agent, not for me.

In return, I get things I care about more. Each subagent is a real pi process started with CLI flags, so it loads the same extensions, MCP servers, skills and settings as my normal pi. The script doesn't use pi's extension API at all, only CLI flags and RPC, which change much less often, so pi upgrades rarely affect it. Separate processes also give me my favorite feature: a background job keeps going even if the main agent is killed, and any new session can collect its result later.

Separate processes need more care than in-process sessions,, and the script is more than a cli wrapper, because it takes care of that so the agent doesn't have to. For example, pi exits on its first failed write to stdout, before its shutdown runs, and leaves the agent's commands running. So each job has its own runner process that keeps reading pi's output until pi exits. The script has a real test suite for cases like this, but the idea stays small: start pi, give it a prompt, pass along steer and abort messages, and save each job's result under its name.

Non Goals

These are deliberate non-goals, to keep the skill small and free of bloat. Each is better as a separate extension or skill that you pick to match your own workflow. This follows the minimalism of pi itself and the Unix philosophy: do one thing well and compose.

  • Memory. Agents do not share or keep memory between jobs. Use a memory extension, or have agents write handoff notes.

  • Scheduling. There are no cron-style or recurring agents. Use cron, systemd timers or a scheduler extension to run the commands.

  • Worktrees. Agents are not isolated in git worktrees. Just prompt the agent to use a worktree.

  • Dynamic workflows. There is no scripting layer for orchestration such as pipelines, parallel fan-out with gates, or phases. Your agent can already start, wait for and chain jobs with plain commands. For deterministic scripts, use an extension such as pi-dynamic-workflow.

What the commands look like

Your agent runs these by itself, but you can also run them by hand from a terminal:

# Ask a read-only agent a quick question and wait for the answer  
multi_agent.py run --profile Explore "Where is the retry policy defined?"

# Start a review in the background, then collect the result later  
multi_agent.py run --background --name review "Review the error handling in src/server/"  
multi_agent.py wait review --timeout 120

# Correct the running job, then give it a follow-up task when it is done  
multi_agent.py steer review "Skip generated files"  
multi_agent.py resume review "Now check the client side"

# See all jobs and what they are doing  
multi_agent.py list

If you try it, I'd like to hear what works and what breaks.


r/PiCodingAgent • • Sep 25 '26

Resource My terminal-native setup for parallel coding agents

Thumbnail blog.kulman.sk
25 Upvotes

r/PiCodingAgent • • Aug 20 '26

Discussion Pi’s simplicity is actually the most powerful part

25 Upvotes

I’ve been building my own agent while trying to follow Pi’s design ideas.

Today I deleted about 80% of my system prompt. What’s left is basically: who you are, which tools to use when, a few hard rules for edits, and the current project context. That’s it.

https://github.com/pulseaiclub/phi/blob/main/internal/agent/prompt/system-prompt.tmpl

And… the agent didn’t get dumber. If anything, it felt sharper - less ceremony, more actual work.

I also removed some tools that weren’t really earning their place. The more I work on this, the more I think Pi got the hard part right: keep the harness thin. Trust the model. Don’t turn the prompt and tool list into a second product. Claude Code is powerful, but it also feels heavy in a way Pi deliberately avoids - and that restraint looks more correct the longer I build.

I did keep two things:

MCP - not because I want dozens of schemas in context, but because it’s a shared protocol. A custom plugin usually stays stuck in one agent; MCP can move. And if you load tools lazily (list → inspect → call, inspired by approaches like mcptoon), it doesn’t have to bloat the prompt.

Subagents - useful when the parent plans well and only hands off scoped work. They keep the main thread clean and help a lot with exploration or parallel investigation.

So yeah: thanks Pi. The “keep it simple” instinct is not just aesthetic - after cutting most of my prompt, it feels like the correct engineering default.


r/PiCodingAgent • • Aug 15 '26

Question Model of choice at the moment?

25 Upvotes

Hi all, I’ve been working a lot with Deepseek and Luna, but interested to know what other people are commonly using so I’m not missing out on anything cool. Using Claude at work. Thanks


r/PiCodingAgent • • Jul 10 '26

Plugin pi-dynamic-workflow — a Pi extension inspired by Claude Code's dynamic workflows, written by Claude Fable 5

25 Upvotes

Hi everyone,

I made an attempt to bring Claude Code’s dynamic-workflow model to Pi.

This project was written entirely by claude-fable-5: both the plans and the code. The planning documents generated from plan mode are also included in the source tree.

Basically, I asked Claude Code to formulate the dynamic workflow prompt and the corresponding tool schema from its own system prompt. I then had the model analyze the Pi documentation and translate it into the APIs to launch Pi subprocesses in headless mode.

The goal is to match the useful parts of Claude Code dynamic workflows: task-specific orchestration, parallel fan-out, pipelines, independent verification, background runs, resumability, and reusable workflows.

It has concurrency, token/cost, depth, and total-agent limits so workflows do not turn into unlimited spawning.

Currently you can install this plugin using github:

pi install git:github.com/milanglacier/pi-dynamic-workflow

Will also publish this extension to NPM soon.

Repo: milanglacier/pi-dynamic-workflow


r/PiCodingAgent • • Jun 01 '26

Use-case Now im ussing Pi as openclaw

25 Upvotes

multi-purpose agent, not just a coding agent.

tried to bridge to telegram, takes time to tweaks for full TUi slash command support. noww i just use termius to chat w Pi.

next i will make a cron extension, and a good memory management.

and i think its good to go! any recommendation?

im planning to use pi-subagents for tasks
i want to keep my Pi lean and lightweight. just minimum ext/skills for everyday agent!

happy w my Pi journey so far! it takes more time tinkering vs hermes but its worth it!


r/PiCodingAgent • • May 30 '26

Question What are you folks using for memory ?

25 Upvotes

I began with oh-my-pi (great memory system) and have been eyeing hermes-pi … but I’m curious what else people are running for memory and dreaming .. What’s working well for you?


r/PiCodingAgent • • May 29 '26

Question What subagent extension?

25 Upvotes

Im curious , what is the subagent extension you are using and why that specific extension ??

What usually people looking for wheb using subagent , till now im using normal prompting and it launch background subagents if i needed .. im curious what things they provide?


r/PiCodingAgent • • May 28 '26

Question How is Pi faster?

25 Upvotes

I recently downloaded pi just to try it out, literally 5 minutes ago, but how is it faster than using `codex` or `claude`? I'm using the model codex 5.5, but i didn't enable fast mode in codex, and it's literally super fast to give the answer how is that possible if PI isn't a model on its own?


r/PiCodingAgent • • May 21 '26

Plugin Automating context management

25 Upvotes

I built pi-agenticoding because CLI coding agents shouldn’t rely on humans to keep them in their optimal working zone.

Today, a lot of agentic coding still depends on the user deciding what to preserve, what to summarize, when to compact, when to restart, and when the session has become too noisy.

That feels backwards.

The agent should carry more of that cognitive load itself.

pi-agenticoding gives agents primitives to manage their own context: spawning focused sub-agents, writing durable notes to a ledger, and handing off work into a clean new session when the current one drifts out of shape.

The goal isn’t just a bigger context window.

It’s keeping the agent operating where it works best: focused, grounded, and not overloaded by its own history.

Repo: https://github.com/agenticoding/pi-agenticoding

Super interested in hearing what this group has to say about this approach and if anyone else finds it useful 🙏


r/PiCodingAgent • • May 17 '26

Discussion why does no one mention the model when disccussing the harness?

25 Upvotes

this is a pet peeve and you can see it in the countless blog posts/videos on claude code, opencode as well, claiming how it can X,Y,Z and then you see they are using Opus or gpt-5.4 on xhigh for everything. and its the same for all the Pi ones as well. Of course the frontier models do a great job, thats why they are frontier!

Sure the harness matters, the llm matters just as much if not more. saying things like 'just ask pi to build it for you' surely depends on what model it uses to do that.

I'd like to see what a low cost/free setup using Pi can accomplish vs the similar vs other harnesses (all of which are free too, if not open source). I understand Pi is by design much more hackable.


r/PiCodingAgent • • May 01 '26

Plugin I made a pi extension that shows ChatGPT Codex usage limits in the footer

Thumbnail
gallery
25 Upvotes

Hey folks — I built a small pi extension for anyone using ChatGPT Plus/Pro Codex models through pi. It’s totally possible something like this already exists, but I couldn’t find one. It shows your ChatGPT Codex weekly usage percentage inline in pi’s footer, only when an openai-codex model is active. Example footer:

(openai-codex) gpt-5.1-codex-max • high • 42%

It also adds a command:

/chatgpt-limit

which shows more detail:

  • 5-hour usage window

  • weekly usage window

  • remaining percentage

  • reset times

  • plan/account info when available Install:

pi install git:github.com/patlux/pi-chatgpt-limit

Then in pi:

/reload

Repo: https://github.com/patlux/pi-chatgpt-limit Screenshots attached. Feedback welcome!


r/PiCodingAgent • • Oct 26 '26

Discussion Simplicity goes a long way

24 Upvotes

Every dang day man I see other people using claude code, codex, opencode etc and every time there's always something finicky and silly going on. 40k+ sys prompts. Can't see the subagent work properly. Compaction is slow sometimes. I've been trying to use them for the past week just to see what I'm missing out on and it's SO STUPID??

The idea of making something to please everyone but also trying to add skills and plugins is ridiculous. I'm not about to start making plugins to get features in those bloated TUIs just to make another plugin to strip them down or something.

I've NEVER seen something apply the concept of modularity as well as pi in my life. This feels like windows vs linux except linux got a fair start and fair cut of user base before people started getting locked into an app ecosystem.


r/PiCodingAgent • • Oct 22 '26

Question Which Pi Mobile Client?

24 Upvotes

Hi everyone! I would like to hook into the pi agent session remotely from my iPhone. I would like to see the agent progress and be able to answer the agent etc. I would also love to get notifications when the agent is finished. The whole process should work in my LAN but also fully remotely. I tried out orca before, but don’t like that I have to use orca at all + don’t like that I’m basically using a terminal on my phone.

Any suggestions? What are you guys using?


r/PiCodingAgent • • Oct 20 '26

Resource I solved compaction for single-session on consumer-hardware, trust me bro

24 Upvotes

Clickbait, but at least for me it is true. Thanks for reading anyway:

TL;DR:

I've engineered an extension for context management in pi, that now matches my needs for compaction and session quality. Using mostly the same session context for summary requests and summary audits, it re-uses warm kv cache to get quality-compaction with acceptable timeframes.

You can get it here, it is still WIP, but it is free ("claude decompiled it and rebuilt it in rust!"):

https://github.com/LePrau/pi-self-aware-memory

If you don't want the model to self-correct within the audits (which can take some time!), set /sam depth light which reduces audits to a plain "yeah, thats a summary, go on" instead of validating the stated result against the session or even project files.

Now the long story:

After I started using pi and qwen3.8-27b (ridge q3 at first, gsq-rco-iq3_s later) to help document and draft my NAS setup (using TrueNAS), including dataset structure, ACL, self-baked docker-composes for llama, coolercontrol and other apps that do not natively exist, I immediately noticed that a task had to be done within the first two or three compactions, or with a handoff-file.

Else the model would start running in circled re-discovering what it already knew before compaction.

Starting with as low as 40k context, I struggled my way through llama with kv streaming up to llama with kv streaming and mtp today, with 131k context now.

My current setup, aside from pi+extensions:

Still, any native pi-compaction drowned the quality in re-reads, hallucinations, misrememberings (is that a word?) and summaries that forgot half of the relevant stuff and remembered the other half incorrectly.

I always asked for a short handoff shortly before compaction and started a new session, but that needed a lot of tedious micromanagement. Though the results were pretty good, Qwen3.8 even at the mentioned quants already does solid work.

In search of proper context management I found pi-observational-memory, which sounded exactly like what I wanted: Session summarized into small observed facts, presented as readable list for the model after compaction, source content retrievable if needed.

But I soon realized: It depends on a second model doing the observations. I then tried Gemma 4 e4b on cpu, and guess what: Standalone easy 20-30 tps (with MTP) on cpu. Summary-Quality was just-good-enough, Gemma4 is a nice model for its size. Not good at coding, but okay at prose and already able to do basic tool calls. Not always the correct ones. Using that, and realising: at a fold, most of the recent context was lost anyway, because the observer was not fast enough, I created an extension that paused a fold until the last observed unit was processed.

Took me quite some time to realize: 30 tps when GPU was idle, 5tps when GPU inference was running. GPU inference still needs a tiny amount of system RAM access. And each time the GPU inference accessed the system ram, it literally destroyed the bandwidth and the cpu-caches for the cpu inference. I just learned that after I got the "omg", "pi observational memory guard" to a point where it reliably parked the session (with proper feedback) until observation had caught up.

Then I thought, how could the running model itself run the observer while staying fast?
The thing that makes pi native compaction as slow as it is, is the completely new, different context that needs to be prefilled for the summary. It is basically a session at full cold context that needs to be prefilled, just to then produce a summary.

Pi observational memory has a similar problem when using the same model for observation:
Each time the observer kicks in,
it kills the kv cache,
needs a cold prefill, and afterwards the main session
also needs another cold prefill.

So I envisioned an extension that lets the model writing its own summary, and audit/validate it as well, while keeping the sessions context untouched: Simply add the summary, and the audit request after the current session, let the audit run in a background session and only return the audit-result. The audit-reasoning does never enter the main session, and the main session simply drops a short kv-window at the end of the cache to resume.

After user input, the model adjusts its goal if the requirements changed.

The self-generated and audited summary together with the set goal then get used as drop-in-replacement for the whole session part it subsumed at compaction-time. This replacement is instant - no LLM call at that time. The LLM time is used in the summary calls and audit background tasks.

The astounding part: It actually works*

*mostly.

I present you "SAM", "Self Aware Memory"

The extension introduces a couple of tools, to be used by the model:

  • adjust_goal (write a short summary of the current task)

  • read_goal (read the currently set goal, or any older version)

  • close_unit (summarize and close the last parts of the session)

  • fold_now (does exactly that, allows the model to fold at a defined spot)

  • retrieve (retrieve the summary of an older work-unit)

  • retire (mark older unit-summaries as obsolete, relevant for long sessions)

There is a couple of small issues, it is not completely polished and there might still be some legacy code or settings. And I know of a couple of vibe-code-artifacts: Sam nudges sometimes behave strangely with user interaction, and some minor visual glitches.

The readme might be out of date in places, and the toggles, settings and modes documentation is premium-slopped, obviously.

The most important levers for you: /sam depth [auto|light|medium|full] in session to set the audit depth:

  • light: only validates that it is a semantically correct summary.

  • medium: tries to validate summary only superficial, only from session context and cheap tool calls

  • full: tries to verify most claims, reruns tool checks and more

  • auto: uses medium if there is enough context, and light if compactions close

And "settings" which currently can only be set as environment variables (qwen, please make that configurable settings in the TUI plzkthx):

  • SAM_AUDIT_TIMEOUT_MS (or for specific depths SAM_AUDIT_TIMEOUT_MEDIUM_MS and SAM_AUDIT_TIMEOUT_FULL_MS which inherit the base value)

  • SAM_AUDIT_CALM_DEPTH (default "medium", the audit depth used for "auto" when compaction is far away)

  • SAM_AUDIT_DEPTH (the default depth, if not set it is "auto")

By default, background audits get a max time of 8 minutes - be aware that even a medium audit with xhigh can easily take 3-6 minutes without tool calls with qwen. If the timeout is too short, the model eats the time, and does not reach the point where it outputs a quality verdict for the summary, and still wasted time.

So if you are also looking for speed, choose "light" as default audit depth, or better even set "SAM_AUDIT_DEPTH" to "light". With that you're getting faster compaction times overall than with pi native compaction. But you then lose the self correction, that might catch false summaries before they do harm. (And I observed quite a lot of those in my sessions)

I personally suggest "medium", catches some obvious contradictions or wrong observations from summaries.

Only the model itself can call the adjust_goal and close_unit, but gets a nudge at certain trigger times (user input, context fill, lot of tool calls) to adjust its goal, to close its current working-unit with a summary.

Close before compaction, the nudges increase in urgency, but only the model gets to decide when a unit can be closed. Qwen is quite good adjusting the goal, closing at proper times and keeping a coherent image of the overall session and task.

It is not perfect, there are times where some of the sessions context gets lost, at times the model ran some tools after a compression which it ran half a session ago in some now-lost context. But most of the time, it kept working without hallucinations, while remembering specific details like git-commit-hashes or specific file-paths from two compactions ago. The last iterations of the extension have been done with one session, spanning several million tokens and far beyond 40 compactions (at 131k max context) with no apparent issues.

So now I feel that it is not a burden for others to run that extension, but instead might actually be helpful.

I will keep tinkering with it, but feel free to fork and extend it yourself. I doubt I'll find the time to implement any PRs or feature requests.

Now I can finally "start" using qwen locally to support me with the remaining work on my NAS and other coding projects.

Thanks for reading, enjoy!


r/PiCodingAgent • • Oct 09 '26

Discussion Pi is Linux/Vim/C/JS/K8S of the AI harnesses world

24 Upvotes

Even without counting omp, prime agent, or sol-pi, we see new Pi distributions in this subreddit every day. I see all kinds of ideas: some people are adding more complex subagent systems, while others want to make agents smarter through memory systems.

I was also inspired by Pi when I built my own harness. I like that four tools are enough to get the job done just as well as other, much larger agents. But I added a couple more tools:

  • grep — ~5% fewer tokens and 20–30% faster.

  • background_tasks — lets my agent handle various useful tasks out of the box.

I'm curious where all of this is headed. Will we get substantial projects built on top of Pi, like TypeScript on top of JavaScript? Or will we all just customize Pi to suit our needs, like we do with Vim/Neovim?


r/PiCodingAgent • • Sep 21 '26

News Jev, Prolog, Pi, and the dream of probabilistic logic programming

Thumbnail
deepclause.substack.com
24 Upvotes

r/PiCodingAgent • • Aug 21 '26

Discussion Limitations of TUI for agentic coding?

24 Upvotes

I love terminal and the ability to navigate with keyboard. Yet as extensible as Pi is, it has quite the ceiling in how the state can be displayed due to the nature of TUI.

For example, I have an extension called tree2. As you may imagine its visual representation, it was quite a pain to get my vision through within the Pi terminal.

Codex, Orca, T3code, the so called ADEs - how often do you use them? Personally something puts me off every time I try, but I can't name.

I think I'm looking for a hybrid. An instrument, if you will. What does it look like?


r/PiCodingAgent • • Jun 01 '26

Discussion Project level skills/extensions are OP

24 Upvotes

I've spent the last month using pi on one single project every day after my day job. I'd been using it for a few months but always on disjointed, one one off tasks. But using it only on one project has made me appreciate control pi gives you on its context window. I'm creating skills, extensions, even new personas for pi where I completely hijack the pre-loaded directories path and inject my stuff. None of this has to transfer over to any other project, I don't need features or interfaces. I just need the fastest way to find high value context within the structure of my repo. And then have workflows and scripts that only work in the context of that project. There's no pressure to handle edge cases or design a tool end to end. As there are more problems, either the tool expands or I make a new one. I can chuck the ones I don't need in a void and forget them. It's such an unlock to have this realisation. My global pi can work completely different from the project level pis. I've been having this realisation over the last month and I just fucking love this software


r/PiCodingAgent • • May 16 '26

Use-case Oh the things you can build

Thumbnail
gallery
24 Upvotes

This is what I have been spending the last few weeks building with various Coding agents. It is actually PI. Just with an entire app on top. This kinda shows the true power of PI. You can put it anywhere you want it.

I have my main chat area's.

Brave API for web searching.

A docs area so I don't have to depend on Microslop for Word.

And a typing practice area for fun (Ignore that score...)

Its not fully ready for others yet, but its getting there. I have been working on this for a while. I used PI to build the foundations till that got a bit spendy, so I went to Claude and Codex to continue on things. Though that will come to an end soon enough, seeing as next month will be the end of subscription subsidized Claude Code.

With all of this I have learned that yes, AI really can code really well. But it takes a lot of money to do so well. I have spent over $120 on this project so far. But seeing as it is functional to my life, I see it as worth it.

Oh, and of course there are other themes.

Edits:

This app is really just my way of keeping things mine. Forever. Which is exactly what PI is. I am ever thankful to the PI team.


r/PiCodingAgent • • May 14 '26

Resource Released pi-event-monitor v0.1.0: background shell and file watchers for pi sessions

24 Upvotes

Built a small plugin and figured this is the right place to share.

pi-event-monitor adds background event monitors to pi sessions. It runs shell commands or watches files in the background and only wakes the session when something happens (a process exits, a log line matches, a file gets written). No polling, no token cost between events. The design is modeled on the Monitor mechanic in Claude Code.

Two ways to use it. You can tell pi naturally ("watch the dev server and let me know if it crashes") and the agent will reach for the monitor tools itself, or you can run slash commands like /monitor app errors :: tail -f app.log | grep -E "ERROR|FATAL" for direct control.

Repo: https://github.com/Helmi/pi-event-monitor
Install: pi install npm:pi-event-monitor

Very early (v0.1.0). Would appreciate feedback or breakage reports, especially anything around install or pi version compatibility.


r/PiCodingAgent • • May 02 '26

Resource MCP server that saves 60-80% context tokens, now with full Pi compatibility

24 Upvotes

lean-ctx is a local context runtime written in Rust that caches file reads, compresses shell output and indexes your codebase so your model stops wasting tokens on redundant context.

I recently fixed Pi-specific compatibility issues. Pi's MCP bridge sends array parameters as JSON-encoded strings instead of native arrays, which broke multi-file reads. That's fixed now, lean-ctx detects the format automatically. There's also ctx_call, a meta-tool with a stable schema that works around Pi's static tool registry. You call ctx_call with the tool name and arguments, it dispatches internally, so you get access to all 49 tools even if Pi only loaded the initial set at startup.

The core: when your model re-reads a file, lean-ctx returns a cache fingerprint (~13 tokens) instead of the full content (often 2,000+). Shell commands get compressed with 90+ patterns covering git, npm, docker, cargo, kubectl output. A tree-sitter code graph for 18 languages lets the model query imports, dependents and blast radius without reading every file. ctx_pack builds compact PR context packs with changed files, related tests and impact summary. ctx_knowledge keeps a persistent knowledge graph across sessions with temporal facts and contradiction detection.

There's a live TUI dashboard showing token savings, cache hits, SLO monitoring and every tool call in real time. Everything local, nothing cloud, single Rust binary.


r/PiCodingAgent • • Apr 16 '26

Resource Created Observational Memory extension for Pi

24 Upvotes

Hello guys, i just want to share with you this extension i developed: https://www.npmjs.com/package/pi-observational-memory. It is quite straigforward, everything i have to say is in the readme.

But i think this can help to basically make pi sessions feel endless, and saving tokens too!


r/PiCodingAgent • • Sep 14 '26

Discussion It deleted my files…

23 Upvotes

Ola, so recently I was working with Qwen 3.5. Building some html and css stuff inside my documents folder.

Big mistake. The Model which had extra access from Pi ended up hallucinating and started deleting all my root folders.

I think for any newbie who’s doing this, please write yourself an extension to get it to ask for read and wright permissions or pick from the various GitHub repos that have implemented safeguards for this.

Don’t just give it full access especially if you don’t know what terminal commands do.

I just saw it write -rf home and I knew it was over 🤣

I learnt the hard way but now I know.

If anything I think everyone who’s starting to use this should install something to prevent this from happening as the first non negotiable.

Luckily I just moved to Fedora 44 so I didn’t have much in those folders but it did mess up all my file paths so I had to fix that.

No more unattended ai running rogue on my pc for now.
As Iv built myself a safeguard extension to prevent this from happening.

Hopefully whoever reads this and is trying it for the first time keeps this in mind. As it’ll save you a world of hurt down the line.


r/PiCodingAgent • • Aug 09 '26

Question Want QMD based search for pi-llm-wiki ?

Post image
23 Upvotes

I’ve been working on introducing QMD based search for @zosmaai/pi-llm-wiki

I want to know what you think of this idea.

Thank you for being so supportive and helping me maintain this project.

I want to take it to next level now. Better search and re-ranking of search results so that LLM get useful results.

Also wanted to introduce Zettelkasten style of taking note and using card style so that agent gets to see important cards before it wanting to deep dive into more details.

GitHub link -> https://github.com/zosmaai/pi-llm-wiki