Favicon of Pi

Pi

An open-source terminal coding agent under the MIT license. Runs locally, connects to Ollama or cloud providers, and supports custom workflows.

Screenshot of Pi website

Pi is a terminal-based coding assistant for developers who want to shape the agent around their own workflow. Its core stays small, while extensions can change its tools, commands and terminal interface. It's open source under the MIT license.

The agent runs on your machine or in a local Docker container. It supports Ollama for local LLM use, plus cloud providers including Anthropic, OpenAI, Google and OpenRouter. With a cloud provider, model requests go to that service. You can switch models during a session and add custom providers.

Customization reaches beyond prompts. TypeScript extensions can add workflows, editors, confirmation flows or sub-agents, and Pi can write extensions for itself. Skills, prompt templates and themes can be bundled into packages and shared through npm or git. Pi also reads AGENTS.md project instructions and lets you control its system prompt and how it summarizes older context.

Conversation history forms a tree, so you can return to an earlier message and pursue a different approach without losing the other branches. Sessions can be exported as HTML or shared through a GitHub gist. While the agent works, you can steer the current task or queue a follow-up.

Pi supports interactive terminal use, scripted text or JSON output, RPC and an SDK for embedding it in applications. Built-in MCP support connects external tools. It has no built-in permission system: by default, it inherits the filesystem, process, network and credential access of the user and process that launched it.

Similar to Pi