原始内容
A collection of extensions, skills, tools and experiments with the Pi coding agent.
Current offerings
- @the-agency/pi-tokenshrink: reduce a prompt's token count deterministically, without using inference
- @the-agency/pi-hashline-edit: alternate to Pi's built in
edittool that improves the accuracy and efficiency of file edits, with high potential to reduce token usage - @the-agency/pi-spec-kit: use Spec Kit for spec-driven development
- @the-agency/vmpi: run
pisandboxed in a QEMU microVM via Gondolin -- hardware-isolated, no root required - @the-agency/pi-observability: record OpenTelemetry logs for your Pi sessions
Goals
Local inference
Privacy, self-sufficiency, ethics and energy conservation are personal values of mine, so there will be an emphasis on local and low-energy inference sources (e.g. vLLM using local GPUs or CPUs).
Local inference also enables experimentation with open models that have been trained on more carefully curated sets of data.
Security
See vmpi. pi-guardrails is a handy UX improvement, but it's not a security feature. Even running in a Docker container or a process-level sandbox is not bulletproof. If you're installing packages from npm, especially if they're developed with agent assistance, all that code should be isolated from the rest of your system. Running your agent—and its extensions, tools and skills—in a virtual machine is the safest way to protect your machine from errant agent choices and supply-chain attacks.
Do less, better
Avoid maximalism and accelerationism vibes. All code output is authored by a human—assisted by an agent, but with thorough review and revision—who understands, dog-foods and ultimately vouches for all code before publishing it for others. These are tools to help developers craft a coding agent experience to help them, not replace them. It is not intended to enable inactive gods wishing to set a course and walk away.
Doing less also means:
- optimizing prompts for token efficiency
- limiting what agents can see and do to avoid context bloat and incorrect choices
Doing better also means:
- navigating code lexically: why grep when you can query a syntax tree?
- optimizing prompts for accuracy, preventing agents from doing the wrong thing
- measure performance where possible to find bottlenecks
Recommendations
I'm not going to write a plugin or related tool if one already exists that solves a problem well. Here are some tools I'm currently using or experimenting with alongside these plugins:
- headroom: deterministic prompt compression, combining multiple tools and strategies, including RTK
- llama.cpp: serve open models locally; even if you only have a 4GB VRAM GPU in a laptop, coding inference with a Qwen coding model is slow but effective
- ponytail: build code that prefers simple, reusable solutions that depend on existing code and dependencies whenever possible
- pi-subagents: I prefer to "pair program" with an agent iteratively; in the rare case you need to distribute work to multiple agents to keep contexts clean, this is all you need
- maintaining long-term memory by hand: I have tried several solutions that help an agent learn and get better on its own over time. They worked, but burn extra tokens on a self-learning loop. Putting reusable instructions in the context files an agent already uses is simple and just as effective. When something goes wrong, edit AGENTS.md by hand, or update Pi's APPEND_SYSTEM.md file for general instruction. If the file gets too long, apply the progressive disclosure pattern: split it up and use AGENTS.md as table of contents.
- pi-autoresearch: one of the other rare use cases where I let an agent loose on its own is looking for performance optimizations; autoresearch is the simplest solution.