There are many coding agents, but this one is mine.
Build your own harness.
Ready to go.
Built to extend.
Knows how to build itself.
https://pi.devgithub.com/badlogic/pi-mono
In Pi, the default tool belt is read, write, edit, and bash.
Same harness, four different surfaces.
Editor, chat history, sessions, commands, model switching.
pi
One-shot output, or stream every event as JSON lines.
pi -p "..."pi --mode json "..."
Use the same session engine directly from Node/TypeScript.
createAgentSession()
Headless JSONL protocol over stdin/stdout for non-JS IDEs and other apps.
pi --mode rpc
A custom session can be just a Bash alias.
alias researcher='pi \
--tools read,grep,find,ls \
--extension ~/.pi/agent/extensions/fetch-content.ts \
--extension ~/.pi/agent/extensions/web-search.ts \
--no-session'
write or editA preset is a named bundle of model, thinking, tools, and instructions.
--preset plan/preset.pi/presets.json*Or whatever you want them to be. You know the Shell.
export default function (pi) {
let claudePrompt;
pi.on("model_select", async ({ model }) => {
claudePrompt = model.id.includes("claude")
? "Seek existing windows for this shootout before blasting new holes, cowboy."
: null;
});
pi.on("before_agent_start", async (event) => {
if (!claudePrompt) return;
return { systemPrompt: `${event.systemPrompt}\n\n${claudePrompt}` };
});
}
model_select updates extension statebefore_agent_start injects per-turnNot one global agent. Many deliberately-shaped Pis.
Model choice, tool belt, prompts, auth, and UI are not “the product.” They’re parameters you can bind differently for each repo, team, or workflow.
AGENTS.md, SYSTEM.md, prompts, settings.
Reusable instructions for focused capabilities and workflows.
Tools, commands, UI, state, event hooks, custom providers.
Embed or drive the harness from your own application.
pi install npm:@your-org/pi-team-tools
pi install git:github.com/your-org/pi-workflows
pi list
Team conventions can be versioned, installed, reviewed, and evolved like any other dependency.
That can be great. Strong defaults, polished workflows, faster onboarding.
Per repo. Per team. Per model. Per workflow. Less “accept the featureset,” more “shape the agent around the environment.”
brew install pi-coding-agentThen run pi.
/loginSign into Claude, ChatGPT Codex, Copilot, Gemini CLI, or Antigravity from interactive mode.
~/.pi/agent/auth.jsonStores API keys and OAuth tokens. /logout clears them. OAuth tokens auto-refresh.
ANTHROPIC_API_KEY, OPENAI_API_KEY, or AuthStorage.create("/tmp/my-app/auth.json").
Resolution order: --api-key → auth.json → environment variable.
brew install pi-coding-agent
dmg-egg.github.io/slides-harness-engineering-with-pi/