// the find
earendil-works/pi
AI agent toolkit: unified LLM API, agent loop, TUI, coding agent CLI
A TypeScript monorepo for building AI coding agents: a unified multi-provider LLM API, an agent runtime with tool calling and session/durability handling, a terminal UI library, and `pi`, an interactive coding agent CLI built on top of all of it. It's for developers who want to build their own agent harness or just run a capable open coding agent from the terminal.
The supply-chain hardening is well beyond what most npm projects bother with: exact-pinned direct deps, a 2-day `min-release-age` to dodge same-day malicious publishes, a pre-commit hook that blocks accidental lockfile edits, a generated shrinkwrap for the published CLI, and scheduled `npm audit`/`audit signatures` CI runs. The package split (ai, agent-core, tui, durable, telemetry, chord) means you can pull just the unified LLM client or just the agent runtime without dragging in the CLI. Release builds are reproducible offline from a signed source tarball with pinned model data, which is unusual rigor for a fast-moving agent project.
There's no built-in permission system — by default the agent executes bash, file, and network operations with the full privileges of whatever launched it, and real isolation requires you to bolt on one of three separate sandboxing setups (a micro-VM extension, Docker, or a third-party sandbox) yourself. The directory tree carries visible scar tissue from at least three harness rewrites (`pico`, `pico2`, `pico3`, plus a `mobile-handoff` doc tree), so contributors have to figure out which runtime path is actually current versus legacy documentation. New-contributor issues and PRs are auto-closed by default, which is a real friction point if you're trying to land a small fix rather than just consume the package. Adopting the runtime pieces (not just the CLI) means understanding a fairly deep internal model — schedulers, membranes, drive reconciliation — that isn't summarized anywhere outside the source.