repowiseearendil-works/pi

earendil-works / pi

AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI

TypeScript★ 112,850

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

6.9out of 10Fair

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. 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. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 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.

Docs
bash
https://api.repowise.dev/mcp/earendil-works/pi
Editors need an API key: sign in to create one.Sign in to connect

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

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

  1. Install dependencies without running lifecycle scripts.
    npm install --ignore-scripts # Install all dependencies without running lifecycle scripts
  2. Build all packages after refreshing model data.
    npm run build # Refresh model data, then build all packages
  3. Run linting, formatting, and type checks.
    npm run check # Lint, format, and type check
  4. 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.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.