Qortora · Search · Indexed page

pi.devFetched 2026-08-15T06:37:02Z

Pi Coding Agent

A terminal-based coding agent

Open original source · Full cached text

Pi Coding AgentCopy SVGDownload SVGPress Kit HomeDocumentationNewsPackagesModels Home→Documentation→News→Packages→Models→ GitHubnpmDiscordX Earendil Inc. There are many agent harnessesbut this one is yours Pi is a minimal agent harness.Adapt Pi to your workflows, not the other way around. curlPowerShellnpmpnpmbun curl -fsSL https://pi.dev/install.sh | shpowershell -c "irm https://pi.dev/install.ps1 | iex"npm install -g --ignore-scripts @earendil-works/pi-coding-agentpnpm add -g --ignore-scripts @earendil-works/pi-coding-agentbun add -g --ignore-scripts @earendil-works/pi-coding-agentCopy $ scroll to continue Pi - Make it yoursCrooked mode: ON Revert Why Pi? Pi - manipulate the website Pi is a minimal agent harness. Adapt Pi to your workflows, not the other way around. Customize Pi with extensions, skills, prompt templates, and themes. Bundle them as Pi packages and share via npm or git. Pi ships with powerful defaults but skips features like sub-agents and plan mode. Ask Pi to build what you want, or install a package that does it your way. Four modes: interactive, print/JSON, RPC, and SDK. See OpenClaw for a real-world integration. Read the documentation Change the harness, not your workflow Pi - Build a custom workflow extension Pi isn't a sealed product. If you need a command, tool, provider, workflow, or UI tweak, just ask Pi to build it. It will customize itself on the fly. Have Pi manipulate itself in place, hit /reload, and keep going. If you think others will find what you built useful, share it! 15+ providers, hundreds of models Pi - Switch models mid-session Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter, Ollama, and more. Authenticate via API keys or OAuth. Switch models mid-session with /model or Ctrl+L. Cycle through your favorites with Ctrl+P. Add custom providers and models via models.json or extensions. Tree-structured, shareable history Pi - Branch and share a session tree Sessions are stored as trees. Use /tree to navigate to any previous point and continue from there. All branches live in a single file. Filter by message type, label entries as bookmarks. Export to HTML with /export, or upload to a GitHub gist with /share and get a shareable URL that renders it. Example session. Context engineering Pi - Load project skills and instructions Pi's minimal system prompt and extensibility let you do actual context engineering. Control what goes into the context window and how it's managed. AGENTS.md: Project instructions loaded at startup from ~/.pi/agent/, parent directories, and the current directory. SYSTEM.md: Replace or append to the default system prompt per-project. Compaction: Auto-summarizes older messages when approaching the context limit. Fully customizable via extensions: implement topic-based compaction, code-aware summaries, or use different summarization models. Skills: Capability packages with instructions and tools, loaded on-demand. Progressive disclosure without busting the prompt cache. See skills. Prompt templates: Reusable prompts as Markdown files. Type /name to expand. See prompt templates. Dynamic context: Extensions can inject messages before each turn, filter the message history, implement RAG, or build long-term memory. Steer or follow up Pi - Steer a running agent Submit messages while the agent works. Enter sends a steering message (delivered after current tool, interrupts remaining tools). Alt+Entersends a follow-up (waits until the agent finishes). Four modes Pi - Generate a shell script in print mode Interactive: The full TUI experience. Print/JSON: pi -p "query" for scripts, --mode json for event streams. RPC: JSON protocol over stdin/stdout for non-Node integrations. See docs/rpc.md. SDK: Embed Pi in your apps. See OpenClaw for a real-world example. Primitives, not features Pi - Install a third-party extension Features that other agents bake in, you can build yourself. Extensions are TypeScript modules with access to tools, commands, keyboard shortcuts, events, and the full TUI. Sub-agents, plan mode, permission gates, path protection, SSH execution, sandboxing, MCP integration, custom editors, status bars, overlays. Don't want to build it? Ask Pi to build it for you. Or install a package that does it your way. See the 50+ examples. Bundle extensions, skills, prompts, and themes as packages. Install from npm or git: $ pi install npm:@foo/pi-tools $ pi install git:github.com/badlogic/pi-doom Browse packages and it can play doom Fig. 01 | DOOM EXTENSION What we didn't build Pi is aggressively extensible so it doesn't have to dictate your workflow. Features that other tools bake in can be built with extensions, skills, or installed from third-party Pi packages. This keeps the core minimal while letting you shape Pi to fit how you work. Read the blog post No MCP Build CLI tools with READMEs (see Skills), or build an extension that adds MCP support. Why? No sub-agents Spawn Pi instances via tmux, or build your own with extensions, or install a package that does it your way. No permission popups Run in a container, or build your own confirmation flow with extensions inline with your environment and security requirements. No plan mode Write plans to files, or build it with extensions, or install a package. No built-in to-dos Use a TODO.md file, or build your own with extensions. No background bash Use tmux. Full observability, direct interaction. Get involved with Pi Issues GitHub for bugs and features. Discord Community server for discussion and sharing. Documentation Read the documentation or browse the source on GitHub. Earendil Inc. & Contributors Press Kit MIT License AutoLightDark pi.dev domain graciously donated by exe.dev