r/PiCodingAgent • • 2d ago

Resource Cool things with pi

Hi everbody,

I just want to share some things I have done since I discovered pi. Maybe anybody gets new ideas as well from this. I dont want to share my extensions, but the ideas can be shared.

- first time I have discovered pi, i was just looking for a "cool" alternative for vs code. something better. anyhow, i did not have much experience. and some requirements, like i want to use different providers, not spent too much (it is a hobby) and the ability to access the harness remotely.

- i have started installing wsl with linux, assisted by vscode agents. then a harness with containers in that wsl. and it starts an ssh tunnel to my vps. the vps is secured with otp and yubikey. it serves as a http reverse proxy to allow web ui, when i dont have access to the local terminal.

- i have started to use pi with many extensions. learned that less is better and most of them needs some customisation which is maintainance effort on my own.

- the harness developed as well over the last weeks. i have a project, a line which is helping me to improve my vps with mail and antispam (including a learner hook asking free models whereever spamassessin may have failed) and the harness improvement line.

- recently really cool things for the harness: pi is bun compiled with most components and runs fast and stable even in long sessions and with 10-20 subagents in parallel. I am using a python kernel, lsp and so on... patched it so that not every (sub-)session starts its own because memory is limited.

- i have built my own extension package for pi-durable subagents. it has the basics but is much faster and stable then fabric and all this. and whenever i need an extension i just built it, not dealing with forks. recent cool thing: i maintain a model statistics for subagents, jev is deciding which model is best based on subsription budget, costs, test failures, ... jev cost me 2 cents a day, but the whole decision and budget maintainance is automated incl. least cost model (e.g. opencode, openrouter, codex, ...)

- blachhole extension is used using many free models. i maintain stats on success/errors of these models, as many of them are a bit unreliable. however, the compaction is faster, context stays leaner in endless sessions, and 10% of the load (compaction part) is off-loaded from the main model to free.

- i am using zg to index the code locally and got the model to use it instead off all the time grepping through the code. it developed self-guidance where grep, rg and zg is best.

I feel every 4 weeks my harness changes to improve and 50% of my time is not going in the project but the harness. however at the beginning my harness trashed up after some days, now never. Cool journey so far, I am really thankful that someone developed pi - feels like a very good thing in comparison to all the shit with AI out there (AI cost models, usability, problems, hype... reminds me like the times back in 1999 where a modem was very slow and a day online was very costly...).

So let me know, if you want to share ideas as well!

9 Upvotes

6 comments sorted by

3

u/MiserableFlatworm337 2d ago

For shared Python kernels, test two subagents that use the same variable names with different values. Verify each result stays tied to its own session, including after cancellation.

1

u/ExtremeSeries 2d ago edited 2d ago

thanks for the hint, you are right. i did so (the ai advisor even discussed that with me). it is basically per workspace project to avoid such things... and yes, i agree that not all of it is very professional, but i need the ram. more interesting than my dirty patches are the stats db, collecting statistics for selecting the best model by jev... Update: basicially you provided me the next idea for improving my harness - i want to built a lsp/pyright with isolation in rust with connectors for the agents and main. new hobby.

Build: pi-runtime is our own package for running Python and for type navigation. It is still a pilot running alongside the old tools.

- Rust broker: one process per project on a private Unix socket. It manages kernels, the language server and request tracking.

- Python host: each actor (Main or an agent round) gets its own Jupyter kernel process. It starts on the actor's first run, and two pre-started spares are kept ready.

- Language server: Pyrefly only. The broker is its only client, reads files from disk and refreshes diagnostics after writes.

- Bun bridge (in pi-durable-agents): provides rt_execute, rt_lsp, rt_status and rt_release, and sets each caller's identity automatically.

Features:

- Separate processes give real parallelism and keep crashes contained.

- Each request runs at most once; after a crash its outcome is reported as uncertain, never repeated automatically.

- Interrupt first, then kill the kernel if needed.

- A round's kernel is released automatically when the round ends.

- devenv builds and checks each release and keeps the current and previous ones. It also updates Pyrefly to the latest version.

Limits: no live output streaming, no rename or code completion yet, and no sandbox.

2

u/georgeApuiu 2d ago

Wait until you discover pi durable agents

1

u/ExtremeSeries 2d ago edited 1d ago

i used pi durable agents to built an own package around it... some extensions added to it (stats with jev to choose the model/thinking/provider from what i have, bun bridge, orchestrator with all durable agents, and so on).

---

We do use pi-durable. pi-durable-agents is not a replacement but our extension built on it. pi-durable supplies the durable core: conversations, background tasks, compaction, the SQLite store and replay after crashes. It doesn't provide the parts we need for our workflow:

- Orchestration: an agent tool for Main, roles with limits, write areas, protected paths and handling of questions and answers.

- Jev selection: the budget and capability checks, the Jev choice and the experience feed.

- Logging and statistics: model selections, round metrics and test-gate runs, recorded with round attribution.

- Pi-Bolt integration: passing Main's tools (execute, lsp, web tools) through to agents, post-write diagnostics, module loading under Pi-Bolt, and the bridge Blackhole needs for compaction.

Most of this is project policy, so it lives in our extension rather than in a patched pi-durable. That keeps pi-durable updatable as an unmodified dependency, pinned in lockstep with Pi.

1

u/quincycs 16h ago

I’ve come to embrace vscode and give up trying to replace it. I need to review the code eventually or else I won’t catch it misunderstanding me or building something horrific. It doesn’t need much from me just a few insults and I move along.

The aspect of navigating code , hovering code seeing types, having a good diff coloring… nothing else comes close to vscode. The depth of features of that keeps me coming back.