Skip to main content
9 – 17 UHR +49 8031 3508270 LUITPOLDSTR. 9, 83022 ROSENHEIM
DE / EN
Coding agent Earendil Inc. Terminal (TUI)

Pi

Pi is the open-source, minimalist coding agent harness from Earendil Inc. for the terminal – extensible via TypeScript, with access to over 15 model providers.

Licence MIT
First release November 2025
Interfaces Terminal (TUI)
Platforms macOS, Linux, Windows
Instruction file AGENTS.md

The seven building blocks in Pi

How Pi implements the building blocks of an AI harness

  1. 1

    Agent loop

    The agent loop calls the model, evaluates its tool calls and executes them in a defined order; extensions can hook into events such as agent_start, tool_call or agent_end to add their own behaviour.

  2. 2

    Tools and execution environment

    Pi deliberately ships with only a few built-in tools; according to the documentation, additional functionality – such as MCP, sub-agents or background processes – is added through TypeScript extensions or external tools like tmux.

  3. 3

    Context management

    Prompt, history and tool results are managed through the AGENTS.md and SYSTEM.md files, through compaction, and through skills; extensions can inject messages before each turn or filter the message history.

  4. 4

    State and memory

    Sessions are stored as a tree structure in JSONL format; every entry has an id and a parentId, so earlier points can be revisited and continued from via the /tree command.

  5. 5

    Permissions

    According to the README, Pi ships with no built-in permission system and runs with the rights of the launching user and process; for stricter boundaries the project documents containerisation patterns such as the Gondolin extension, Docker or OpenShell.

  6. 6

    Verification and feedback

    Results appear directly in the terminal; a structured verification layer such as automated tests or a second reviewing agent is not part of the lean core and would need to be added through extensions.

  7. 7

    Orchestration

    According to the documentation, sub-agents are deliberately not built in; parallel work is organised via tmux or custom extensions, while individual sessions can be branched via the /fork and /clone commands.

Models and model access

Which models the harness uses and how they are obtained

Models and model access
Models Model-agnostic – freely selectable via /model and favourites (Ctrl+P)
Access routes Anthropic, OpenAI, Google, Azure, Amazon Bedrock, Mistral, Groq, OpenRouter, Ollama, custom OpenAI-compatible endpoints
Free choice of model Yes
Custom endpoint / LLM gateway Yes
According to the documentation, a custom OpenAI-compatible provider can be declared in the ~/.pi/agent/models.json file (baseUrl, api: openai-completions, apiKey) or registered programmatically through an extension that calls pi.registerProvider.
Features
Hooks Skills Plugins / extensions Headless / CI SDK Resume sessions
Running it with herdr
Supported by herdr Yes
State detection Lifecycle hooks when installed, otherwise screen manifest
Integration State and session
herdr also recognises Pi sessions via their tree structure once the lifecycle integration is installed.
More about herdr →

Enterprise use

Data processing, controls and pricing model according to the vendor

Local execution, no dedicated cloud backend

According to the documentation, Pi runs entirely in the local terminal and connects directly to the chosen model provider – there is no additional SaaS layer operated by the project itself.

Authentication per provider

Credentials are set via /login for subscription-based providers or via API keys in environment variables; a central enterprise SSO for Pi itself is not documented.

Project trust as a security layer

Before running in a new directory, Pi's security documentation states that it asks for project trust before tools are allowed to access the file system.

Optional, vendor-neutral telemetry

The pi-telemetry package provides vendor-neutral telemetry contracts and a reference adapter; a mandatory phone-home to Earendil is not described in the documentation.

Pricing model

Pi itself is free and open source under the MIT licence; costs arise solely from the model providers used and their own billing.

Strengths
  • Minimal core with few built-in tools alongside full extensibility via TypeScript
  • Connects to over 15 model providers including custom OpenAI-compatible endpoints
  • Tree-structured sessions with branching via /tree, /fork and /clone
  • Four operating modes: interactive terminal, print/JSON, RPC and SDK
  • MIT-licensed, open source and operable locally without a cloud requirement
  • Documented containerisation patterns for stricter isolation needs
Limitations
  • No built-in permission system – according to the documentation, tools run with the rights of the launching process
  • No sub-agents and no plan mode in the core, only addable via extensions or external tools like tmux
  • No native MCP in the application core, only achievable through custom-written extensions

Use cases

Typical tasks for this harness

Terminal-native coding for developers who want to build their own tools and extensions
Automated pipelines via the print/JSON or RPC mode
Embedded agents inside custom Node.js applications via the SDK
Multi-provider setups with frequent model switching during development

AI harnesses are the software wrapped around a language model that makes it able to work. Pi is one such harness: an open-source, terminal-based coding agent from Earendil Inc. that, according to its own documentation, deliberately keeps a minimal core and lets everything else be added through extensions. Licensed under MIT and installable via npm or an install script, Pi connects over 15 model providers to a single terminal program. As of 20 September 2026.

What is Pi?

According to the available sources, Pi originated from the work of Austrian developer Mario Zechner (“badlogic”, creator of the libGDX framework) and is now developed under Earendil Inc., with the repository living under the earendil-works GitHub organisation. Pi is installed via npm with npm install -g --ignore-scripts @earendil-works/pi-coding-agent or via curl -fsSL https://pi.dev/install.sh | sh; running pi in a project directory starts an interactive terminal session, published under the MIT licence in the earendil-works/pi repository.

Unlike many larger coding agents, Pi has no IDE extension and no web interface – the documentation describes only a terminal UI (TUI) plus non-interactive modes for automation.

