explaingit

earendil-works/pi

Analysis updated 2026-05-18

75,380TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Pi is a toolkit for building AI agents with a unified multi-provider LLM API, an agent runtime, and a ready-to-use interactive coding agent CLI.

Mindmap

mindmap
  root((Pi))
    What it does
      Unified LLM API
      Agent runtime
      Coding agent CLI
    Tech stack
      TypeScript
      Multi-provider LLM support
      Terminal UI library
    Security
      No built-in permission system
      Docker or VM sandboxing options
    Use cases
      Build custom AI agents
      Interactive coding assistant
      Provider-agnostic LLM apps
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a custom AI agent that can call tools and switch between LLM providers without rewriting code.

USE CASE 2

Use the included coding agent CLI as an interactive terminal assistant for editing code.

USE CASE 3

Sandbox an AI agent's filesystem and network access using the documented Docker or VM patterns.

What is it built with?

TypeScriptnpmOpenAIAnthropicGoogle

How does it compare?

earendil-works/pinestjs/nestlobehub/lobehub
Stars75,38075,40476,126
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Runs with the host user's full permissions by default, sandboxing requires extra setup with Docker or a VM extension.

MIT license, meaning you can use, modify, and redistribute the code freely, including commercially, as long as you keep the copyright notice.

In plain English

Pi is a toolkit for building AI agents, and the repository ships an interactive coding agent built on top of it as its flagship example. At its core is a single API that talks to multiple AI providers, including OpenAI, Anthropic, and Google, so you can write code once and switch models without rewriting your integration. Above that sits an agent runtime that manages tool calling and keeps track of the agent's state as it works, and a terminal interface library that renders text efficiently in a command line window. Together these pieces power the coding agent CLI, which you can run in a terminal to have an AI assistant read and edit code interactively. By default, Pi runs with whatever permissions the account and process that started it already have, since it does not include its own system for restricting what it can touch on your filesystem, network, or credentials. The documentation walks through three ways to add stronger boundaries if you want them: running it inside a lightweight Linux virtual machine through an extension, running the whole thing inside a plain Docker container, or using a separate sandboxing tool that enforces policy rules. The project takes its dependency supply chain seriously. External packages are pinned to exact versions rather than ranges, lockfile changes are blocked unless explicitly allowed, and automated checks run dependency audits and verify package signatures on a schedule. The maintainers also encourage users to publish their own coding agent sessions publicly, arguing that real usage data, including failures and fixes, is more useful for improving these tools than artificial benchmark tests. The project is released under the MIT license, and development uses standard npm commands for installing, building, and testing the code across its several packages.

Copy-paste prompts

Prompt 1
Explain how Pi's unified LLM API lets me switch between OpenAI, Anthropic, and Google without changing my code.
Prompt 2
Walk me through installing and running the Pi coding agent CLI in my terminal.
Prompt 3
Show me how to containerize Pi so it can't access my full filesystem or network.
Prompt 4
Help me understand what pi-agent-core actually manages during an agent's tool-calling loop.

Frequently asked questions

What is pi?

Pi is a toolkit for building AI agents with a unified multi-provider LLM API, an agent runtime, and a ready-to-use interactive coding agent CLI.

What language is pi written in?

Mainly TypeScript. The stack also includes TypeScript, npm, OpenAI.

What license does pi use?

MIT license, meaning you can use, modify, and redistribute the code freely, including commercially, as long as you keep the copyright notice.

How hard is pi to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pi for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.