A New Paradigm for Coding Agents

The Harness Not the Horse

An Agentic AI Harness is a minimal, extensible runtime that gives an LLM tools to read, write, edit, and execute code — then gets out of the way. You shape the workflow. It powers the work.

pi — interactive mode
$ pi --model claude-sonnet-4 "Refactor auth module"
→ Reading src/auth.ts
→ Analyzing 3 dependent files
→ Editing src/auth.ts, src/middleware.ts, src/types.ts
→ Running tests: 14 passed, 0 failed
$
Extensions
Skills
Session Branching
Pi Packages
Context Files
Custom Tools
Themes
Prompt Templates
Extensions
Skills
Session Branching
Pi Packages
Context Files
Custom Tools
Themes
Prompt Templates
What Is It

A Lightweight Chassis
for Your Codebase

Connects a Large Language Model to your codebase with a standardized set of tools. Extend, customize, or restrict every aspect of its behavior — without forking the core.

🔧
Tools, Not Opinions

Gives the model read, write, edit, and bash primitives. Sub-agents, plan mode, permission gates — extensions you choose to add.

🧩
Composable by Design

Skills, Extensions, Themes, Prompt Templates. All hot-reloadable. Drop them in, take them out.

🌳
Session Branching

Every interaction is a node in a tree. Branch, fork, clone, or compact without losing history. Like Git for conversations.

📦
Shareable Packages

Bundle extensions, skills, prompts, and themes into Pi Packages. Share via npm or Git in minutes.

🔐
Context Files

Drop an AGENTS.md in your project. Auto-loaded as context with project-specific instructions and conventions.

Architecture at a Glance
You & Your Project AGENTS.md, .pi/
Extensions & Skills Prompts, Themes, Packages
Harness Core LLM, tools, sessions
Built-in Tools read, write, edit, bash
Filesystem & APIs Your Codebase
Core Concepts

Five Building Blocks

Adaptable primitives that compose into any workflow without baking opinions into the core.

01
Extensions
Supercharge the Runtime

TypeScript modules that hook into lifecycle events, register custom tools the LLM can call, add slash commands like /deploy, create permission gates, or replace the editor UI entirely. Loaded from ~/.pi/agent/extensions/ or project-local .pi/extensions/.

// ~/.pi/agent/extensions/guardian.ts export default function guardian(pi) { pi.on("tool_call", async (event, ctx) => { if (event.input.command?.includes("rm -rf")) { const ok = await ctx.ui.confirm("Allow rm -rf?"); if (!ok) return { block: true, reason: "Blocked" }; } }); }
02
Skills
On-Demand Expertise

Self-contained capability packages following the Agent Skills standard. A Markdown file with frontmatter and step-by-step instructions. Loaded on demand when a task matches — descriptions stay small in context; full instructions load only when needed.

# ~/.pi/agent/skills/audit/SKILL.md --- name: security-audit description: Audit code for SQL injection and XSS --- ## Steps 1. Search for all raw SQL queries 2. Check for parameterized inputs 3. Review all user-facing output for escaping 4. Generate a markdown report
03
Prompt Templates
Reusable Prompts

Markdown files that act as reusable prompt snippets. Type /review in the editor and it expands to a full prompt with variables filled in. Great for code reviews, test generation, documentation, or any repeated workflow.

04
Themes
Make It Yours

JSON files defining every color token in the TUI. Modify the active theme file and see changes instantly — no restart. Custom themes live in ~/.pi/agent/themes/.

05
Sessions
Persistent, Branchable History

Every conversation stored as JSONL with a tree structure. Each entry has an id and parentId. Use /tree to jump to any point, /fork to spin off a new session, or /compact to summarize when context windows fill up.

Philosophy

Instead of shipping every possible feature and forcing a one-size-fits-all experience, the harness says: "Here's the engine. You build the car."

✕  Not Baked In
MCP Servers

Build CLI tools with READMEs (Skills) or write an Extension that adds MCP support. The core doesn't need to know about MCP.

Sub-Agents

Spawn instances via tmux, build your own orchestration with Extensions, or install a package. Many valid approaches exist.

Permission Popups

Run in a container for sandboxing, or build inline confirmations with an Extension that matches your security model.

Plan Mode & To-Dos

Write plans to files, build plan-mode with Extensions, or use a TODO.md. Built-in to-do lists confuse models more than they help.

✓  Always Available
Custom Tools

Register any tool the LLM can call via Extensions. From deploying to production to querying a database — if you can code it, the model can use it.

Context Files

AGENTS.md and CLAUDE.md auto-load from your project and parent directories, giving the model persistent context without polluting every prompt.

Minimal Core

The core handles LLM communication, tool dispatch, and session persistence — nothing more. Every feature you use is either removable or added by you.

Extension System

Total control over the surface area. Add what you need, remove what you don't. The harness adapts to your workflow.

How It Works

A Simple Loop

You speak, the model thinks, tools run, results return — repeat.

01
You Send a Message

Type in the editor, paste images, reference files with @filename, or run bash inline with !command. The harness packages your input with system prompts, context files, and available skill descriptions.

02
The Model Decides

The LLM receives the full context and decides whether to respond directly or call tools. It sees schemas for every available tool — built-in, extension-provided, and custom.

03
Tools Execute

The harness dispatches tool calls in parallel where safe. Each tool runs with full filesystem and shell access — unless gated by an Extension. Results stream back in real time.

04
The Loop Closes

The model receives tool outputs and can issue follow-up calls or deliver its final response. Queue steering messages mid-flight or follow-ups for after current work completes.

Get Started

Install in
30 Seconds

The fastest way to experience an Agentic AI Harness. Install pi, set your API key, start coding.

Then add an AGENTS.md to your project, write your first Extension, or install a package from the community.

bash
$ npm install -g @mariozechner/pi-coding-agent
$ export ANTHROPIC_API_KEY=sk-ant-...
$ pi
# Interactive mode starts. Just talk to it.
$ pi -p "Refactor auth.ts to use JWT"
# Or run headless
$