THE PI ECOSYSTEM, IN GO

A faithful Go
implementation
of Pi.

Tracks Pi behavior through explicit parity evidence.

Created by Michael Kinsy.Originally developed at Hewlett Packard Enterprise.
Why PiG exists

Pi deserves a
Go implementation.

Pi is one of the most thoughtfully designed coding agents available today. PiG aims to faithfully carry its behavior, architecture, and user experience into the Go ecosystem.

Pi remains the reference implementation.
PiG exists to make Pi accessible anywhere Go shines.

Read the story
PiG: the Pi experience, in Go~/your-project

PiG · a faithful Go implementation of Pi

❯ make this project feel like me

read AGENTS.md

I’ll start with your project instructions,
then build on what’s already here.

Your tools. Your models. Your workflow.

❯

The same small core. The same room to make it yours. The features below describe the upstream Pi experience that guides PiG’s compatibility work.

Our compatibility philosophy

Change the harness, not your workflow

PiG is not a sealed product. Add a command, tool, provider, workflow, or UI through an extension Resource.

Use source mode while you develop. Use a Piglet to compose the capability into an agent application.

Explore extensions
PiG: build a custom workflow~/your-project

PiG · a faithful Go implementation of Pi

❯ add a /review command for my team

write .pig/extensions/review/extension.go

Registered /review.
Checks your diff against team conventions.

/reload → ready to go

❯
Illustration: ask PiG to add a team /review command as an extension, then run /reload to load it without restarting.

15+ providers, hundreds of models

Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter, Ollama, and more. Authenticate via API keys or OAuth.

Switch models with /model. Cycle through scoped models with Ctrl+P.

Browse the model catalog
PiG: switch models mid-session~/your-project

PiG · a faithful Go implementation of Pi

❯ /model

Model changed to Claude Opus 5.5.
Same session. All your context.

❯
Illustration: a small selection of the catalog. Switch models mid-session with /model; the Session keeps its context.

Tree-structured, shareable history

Sessions are stored as trees. Use /tree to navigate to any previous point and continue from there. All branches live in a single file. Filter by message type, label entries as bookmarks.

Export to HTML with /export, or upload to a GitHub gist with /share and get a shareable URL.

Explore sessions
PiG: branch and share a session~/your-project

PiG · a faithful Go implementation of Pi

❯ /tree

Build a dashboard
Plan the implementation

Continuing from “Add provider filters”

❯
Illustration: rewind to any earlier entry with /tree, branch from there, and keep every branch in one Session file.

Context engineering

Pi’s minimal system prompt and extensibility let you do actual context engineering. Control what goes into the context window and how it’s managed.

AGENTS.md · Project instructions loaded at startup.

SYSTEM.md · Replace or append to the default system prompt.

Compaction · Customize how older messages are summarized.

Skills & prompts · Load capabilities on demand, with reusable Markdown templates.

Control your context
PiG: load skills and instructions~/your-project

PiG · a faithful Go implementation of Pi

❯ help me work on this project

AGENTS.mdProject instructions
SYSTEM.mdYour system prompt
SKILL.mdOn-demand capabilities

The right context, when you need it.

❯
Illustration: AGENTS.md, SYSTEM.md, and skills load on demand, so the system prompt stays small.

Steer or follow up

Submit messages while the agent works. Enter sends a steering message, delivered after the current tool and interrupting remaining tools.

Alt+Enter sends a follow-up that waits until the agent finishes.

PiG: steer a running agent~/your-project

PiG · a faithful Go implementation of Pi

❯ refactor the authentication module

edit src/auth.ts
↳ steering message

Keep the existing public API.

I’ll preserve the public interface
while updating the implementation.

❯
Illustration: press Enter to steer the current run, or Alt+Enter to queue a follow-up for when it finishes.

Four modes. Your way in.

Interactive · The full terminal UI experience.

Print / JSON · One-shot queries for scripts and structured event streams.

RPC · A JSON protocol over stdin/stdout for process-based integrations.

SDK · Embed PiG in Go applications.

Build with the SDK
PiG command and Go SDK examples
Illustration: the same agent runs interactively, in print or JSON mode for scripts, over RPC, or embedded through the Go SDK.

Primitives,
not product branches.

Extensions are ordinary Go, Rust, Python, or Node Resources. Piglets compose them into named agent applications.

Build tools, commands, providers, policy gates, MCP adapters, custom UI, and derivative harnesses without adding product behavior to Stock PiG.

Browse packages
$pig extension init ./review --lang go
$pig --piglet ./agents/reviewer.yaml

...and upstream
can play Doom.

Explore the Doom extension
Doom running as a terminal agent extension
FIG. 01 / UPSTREAM PI · DOOM EXTENSION

What stays out of the core

Stock PiG provides generic extension and Piglet contracts instead of dictating each product workflow. Put application behavior in Resources and select it through a Piglet.

Improve PiG.

Start with observed upstream Pi behavior. Report a reproducible difference, preserve attribution, and support compatibility claims with parity evidence.

One ecosystem.
More places to run.

Pi came first. PiG carries its ideas, architecture, and experience into Go. Pi remains the reference implementation.

Where practical, PiG follows upstream behavior and minimizes divergence.

Explore upstream Pi

Where PiG began.

Michael Kinsy created PiG. The project was originally developed at Hewlett Packard Enterprise.

PiG is maintained independently from upstream Pi. Pi remains the reference implementation.

Built on the work of Pi.

PiG would not exist without the work of the Pi maintainers and contributors.

Their vision, architecture, and commitment to open source created the foundation that PiG builds upon.

Thank you.