source: kdnuggets: working with pi coding agents

level: technical

pi is a coding agent built by mario zechner and now owned by earendil inc. it takes the opposite approach of most tools by refusing to include mcp support, sub-agents, plan mode, permission popups, built-in to-do lists, or background bash. its system prompt runs under 1,000 tokens, far less than the 7,000 to 10,000 tokens common in other agents. the idea is that frontier models already know how to act as agents, so a smaller prompt leaves more context for actual work. pi has gained over 70,000 github stars and is backed by a governance document keeping the core mit-licensed.

the toolset is just four tools: read, write, edit, and bash. everything else is meant to be added through extensions. users can write typescript extensions to intercept tool calls, add custom tools, or create slash commands. for example, an extension can block dangerous bash commands like rm -rf by prompting for confirmation. pi also stores sessions as trees, letting users branch conversations at any point with the /tree command. it supports over 15 model providers, including anthropic, openai, google, and local models via ollama, with mid-session switching.

the minimal design saves tokens and gives users control, but it comes with trade-offs. teams must build their own safety rails, sub-agent coordination, or planning steps if they need them. one reviewer found pi unsuitable for unattended overnight runs because it lacks default safety features. still, the session tree and multi-provider switching are practical benefits. pi's extension api is well-documented, and the model can even help write extensions. the project's transparency about what it omits is unusual and worth noting for teams evaluating coding agents.

why it matters: pi's minimal design reduces token costs and gives data scientists full control over agent behavior, but requires building custom safety and workflow extensions.


source: kdnuggets: working with pi coding agents