Pi Agent Harness
Pi Agent Harness is a monorepo for building self-extensible coding agents, including an interactive CLI, an agent runtime with tool calling and state management, and a unified multi-provider LLM API. It solves the problem of creating and running coding agents that can extend themselves, and is for developers building or using AI-powered coding tools.
🎬 Build an AI Bookkeeper with Pi Agent Harness · ZazenCodes
✨ Key features
- Interactive coding agent CLI
- Agent runtime with tool calling and state management
- Unified multi-provider LLM API (OpenAI, Anthropic, Google)
- Standalone application-composition runtime for services and RPC
- Vendor-neutral telemetry contracts and conformance tests
- Terminal UI library with differential rendering
🎯 Use cases
- Build custom coding agents that can extend themselves
- Integrate multiple LLM providers behind a single API
- Create terminal-based AI tools with differential rendering
- Compose services with replicated state and RPC
- Publish and share coding agent sessions for open source work
📦 Installation
🧰 Requirements: Requires Node.js and npm; API keys for LLM providers if using them; optional Hugging Face account for sharing sessions.
npm install --ignore-scripts # Install all dependencies without running lifecycle scripts
For building standalone binaries from release source:
VERSION="<release-version>"
tar -xzf "pi-${VERSION}-source.tar.gz"
cd "pi-${VERSION}"
./scripts/build-binaries.sh --offline-model-data --platform linux-x64 --out "$PWD/out"
🚀 Usage
./pi-test.sh # Run pi from sources (can be run from any directory)
For development:
npm run build # Refresh model data, then build all packages
npm run check # Lint, format, and type check
./test.sh # Run tests (skips LLM-dependent tests without API keys)
⚠️ Good to know
Pi does not include a built-in permission system; it runs with the permissions of the user and process that launched it, so containerization or sandboxing is recommended for stronger boundaries.
❓ FAQ
How do I install Pi?
Run npm install --ignore-scripts to install all dependencies without running lifecycle scripts. For standalone binaries, extract the release source archive and run the build script.
What LLM providers are supported?
The unified multi-provider LLM API supports OpenAI, Anthropic, Google, and others.
Does Pi have a permission system?
No, Pi does not include a built-in permission system. It runs with the permissions of the user and process that launched it, so containerize or sandbox Pi for stronger boundaries.
How can I contribute?
See CONTRIBUTING.md for contribution guidelines and AGENTS.md for project-specific rules. Note that new issues and PRs from new contributors are auto-closed by default, but maintainers review them daily.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.