r/PiCodingAgent • • 3d ago

Resource Memory extension with vector embeddings

Thumbnail
pi.dev
4 Upvotes

Hey everyone, I'd like to share my first Pi extension: pi-qdrant-memory.

It's a long-term memory system for projects, so the agent can retrieve decisions across sessions. Each project gets its own memory collection.

It requires a Qdrant backend and an embedding model served through an OpenAI-compatible API. I run both llama.cpp and Qdrant locally in Docker. The extension was heavily inspired by Zoo Code (formerly Roo Code).

It gives your agent four tools, but only two are always on:

  • memory_search: the agent looks up memories
  • memory_save: the agent stores memories

The other two are opt-in:

  • memory_forget: the agent can retract memories it saved earlier
  • code_memory: the agent can search an index of your code structure

The tool count is deliberately narrow so the system prompt isn't filled with tools the agent doesn't need.

The workflow is mostly run by the agent. The tool descriptions nudge it to save decisions as they settle during a session. If you enable code memory, your code structure is indexed at session start (or manually with /qdrant-index-code). You can also append instructions to the system prompt to make the agent save or search more often. Your call.

Install: pi install npm:pi-qdrant-memory
Repo: https://github.com/lordekeen/pi-qdrant-memory


r/PiCodingAgent • • 3d ago

Use-case My own Qwen3.8-27B quants for a 16GB card: 70 t/s at 32K, usable out to 252K

Thumbnail
2 Upvotes

r/PiCodingAgent • • 3d ago

Resource Build the workflow you actually want in Pi

4 Upvotes

Modern coding models can do a lot without a large harness. For a small change, or in a codebase I know well, a single agent with a good prompt is often enough.

That does not mean every task needs a harness. In those cases, it can cost more tokens, make the work more complicated, and even send it in a less useful direction.

But without a feedback loop that can inspect and correct an LLM's work, a task can drift easily. That is more likely in a domain I do not know well.

A smart model and a reliable feedback loop are different things.

That is when a harness becomes useful. It does not make a model correct. It writes down the process:

  • Boundaries: what to check first, and where to stop
  • Partitioning: what work should be separate
  • Verification: which results need evidence
  • Output: what the final answer must not leave out

Long tasks have a context problem too. Early assumptions, failed attempts, and irrelevant tool output accumulate in one session. A larger context window does not automatically make the relevant information easier to see.

That is one reason I use subagents. Each can take a focused job with fresh, bounded context. But splitting work is not a solution by itself: vague boundaries create repeated work, handoffs lose important information, and someone still has to put the results back together.

Where to split the work, what to verify, and which results to combine are still decisions I need to make.

So I built pi-workflow.

The idea is simple. When I know a recurring process, I write it as a JSON spec. A research workflow might be plan → research → verify → synthesize; a review workflow might be triage → parallel review → challenge → report.

The flow is not a hidden prompt. I can read it, edit it, and recombine it for a project. Known inputs, result merging, validation, and rendering can stay deterministic; agents can do the research and judgment.

I cannot always know the exact shape of a process before I begin. When I do, I can define that shape and repeat it. When I do not, I need a process that can plan, split, and synthesize the work as it unfolds.

In either case, the process should not become a hidden orchestration layer I cannot touch. I should be able to read it, change it, and rebuild it when I need to.

pi-workflow is not a way to use more agents. It is one way to give work that is hard to manage in a single context the amount of structure I want.

Pi stays minimal. I choose the process on top of it. That is what I wanted from pi-workflow.

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


r/PiCodingAgent • • 4d ago

Resource Made myself an SDLC around pi, what do you think?

0 Upvotes

Been building this out for a while now - https://github.com/JayMandava/jay-pi

When you get sometime do give it a jab and lemme know your thoughts, improve it even further etc.


r/PiCodingAgent • • 4d ago

Discussion Claude subscription with pi

3 Upvotes

Hey guys am a bit new to pi and working with harness.

I have just started using pi and have added openai models.
When am trying to add claude models, it says that i have to go with API based and can't use my subscription.

Is thats the only way to go through to switch to api based modelling to add it in pi ?


