u/elpapi42

Hello guys!

Today i want to share my Pi agent setup, i think i got something in hands here that can benefit the community to really get a powerful agent, nothing compared to claude or codex. What i want to share is my list of extensions and the value each one add to the build.

I want to start with a basic one: pi-fork. This is a basic and minimalistic subagents extension, focused on one single thing, give the main agent the capability to spawn forks of itself to do work on its name. This is quite straightforward, you can achieve the same with any other subagents extension, the only difference is that this one is simpler and have prompts that optimize the communication between the forks and the main agent. This thing brings a single thing to the table: great context management, the main agent context will only contain relevant information, the main agent context will be richer and denser per token, all the noise stays out of the main agent context.

Ok now i want to share the core of this pi build: pi-observational-memory. This one is special, is a custom compaction algorithm inspired/copied from Mastra's article. This custom compaction algorithm enables pi sessions to last forever without maxing out the context window and keep the agent focused. This combined with the rich context window of the pi-fork extension creates a rich re-callable memory system that stays relevant no matter how many weeks you have been using the same session nor the compactions it have withstand.

If you install only the two extensions above, you will enable your pi agent to be on the next level. now i have a couple more extension that give some extra perks to my build:

pi-minimal-subagent: like any other subagents extension, this one is just simpler, without bs. i use this to enable 2 subagents: the "advisor" (concept copied from claude code) and the "reviewer". The fork from pi-fork are extensions of the main agents, they are basically the same agent, they share the same context. This two agents give access to the main agent to different points of view less biased, with clean context windows. The reviewer takes care of code quality, security and ux of the changes introduced by the main agent. The advisor is for strategical decisions around architecture and product.

pi-codemapper: a wrapper of codemapper that enables efficient codebase exploration. This codemapper repo is really bad and unmaintained, it had a cache bug i had to patch myself. im looking forward to switching to cymbal when i get some free time.

pi-rtk-optimizer: This is a classic, not much to say here, it saves some tokens.

Conclusion:

I describe this setup with a single phrase: A personal agent that never forgets and can be useful for weeks before the context window gets maxed out.

I hope you can get value from some of the extensions i shared guys, my own words are not good enough to describe the power i feel when working with this agent setup, so i beg you to try it yourself to really experience what im saying.

u/elpapi42 — 9 days ago

Hello guys!

Im trying to optimize the token usage of my Pi, im kind of preparing myself for when the usage based billing finally establishes as the default in the industry. With this goal in mind i have really come up with a really good Pi setup that manages context wonderfully, i will share that with you in another post later.

With that context in mind, i have reached a wall when it comes to codebase discovery, for example for building a feature, i want to enable my agent to get all the context required for that feature efficiently. Rn what my agent does is grep, find and read all around until it gets what it needs, and this usually consumes more tokens than the actual implementation or feature i want to tackle.

What do you guys do to improve this?

reddit.com
u/elpapi42 — 15 days ago
▲ 136 r/Overforked+1 crossposts

My custom TI frame finally arrived guys!

This is a continuation of this post: https://www.reddit.com/r/Overforked/comments/1r2eowb/final_technical_design_of_my_custom_ti_frame/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

I was not expecting the frame to look so dark in person, in the photos it always looks like a light grey, but on my hands it looks like a very dark grey, im pleased by that.

Have been like 5 months since i started this project, and there still two months left to go before the build is complete and take it for the first ride!

Will be sharing.

u/elpapi42 — 17 days ago