Pi as an AI harness

Pi deliberately keeps the seven building blocks of a harness lean. The agent loop calls the model, evaluates its tool requests, and can be extended with custom behaviour through an event system (pi.on) – for example on tool_call, session_start or agent_end. The documentation puts the philosophy this way: “Adapt Pi to your workflows, not the other way around.” Rather than shipping many built-in capabilities, the core provides only a few tools; everything else – extensions, skills, prompt templates and themes – is installed as a package via npm or git.

Deliberately not built in, according to the documentation: MCP support, sub-agents, permission pop-ups, a plan mode, built-in to-dos and background bash processes. Anyone who needs these capabilities builds them via extensions or falls back on external tools like tmux. Sessions, by contrast, are firmly built in and stored as a tree structure in JSONL format: every entry has an id and a parentId, so the /tree command can jump back to any earlier point and continue from there.

Models and model access

According to the documentation, Pi integrates over 15 providers, including Anthropic, OpenAI, Google, Azure, Amazon Bedrock, Mistral, Groq and OpenRouter, as well as local models via Ollama – relevant among others for model families such as Claude, GPT and Gemini. Models can be switched mid-session with the /model command, or cycled through favourites with Ctrl+P.

According to the documentation, custom OpenAI-compatible endpoints can be declared in the ~/.pi/agent/models.json file (baseUrl, api: "openai-completions", apiKey) or, for dynamic cases such as proxies with their own authentication, registered programmatically through an extension with pi.registerProvider. This means Pi can be operated over the AI Gateway by adding the gateway as an additional provider in ~/.pi/agent/models.json.

Enterprise use: data protection and governance

According to the documentation, Pi runs entirely in the local terminal and connects directly to the chosen model provider, with no additional SaaS layer from the project itself. Before first running in a new directory, its security documentation says Pi asks for project trust before tools may access the file system. A dedicated telemetry package (pi-telemetry) offers vendor-neutral contracts and a reference adapter for a team’s own observability; a mandatory report back to Earendil is not described. A central enterprise SSO for Pi itself is not documented; credentials are set per provider via /login or environment variables.

Important in practice: source code, file contents and prompts that Pi processes during a session go to whichever model provider is selected. That belongs in your organisation’s record of processing activities beforehand – regardless of how lean the harness itself is.

Orchestrating Pi with herdr

The herdr documentation lists Pi as a supported agent: if the lifecycle integration is installed, Pi reports state and session directly to herdr; if not, herdr detects the session via a screen manifest. In both cases, according to the documentation, herdr reads both state and session information – useful when several Pi sessions run in parallel inside a terminal multiplexer.

Where it fits: developer harness and enterprise harness

Pi is a harness for a very specific environment: a terminal, a repository, a developer willing to rebuild missing capabilities as an extension. For business users outside development, that role is taken by CompanyGPT – the harness with tools for line-of-business systems, enterprise knowledge and role-based permissions. The AI Gateway forms the shared cost and governance layer for all model access, whether from Pi, from CompanyGPT or from other harnesses. For an overview of further coding and orchestration harnesses, see our harness overview. We help you connect Pi or other developer harnesses cleanly to your permission model, your model routing and your governance requirements.

From developer harness to enterprise harness

Coding harnesses are tools for developers. Business users, cost control and governance need two more layers.

CompanyGPT – the harness for business users

CompanyGPT gives any language model tools via MCP servers, integrations and n8n, company knowledge via companyRAG, roles from Entra ID or Keycloak, and audit logs – operated in your Azure environment or sovereignly on STACKIT.

Discover CompanyGPT
AI Gateway – cost and governance for every agent

The AI Gateway bundles the model access of your tools and coding agents behind an OpenAI-compatible API: authentication via Entra ID, budgets and cost centres per team, user and agent, guardrails and complete logging.

View the AI Gateway

Frequently Asked Questions

What is Pi?

Pi is an open-source, terminal-based coding agent harness that, according to its own documentation, is deliberately kept minimal and adds further functionality through TypeScript extensions, skills, prompt templates and themes. The project is run by Earendil Inc., originally started by Mario Zechner.

Is Pi open source?

Yes. The source code is published under the MIT licence in the earendil-works/pi repository on GitHub, including all core packages such as the coding agent CLI, the agent runtime and the provider integration.

Which models does Pi support?

According to the documentation, Pi connects to over 15 providers, including Anthropic, OpenAI, Google, Azure, Amazon Bedrock, Mistral, Groq and OpenRouter, as well as local models via Ollama. Users can also register custom OpenAI-compatible endpoints via the ~/.pi/agent/models.json file or via an extension, and switch models mid-session with the /model command.

Does Pi have a built-in permission system?

No. According to the README, Pi ships with no dedicated rights or sandbox mechanism and runs with the rights of the launching process. For stricter boundaries the project documents containerisation patterns using the Gondolin extension, Docker or OpenShell.

Does Pi work with herdr?

Yes. The herdr documentation lists Pi as a supported agent: if the lifecycle integration is installed, Pi reports state and session directly; otherwise herdr detects the session via a screen manifest.

What is the difference between Pi and OMP (oh-my-pi)?

OMP is an independent fork of Pi that, according to its own documentation, extends the same lean core with numerous built-in features – such as LSP and debugger integration, native sub-agents and editor integration via ACP. Details are on the [OMP page](/en/ai-harness/omp/).

Introduce coding agents safely in your company

We support selection, model access in the EU, permission design and cost control.