earendil-works / pi
AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI
github.com/earendil-works/piIndexed at d4d74ebUp to date with upstream
What is pi?
pi is a TypeScript agent harness for an extensible coding agent and related service-oriented tasks. It combines an interactive coding agent CLI, an agent runtime with tool calling and state management, and a unified multi-provider LLM API. The repository uses TypeScript with npm packages, plus JavaScript, shell, C, C++, and Dockerfile files.
Written by a model from the README and the source
2,010 files and 17,839 symbols in 4 modules, led by TypeScript (1,731 files) and JavaScript (39).
Code health
Hotspots average 5.6, the place fixes pay off most.
On the leaderboards:#4 of 6 Coding agents#30 of 45 TypeScript repos
Use earendil-works/pi in your agent
Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.
- 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
- 2.Paste the server URL below as the Remote MCP server URL, then click Add.
- 3.Click Connect. A Repowise sign-in window opens. Approve access.
- 4.Repowise's tools are now available in your Claude chats.
Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.
Docshttps://api.repowise.dev/mcp/earendil-works/pi
This repo is public, so anyone with a Repowise account and an API key can connect.
Try asking
- get_overview()
- get_answer("how is pi put together?")
- get_why("why is pi structured this way?")
Explore pi
- DocumentationModule-by-module documentation, 1,733 pages.
- ArchitectureDependency graph, layers and third-party dependencies.
- Code healthEvery file's score and the findings behind it.
- CommitsEach commit's effect on code health.
- OverviewEverything else the index found: contributors, decisions, what changed this week.
How earendil-works/pi works
Input enters pi through entry-point CLIs, servers, and integrations that provide tasks and runtime configuration. packages/agent coordinates the agent loop, tool calls, session state, compaction, and reducer-driven lane snapshots. packages/coding-agent provides the interactive coding agent CLI and connects user interaction with the agent runtime. packages/ai provides a unified API for providers including OpenAI, Anthropic, and Google. packages/client handles server connections by creating a handshake promise and decoding bounded server messages. The system produces user-facing outputs and persisted session artifacts such as transcripts, patches, and indexed evidence.
The codebase has 2,010 files and 17,839 symbols in 4 modules, led by TypeScript, JavaScript and Shell. Code health is 6.9 out of 10, rated fair.
Getting started with pi
- Install dependencies without running lifecycle scripts.
npm install --ignore-scripts # Install all dependencies without running lifecycle scripts - Build all packages after refreshing model data.
npm run build # Refresh model data, then build all packages - Run linting, formatting, and type checks.
npm run check # Lint, format, and type check - Run pi from sources.
./pi-test.sh # Run pi from sources (can be run from any directory)
Commands copied from the README
earendil-works/pi FAQ
What is pi?
pi is an agent harness project for an extensible coding agent. Its packages provide an interactive coding agent CLI, an agent runtime, and a unified multi-provider LLM API.
How does pi work?
pi connects entry-point CLIs and servers to an agent loop that performs tool calls and manages state. It produces user-facing outputs and persisted transcripts, patches, and indexed evidence.
How do I install pi?
pi dependencies are installed with npm install --ignore-scripts. The repository also provides npm run build to build all packages.
What language is pi written in?
pi is primarily written in TypeScript. The repository also includes JavaScript, shell, C, C++, and Dockerfile files.
How is the pi code organized?
pi is organized mainly under packages, with scripts, .pi, and root-level files also present. packages/agent coordinates runtime work, packages/coding-agent provides the coding CLI, and packages/ai provides the LLM API.
Who is pi for?
pi is for people building or using an extensible coding agent. It also provides packages for agent runtimes, multi-provider LLM access, terminal interfaces, and service composition.
What license does pi use?
pi uses the MIT license.
The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.
About this page
Get a page like this for your own codebase
Repowise built this map of earendil-works/pi from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Maintain earendil-works/pi?
Claim this page, add a badge to the README, or re-index it.
Claim this page
Sign in with GitHub and we check that you are an admin or maintainer of earendil-works/pi. Then add a badge to the README that links readers here.
Add a badge to your README
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Repowise badge
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/earendil-works/pi?src=badge_wiki)Code health badge
The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/earendil-works/pi?src=badge_health)Code health card
A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/earendil-works/pi?src=badge_card)