Skip to content

Pi Coding Agent

Summary

An open-source coding agent by Block with a radically minimal approach: 4 tools, sub-1000 token system prompt, TypeScript extension system, and model-agnostic provider support.

Core Design

  • 4 tools: Read, Bash, Edit, Write
  • <1000 token system prompt — vs Claude Code's ~14,000 tokens
  • Model-agnostic — OpenAI, Anthropic, Google, OpenRouter, Ollama
  • YOLO security — no permission prompts by default
  • TypeScript extensions — full customization of UI, tools, events, workflows

Key Features

Feature Description
Extensions TypeScript files that can customize everything — UI, tools, event handling, workflow orchestration
Skills Markdown-based procedural knowledge (industry-standard Skills format)
Session fork Branch conversation from any previous point
Custom system prompt append-system to add instructions; system.md to fully replace
Hot reload — extensions reload instantly during development

Extensions vs Skills

Extensions Skills
What TypeScript code Markdown instructions
Use when Need to run code, intercept tool calls, add UI Need to inject instructions for specific tasks
Example Git status UI, workflow pipeline Code review, spec generation, refactoring

Philosophy

"The models are actually reinforcement trained up to a wazoo. They know what a coding agent is. You don't need 10,000 tokens to tell them you're a coding agent."

The minimal approach saves context window tokens for actual work, not agent instructions.

Context Workflow Extension

A demonstration of Pi's extension power — encodes a multi-step development pipeline: 1. Read specification 2. Write implementation 3. Review code (fresh context window) 4. Fix issues 5. Run tests 6. Final verification

The agent manages its own state through workflow.next — a built-in tool for stepping through deterministic pipelines.

See Also