Pi logo

Pi

Free

Highly customizable terminal harness; minimal base prompt, extension-driven.

FreeFree tier
Type
Open Source

About Pi

Pi is a minimal agent harness designed to adapt to your workflows rather than forcing you to adapt to it. It features a minimal system prompt for token efficiency and extensive customization through extensions, skills, prompt templates, and themes. Pi supports over 15 AI model providers including Anthropic, OpenAI, Google, Mistral, and more, with the ability to switch models mid-session. Its tree-structured session history allows branching from any point, filtering, bookmarking, and sharing via HTML export or GitHub gist. Context engineering capabilities include AGENTS.md and SYSTEM.md files, compaction, and dynamic context injection via extensions. Pi operates in four modes: interactive TUI, print/JSON for scripting, RPC for non-Node integrations, and an SDK for embedding. Users can steer running agents with inline messages or queue follow-ups. Pi is open source and shipped with powerful defaults, intentionally omitting sub-agents and plan mode to keep the harness minimal.

Key Features

Minimal system prompt for token efficiency
Extension-driven customization (extensions, skills, prompt templates, themes)
Support for 15+ AI model providers (Anthropic, OpenAI, Google, etc.)
Switch models mid-session with /model or Ctrl+L
Tree-structured, shareable session history with branching and bookmarking
Context engineering via AGENTS.md, SYSTEM.md, compaction, and dynamic context
Four modes: interactive TUI, print/JSON, RPC, and SDK
Steer or follow-up messaging during agent runs
Skills loaded on-demand with progressive disclosure
Prompt templates expanded via /name

Pros & Cons

Pros
  • Highly customizable via extensions, skills, and themes
  • Minimal base prompt reduces token usage and cost
  • Supports a wide range of AI providers and models
  • Tree-structured history allows non-linear exploration
  • Open source and free to use
  • Four distinct modes cover terminal, scripting, RPC, and embedding
  • Dynamic context injection enables long-term memory and RAG
  • Easy sharing of sessions via gist or HTML export
Cons
  • Intentionally omits sub-agents and plan mode, which may be needed for complex multi-step workflows
  • Terminal-based interface may have a learning curve for non-command-line users
  • Customization via extensions requires some technical proficiency
  • Limited built-in guidance due to minimal base prompt

Best For

Building custom workflow extensions (e.g., commit/push pipeline)Generating shell scripts with print modeEmbedding Pi as an agent in applications via SDKContext engineering for project-specific instructions and memoryExploring and branching conversation trees for complex tasksRapid prototyping of agent interactions with multiple modelsCreating shareable agent sessions for collaboration

FAQ

What is Pi?
Pi is a minimal agent harness that adapts to your workflows. It is open source and highly customizable via extensions, skills, prompt templates, and themes.
How do I customize Pi?
You can customize Pi using extensions, skills, prompt templates, and themes. These can be bundled as Pi packages and shared via npm or git.
Which AI models does Pi support?
Pi supports over 15 providers, including Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter, Ollama, and more.
Can I switch models during a session?
Yes, you can switch models mid-session using /model or Ctrl+L, and cycle through favorites with Ctrl+P.
How does session history work?
Sessions are stored as trees. You can navigate to any prior point using /tree, branch from there, bookmark messages, filter by type, and export to HTML or share via GitHub gist.
What is context engineering?
Pi allows you to control what goes into the context window using AGENTS.md for project instructions, SYSTEM.md for per-project system prompts, compaction for auto-summarization, and extensions for dynamic context injection.
What modes does Pi offer?
Pi has four modes: interactive (full TUI), print/JSON for scripting, RPC JSON protocol over stdin/stdout, and an SDK for embedding in applications.
Is Pi free?
Yes, Pi is open source and free to use. You only pay for the AI model API usage through your own provider keys.