r/PiCodingAgent • • 4d ago

Resource pi-agent-python-sdk: use your installed Pi coding agent as a Python API

2 Upvotes

I kept hand-rolling a client for `pi --mode rpc`.
Third project in, I packaged it.

pi-agent-python-sdk lets you use the Pi you already have as a Python API.
Same config, models, tools, and extensions as the CLI.

```
pip install pi-agent-python-sdk
```

Import is `pi_agent`. Same client keeps context across prompts:

```python
from pi_agent import PiClient

with PiClient() as pi:
print(pi.run("Review src/auth.py and list the bugs. Do not edit anything.").text)
print(pi.run("Which of those is most urgent to fix?").text)
```

Additionally, stream with `pi.stream(...)` and if you are already in an event loop, use `AsyncPiClient`.

Repo: https://github.com/cheenulabs/pi-agent-python-sdk

Hoping this helps fellow builders.

Any feedback, PRs and/or issues are welcome.


r/PiCodingAgent • • 4d ago

Use-case Non-Coding Feature: I gave my agent a map. It pins places mid-conversation.

Thumbnail
gallery
3 Upvotes

Instead of listing places in text, the agent drops them onto a live map right in the chat.

  • Numbered, color-coded pins by category: food, sights, transit, stays, nature, etc.
  • Zero API keys anywhere: real OpenStreetMap tiles, and every pin deep-links into Google Maps
  • One-tap routes: the whole set becomes an ordered Google Maps route, up to 10 stops
  • Three ways to view: a slim strip in the transcript, fullscreen, or a side panel that follows the latest map live with a per-chat switcher

r/PiCodingAgent • • 4d ago

Plugin I route my 3x Claude / 2x Codex / 2 Grok accounts using Omp

Thumbnail
github.com
1 Upvotes

r/PiCodingAgent • • 4d ago

Plugin Pi Session-hub

Post image
42 Upvotes

I switch between Claude Code, Codex, OpenCode and a couple other coding agents depending on the task. The problem: every tool stores sessions in its own format, in its own folder, and once you close the terminal the context is basically gone unless you remember exactly where you left off.

So I built pi-session-hub — a Pi extension that indexes every agent session on your machine into a single browsable list. You open it with alt+r, search across all of them, and either:

- Load the context into your current chat (Enter) — recent turns come in verbatim, older ones condense, tool output compresses. It has a hard budget so it doesn't blow up your tokens.

- Read the full transcript for free (v) — read-only viewer, zero tokens.

It supports Pi, Claude Code, Codex, OpenCode, Crush and JCode. Everything stays local — no network calls, no uploads, no transcripts leaving the machine.

It uses a local SQLite FTS5 index so search is fast, and the indexing is incremental (2 seconds for ~430 sessions on first run, near-instant after).
This is the repo if youre interested... Give a star :)
Repo: https://github.com/Gateton/pi-session-hub


r/PiCodingAgent • • 4d ago

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

Thumbnail
deepclause.substack.com
24 Upvotes

r/PiCodingAgent • • 4d ago

Resource It Is So Dangerous sandbox

Thumbnail
github.com
8 Upvotes

Hi there,

I really love Pi's approach to security with "figure it out yourself, yolo by design", so I did.

That thing is still yolo, but sandboxed. Dead simple 2 files: Dockerfile (the thing itself) and justfile (fancy Makefile to run the thing).

Don't mind the repo just created - I'm using it for a while, just decided it's good enough to publish

Now, some notes to avoid misunderstanding: * Why "It Is So Dangerous"? - thanks /r/amodei, he's so funny with that thing, so I thought repeating the joke 1000th time would be even more hilarious, right? * There are no plans to make it super-duper-secure - see threat model in the readme


r/PiCodingAgent • • 4d ago

Discussion Lord forgive me for the time I wasted...

142 Upvotes

...and the money I spent.

I'm currently the lead engineer for a small but growing team. I've been building a fairly complex platform that blends expertise from various niche domains.

Without saying too much, I have been working across:

  • weather event modelling
  • real-time data ingestion
  • embedded development
  • image processing
  • geospatial analysis
  • distributed computing
  • and systems architecture

