SuperAPIAI Directory

pi

github.com · AI agents

Pi is a minimal, extensible AI agent toolkit and coding agent CLI, providing a unified LLM API, agent loop, terminal UI (TUI), and TypeScript SDK. It emphasizes customization to the user's own workflow, supports personalization through extensions, skills, prompt templates, and themes, and can be packaged as Pi packages shared via npm or git. Pi supports interactive use, automation in print or JSON mode, RPC control, and building applications on the SDK. By default it does not include features such as sub-agents and plan mode; users need to build or install the corresponding packages themselves. Pi requires Node.js 22.19 or higher, and provides installers for macOS, Linux, and Windows as well as a Nix installation method. Note that Pi does not have a built-in permission system and by default runs with the permissions of the user and process that launched it; if stronger isolation is needed, use a container or sandbox solution.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux · API

About this tool

Pi is a minimal, extensible AI agent harness, positioned to let users reshape Pi to their own workflow rather than adapting to the tool. The repository contains both the Pi CLI and its supporting libraries in a monorepo structure.

Purpose and positioning: Pi provides a unified LLM API, agent loop, terminal UI (TUI), and coding agent CLI, usable for interactive coding tasks and as infrastructure for building AI applications. The official description states it comes with powerful defaults but intentionally skips features such as sub-agents and plan mode; users can ask Pi to build them itself, or install packages that implement them in their own way.

Main capabilities: Supports customization through extensions, skills, prompt templates, and themes, and can be packaged as Pi packages shared via npm or git. Usage modes include interactive use, automation in print or JSON mode, control via RPC, and building applications with the Pi TypeScript SDK. The official materials also mention OpenClaw as a real-world integration case, and earendil-works/pi-chat for Slack/chat automation and workflows.

Installation and usage: After installing the command-line interface, launch Pi in the target working directory; for built-in AI providers, run /login within Pi to connect a subscription or API key, then assign tasks to Pi. Pi requires Node.js 22.19 or higher; the macOS, Linux, and Windows installers can install Node.js if needed. The installer pins all dependencies and updates via pi update; installing directly with npm is also possible, but the npm method does not pin transitive dependencies. Nix users can install via nix profile add github:earendil-works/pi/stable and update with nix profile upgrade pi; release tags can also be used to pin versions, or the main branch to get unreleased changes. Nix builds Pi from source and supports ARM64 and x86-64 on Linux and macOS.

Permissions and isolation: Pi does not include a built-in permission system for restricting file system, process, network, or credential access, and by default runs with the permissions of the user and process that launched it. For stronger boundaries, Pi can be containerized or sandboxed; the documentation presents three modes: the Gondolin extension (pi and provider authentication stay on the host, while built-in tools and ! commands are routed to a local Linux micro-VM), plain Docker (the entire pi process runs in a local container), and OpenShell (the entire pi process runs in a policy-controlled sandbox).

Supply chain and builds: The project treats npm dependency changes as code changes requiring review, pins direct external dependencies to exact versions, sets save-exact=true and min-release-age=2 in .npmrc, uses package-lock.json as the source of truth for dependencies, and a pre-commit hook blocks accidental lockfile commits (unless PI_ALLOW_LOCKFILE_CHANGE=1 is set). The pi.dev installer installs from install-lock to pin transitive dependencies, whereas the npm package does not pin transitive dependencies. Release smoke tests and npm publishing use the same tarball packer. CI installs with npm ci --ignore-scripts and periodically runs npm audit.

Other: The official project encourages users to share open-source coding agent sessions, which can be published to Hugging Face using badlogic/pi-share-hf. The pi.dev domain was donated by exe.dev.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools