AGENTCONN
P

// Agent profile

Pi

Coding Free

About Pi

Pi (earendil-works/pi) is a TypeScript-based AI agent toolkit that bundles a unified LLM API, a composable agent loop, a terminal user interface, and a coding agent CLI into a single package. It occupies the same 'terminal-first coding agent' category as OpenAI Codex and OpenCode, forming the third leg of what the GitHub Trending board has surfaced as a three-way race for the terminal agent CLI category. Pi's differentiator is its toolkit-first architecture: rather than shipping a monolithic agent binary, it exposes the agent loop, provider abstraction, and TUI as composable primitives that developers can wire together for custom agent workflows. Multi-model from day one — Claude, GPT, Gemini, and local models all work through the unified API. At 71K+ GitHub stars with +404/day sustained velocity, Pi has established itself as a serious contender alongside the 98K-star Codex and 186K-star OpenCode.

Key Features

  • Unified LLM API — provider-agnostic abstraction across Anthropic, OpenAI, Google, local models
  • Composable agent loop — wire up custom agent workflows from primitives
  • TUI — rich terminal interface for observing and interacting with agents
  • Coding agent CLI — full-featured terminal coding agent out of the box
  • Multi-model — Claude, GPT, Gemini, Ollama, all through one interface
  • TypeScript-based, open source
  • 71K+ GitHub stars, actively maintained

Overview

Pi is a terminal-first AI agent toolkit that ships both the coding agent you can use today and the building blocks to construct your own. While Codex CLI ties you to OpenAI’s models and OpenCode leads with its TUI observability, Pi’s pitch is composability: the unified LLM API, agent loop, and terminal interface are separate primitives you can recombine for domain-specific agents without forking the whole project.

The three-way race between Codex (98K stars), OpenCode (186K stars), and Pi (71K stars) is the most interesting competitive dynamic in developer tools right now. All three are trending simultaneously on GitHub, and the category is far from settled.

Key Capabilities

Unified LLM API: A single TypeScript interface that abstracts across Anthropic, OpenAI, Google Gemini, and OpenAI-compatible local endpoints (Ollama, vLLM, llama.cpp). Switch providers via configuration, not code changes. This is the same design pattern as pi-mono and OpenCode, but Pi’s implementation is lighter-weight and designed for embedding into other tools.

Composable Agent Loop: Rather than a black-box agent binary, Pi exposes its agent loop as a library primitive. You get the tool-calling cycle, context management, and error recovery as importable functions. Build a coding agent, a research agent, or a domain-specific workflow agent using the same underlying loop.

Terminal User Interface: A rich TUI that shows agent actions, tool calls, and file modifications in real time. Similar to OpenCode’s observability surface, but integrated with the toolkit’s composable architecture so you can customize the display for your specific agent workflow.

Coding Agent CLI: Out of the box, Pi ships a working coding agent that reads your codebase, edits files, runs shell commands, and commits changes. This is the layer that competes directly with Codex and OpenCode for the daily driver terminal agent slot.

Compared to Codex and OpenCode

CodexOpenCodePi
Stars98K186K71K
LanguageRustTypeScriptTypeScript
ModelsOpenAI-onlyMulti-modelMulti-model
ArchitectureMonolithic CLIPlugin-basedToolkit + CLI
DifferentiatorBrand + ecosystemTUI + plugin archComposable primitives

Pi’s toolkit-first approach means it serves two audiences: developers who want a ready-made coding agent (use the CLI) and developers who want to build custom agents (use the toolkit). Codex optimizes for the first audience; OpenCode balances both; Pi leans toward the second while keeping the first viable.

Who It’s For

Developers who want a terminal coding agent that works today but also want the flexibility to build custom agent workflows without starting from scratch. Teams evaluating the terminal agent category who want to experiment with multiple approaches before committing. Tooling builders who need a composable agent runtime rather than a finished product to configure.

Similar Agents