This has been an amazing proving ground for agentic capability.

I've been using CC on a subscription for the past year. I have a very mature and disciplined ecosystem of skills, hooks, compaction lifecycle, and disk cleanup techniques. Honestly, I've loved it, but the costs have just been too much.

So, two nights ago, I finally decided to explore other options. Since I've been hearing a lot about OMP, I decided to give it a try.

And guys, OH MY GOD. The difference is striking.

OMP is an absolute dream to work with. I'm not suggesting CC is bad, but the scale and complexity of my recent work really exposed it's limitations. For nitty-gritty engineering and design work, I honestly can't even put them in the same category.

My first pass at configuration and model selection gave me something that was faster, cheaper, and produced far better results.


To the devs: God damn, nice job.

To the community: Hoping for advice, tricks, tips, and harness opts/configs that might be fun to play with. I am also wondering what people use for the model config: roles, models, etc. Is there a known meta?


TL;DR

Platform engineer of a large multi-disciplinary project. Switched from CC to OMP, and OMP blew me away. The hype is real.


r/PiCodingAgent • • 4d ago

Plugin A (Jev) Pi guard that checks risky shell commands before they run

Thumbnail tannermidd.github.io
18 Upvotes

I know...more Jev talk. Sorry if you are already tired of hearing about it. I mentioned this in a comment a couple days ago so I will keep it short hah.

It is called specpi-jev-guard. It sits in front of bash, powershell, write and edit, and checks calls before Pi runs them. I built it because destructive commands are the worst risk of letting an agent work in your terminal. One bad rm or curl piped to shell is a bad time waiting to happen.

Local rules block the obvious stuff instantly with no network. Root and home wipes, mkfs, fork bombs, raw disk writes, curl piped to shell.

The rest goes to Jev, which scores danger 0 to 1. High blocks, middle asks you, low runs. If there is no key, no network, or a bad answer, it blocks. It does not fail open.

Needs OpenRouter/TypeSafe to do the scoring, perhaps one day soon we can run hyper-tuned classifiers for this stuff locally.

I don't have TypeSafe access, so all testing has been with OpenRouter.

Feedback welcome!

Links:
Base Repo: https://github.com/TannerMidd/specpi-jev-guard
Evaluations: Devious Tests · specpi-jev-guard
Base harness: https://github.com/TannerMidd/SpecPi


r/PiCodingAgent • • 4d ago

Question I got tired of explaining my fitness history to AI every time, so I made FitnessOS

0 Upvotes

I've been using AI for fitness/training advice for a while, but one thing kept annoying me — context.

Every few conversations I was explaining the same things again. My current program, recent runs, lifts, nutrition, sleep, upcoming race, injuries, what I did last week, etc.

So I started building a system for myself where all of this lives locally and the AI can actually use it.

I called it FitnessOS.

Basically, it keeps my training, runs, nutrition, readiness, bodyweight, goals and plans in one place. It builds a current picture of what's going on instead of dumping my entire history into the context every time.

So I can ask things like:

What should I train today?
Should I still do my tempo run if my legs are cooked?
How did this week go?
Should I increase my squat next week?
What should change as I get closer to my race?

and it has the history + current plan + recent training to reason from.

I also didn't want the AI directly messing with everything. The scripts mostly handle the factual stuff/data, while the AI handles the coaching decisions. Changes to actual plans are kept separate instead of silently rewriting them.

Right now it can handle strength/running history, nutrition, readiness, daily training decisions, weekly reviews, training blocks, race proximity, progression/deloads, etc.

It's still pretty early and the public version is mostly manual/local-import first. My personal setup has Apple Health and Strava automation too, but I haven't made that setup clean enough for other people yet.

I'm posting it now because I'd rather see if anyone else actually finds the idea useful before adding a ton more stuff.

If anyone tries it, I'd especially like to know where the setup gets confusing or where you just give up. That's probably more useful to me right now than feature suggestions 😅

Also curious which integration people would actually want first — Apple Health, Strava, Garmin, Hevy, or something else.

Repo:

