SuperAPI AI Directory

Pi Agent

A lightweight, extensible personal AI Agent development framework.

Open website

About this tool

Pi Agent is a terminal-based coding Agent, and also a minimalist Agent framework (harness). Its core philosophy is to let users adapt Pi to their own workflows, rather than the other way around. Pi provides powerful default configurations but intentionally omits features such as sub-agents and plan mode; users can directly ask Pi to build the features they need, or install packages that match their habits.

Main capabilities

  • Extensibility: Customize Pi through extensions (TypeScript modules), skills, prompt templates, and themes, which can be packaged as Pi packages and shared via npm or git. Extensions can access tools, commands, keyboard shortcuts, events, and the full TUI.
  • Multi-model support: Supports 15+ providers and hundreds of models, including Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter, Ollama, etc., with authentication via API key or OAuth. During a session, use /model or Ctrl+L to switch models, Ctrl+P to cycle through favorite models, and add custom providers and models via models.json or extensions.
  • Tree-structured shareable history: Sessions are stored as a tree structure. Use /tree to navigate to any historical point and continue; all branches are kept in a single file and can be filtered by message type and bookmarked. Supports /export to HTML, or /share to upload to a GitHub gist to get a shareable URL.
  • Context engineering: A minimalist system prompt and extensibility enable true context engineering. AGENTS.md loads project instructions from ~/.pi/agent/, parent directories, and the current directory; SYSTEM.md can replace or append to the default system prompt per project; compaction automatically summarizes old messages when nearing the context limit and can be fully customized via extensions; skills are capability packages loaded on demand; prompt templates are reusable Markdown files expanded by typing /name; extensions can inject messages before each turn, filter history, implement RAG, or build long-term memory.
  • Steering and follow-up: Messages can be submitted while the Agent is working. Enter sends a steering message (delivered after the current tool, interrupting the remaining tools), Alt+Enter sends a follow-up message (processed after the Agent finishes).

How to use Pi offers four modes: interactive mode (full TUI experience), print/JSON mode (pi -p "query" for scripting, --mode json outputs an event stream), RPC mode (JSON protocol via stdin/stdout, for non-Node integration), and SDK mode (embed Pi in an application). Extensions, skills, prompts, and themes can be packaged as packages and installed from npm or git.

Use cases Suitable for developers who want to deeply customize their personal AI Agent workflows, for example building custom workflow extensions, custom TUIs, Pi-based shell scripts, drawing-style extensions, etc. More than 50 extension examples are officially provided.

Limitations and notes Pi does not have built-in features such as sub-agents, plan mode, permission pop-ups, built-in to-dos, or background bash; users can implement these themselves via tmux, extensions, or installed packages. MCP is built in, Codemode allows the Agent to compose tool calls in a JavaScript sandbox, and MCP extensions are still supported. Specific information such as fees, pricing, and platform support is not currently provided.