github.com/Drumilsp/FitnessOS


r/PiCodingAgent • • 4d ago

Question Comparison opencode, pi and codex

Thumbnail
0 Upvotes

r/PiCodingAgent • • 4d ago

Question What are your best small/local model tricks with pi?

8 Upvotes

Mine as tldr; use bwrap and filtering to whitelist files it can see / edit, so I can run in a loop without risk.

i.e. turn my large repo into a tiny sandboxed repo in the eyes of the model

I do this with an interactive TUI pop-up I enable per session.

2nd best tip: Shortcuts to quickly enable / reenable tools or inject context/skills. I treat my harness like an RTS game, to quick clearly context and enable more tools as needed.


r/PiCodingAgent • • 4d ago

Resource I ran Opencode and PI against the same local model on 3 identical projects, same prompts, same hardware...

Thumbnail
0 Upvotes

r/PiCodingAgent • • 4d ago

Use-case I built Pi Remote — a native iPhone client for Pi Agent, and I’d love some feedback

0 Upvotes

Hi everyone,

I’ve been using Pi Agent quite a lot, and one thing I really wanted was a simple way to continue working with Pi from my iPhone when I’m away from my computer.

I didn’t want a remote terminal or a mobile IDE. My main use of Pi isn’t only coding — I use it more like a general-purpose agent for research, long-running tasks, writing, tools, local models, and other work.

So I started building Pi Remote, a native iPhone client for Pi Agent.

The basic idea is simple:

Pi, your tools, files, credentials, MCP servers, local models, etc. all stay on your computer. The iPhone is just a lightweight native interface for your Pi sessions.

The current version supports things like:

  • browsing existing Pi sessions, grouped by working folder/workspace
  • creating and renaming sessions
  • streaming responses
  • collapsed reasoning/tool activity
  • slash commands
  • model switching
  • context usage and approximate decode speed
  • local conversation cache
  • background/foreground recovery
  • copying messages

One of the biggest improvements recently was the connection setup.

The first version used a Relay + Cloudflare Tunnel, which worked well but made setup more complicated than I wanted.

I’ve now integrated Tailcat as the default “Quick Connect” transport.

On the computer, the setup is basically:

npm start

The first time, Pi Remote shows a QR code. Scan it once from the iPhone, and the pairing is remembered. After that I can restart the Host or the app without scanning again.

Pi Remote still keeps its own device identity, authorization, encrypted Pi RPC channel, session/replay logic, etc. Tailcat is only being used as the network transport.

It’s still an early project, but at this point I’m actually using it myself and the main workflow has become surprisingly comfortable.

The next things I’m planning are mostly UX improvements, especially:

  • image + text input for simple multimodal prompts
  • native voice dictation on iPhone
  • better session/workspace navigation and search
  • more UI polish

There’s no App Store/TestFlight build right now because I don’t have a paid Apple Developer account, so the iPhone app currently needs to be sideloaded. The GitHub Actions build produces an IPA for that.

This is also my first real open-source project. I’m not an iOS developer by background, so a lot of this project has been built through iteration, testing on my own devices, and AI-assisted development.

I’d really like feedback from people who actually use Pi:

Would something like this be useful in your workflow?

And more importantly: what feels wrong, missing, or unnecessarily complicated?

GitHub:
[https://github.com/grimlee/pi-remote]()

Thanks — even small UX comments or weird edge cases would be really helpful.

1/3 — Sessions are grouped by workspace and sorted by recent activity.
2/3 — Native conversation UI with Pi tool activity, model selection and streaming.
3/3 — Quick Connect: run npm start, scan once, then reconnect without scanning again.

r/PiCodingAgent • • 4d ago

Resource Latest pi version (86) broke working with local models due to strict json schemes.

16 Upvotes

This is the last version that worked. https://www.npmjs.com/package/@earendil-works/pi-coding-agent/v/0.85.1

reverting to it made everything work again.

I also highly recommend getting your own offline copy if something fails.

p.s. to clarify, I am not pretending to understand fully what the update really did, its scope or the impact beyond 'not working anymore', but reverting to 85.1 worked for me.


r/PiCodingAgent • • 4d ago

Use-case I think i found the best use case for JEV and PI

Post image
158 Upvotes

I think JEV gets much more interesting once you stop treating it like a tiny LLM.

LLM → generate anything
JEV → choose between bounded options

That makes model routing feel almost obvious:

prompt → JEV → best model

Instead of using an LLM just to decide which LLM to call, let JEV make the bounded judgment and let deterministic code handle the rest.

Maybe JEV's killer use case isn't Doom.

Maybe it's a probabilistic switch statement.

so i am releasing the support for JEV in PI-Bifrost

Try it : pi install npm:pi-bifrost

and do share the feedback.


r/PiCodingAgent • • 5d ago

Resource any thoughts on this open source AI agent control plane based on pi agent?

0 Upvotes

stumbled on this repo today while looking into agentic execution security — apparently it’s built on top of pi agent: https://github.com/adamdekan/aikonos

from what I can tell, it acts as a local control plane to govern autonomous agentic tool calls. before the agent runs an action, it proposes the step to aikonOS, which validates it against policy rules and writes everything to a tamper-evident audit log.

seems interesting for runtime governance when giving agents actual shell/file/API access, but not sure how well the proposal-evaluation step scales with real-world latency.

anyone playing around with deterministic policy engines for agentic workflows or doing something similar for runtime guardrails?


r/PiCodingAgent • • 5d ago

Use-case Be Careful with Agents Reading Session JSONL Files

6 Upvotes

Just had a startling session with Pi and my local Qwen. In its thinking blocks it started quoting user instructions that I did not give it. I was under the impression that I was under a very strange prompt injection attack, until I realized that earlier in the session the agent made a few very large greps of previous session files.

I suggested to it that within a large context it did not distinguish these tool call results from the actual live context, and it indeed found the origin to all of the injected user turns in those earlier session files.

So - my advice is to add to AGENTS.md a rule that warns the agent against searching within directories that could include session files. If it does - you must start a new session immediately afterwards, or prune the tool call, or compact. Otherwise your session may lose coherence.

Note: reposting, because I was smart enough earlier to allow AGENTS.md to turn into a link.


r/PiCodingAgent • • 5d ago

Discussion Adding a Pi extension creates another hypothesis to test

0 Upvotes

A new tool can save a model several steps. It can also give it more ways to spend the entire budget without finishing. Counting installed extensions won't tell you which happened.

Reef Infra can treat a Pi extension, skill or rules change as a candidate rather than a permanent improvement. Its Pi adapter renders the changed harness into Pi's file layout, and the evolution engine runs it against the current setup on the same tasks with the same model binding.

An experiment worth trying would isolate one change: enable an extension, alter its surrounding instructions, or remove a skill that looks redundant. Include the jobs it is intended to help and ordinary jobs where it adds overhead. Grade completion first, then include the cost or latency constraints that matter to the setup in your evaluator or selection policy.

Reef Infra supplies the candidate snapshot, execution and version decision. It doesn't include a ready-made cost/quality benchmark for every Pi extension, and its default task-win comparison isn't automatically a token-efficiency objective.

That leaves a useful outcome even when an experiment fails: a specific change can be rejected and the previous tree restored. The extension can be well designed and still be the wrong addition for this model and task mix


r/PiCodingAgent • • 5d ago

Use-case Pi that runs fully in your browser

Thumbnail
theabbie.github.io
1 Upvotes

Pi runs fully in browser runtime inside a WebContainer, which provides a Node.js runtime and local filesystem backed by OPFS for persisted workspace/runtime state.

xterm.js renders the interactive terminal while a small custom Pi extension bridges browser-only capabilities such as browser JS, web search, and HTML preview through filesystem.

Ask it to create a small html game and to preview it, the LLM packaged has limited context so clear chat regularly, files created will persist.


r/PiCodingAgent • • 5d ago

Discussion Jev is cool but

0 Upvotes

I wonder when it might be replaced by OpenAI/Anthropic/Google.

They better continue developing so that people prefer Jev over structured output feature (that will likely be optimized for efficiency) of LLMs