Skip to main content
π

Pi

Open-source terminal coding agent with a first-class AntSeed extension.

Coding agentsOpenAI Responses~3 min

What Pi is. Pi (@mariozechner/pi-coding-agent) is a minimal, hackable terminal coding agent by Mario Zechner — the same lineage as pi-mono. It ships with four default tools (read, write, edit, bash) and lets you extend everything else — commands, providers, themes, even the editor UI — through TypeScript extensions, skills, and prompt templates. No fork required.

What the AntSeed extension does. pi-antseed is a Pi extension that registers the local buyer proxy as a Pi provider named antseed. Once installed, every service your pinned peer advertises shows up under antseed/<id> in Pi's model picker (Ctrl+L or /model) — you switch with /model antseed/minimax-m2.7 just like any built-in.

Why an extension instead of env vars. Pi already speaks dozens of provider protocols natively. The extension calls pi.registerProvider("antseed", { api: "openai-responses", authHeader: true, baseUrl: "http://localhost:8377/v1" }) — Pi then handles auth headers, streaming, retries, and tool-calling. The Responses API path preserves reasoning items across turns for reasoning-capable models, while the extension still auto-refreshes the model list from GET /v1/models so the menu reflects what your pinned peer can serve.

Run AntSeed first

Every integration assumes a buyer proxy at http://localhost:8377. One-time setup, ~2 minutes.

Step 1

Install Pi

  • Install Pi itself (the coding agent CLI)
    npm install -g @mariozechner/pi-coding-agent

    Pi requires Node.js 20+. The binary is `pi`. Verify with `pi --version`. Without any extensions, Pi can already talk to Claude / GPT / Gemini / Groq / etc. via API key or OAuth — the AntSeed extension below is what teaches it to route through your local buyer proxy.

  • Install the AntSeed extension into Pi
    pi install git:github.com/AntSeed/pi-antseed

    Pi extensions install from a git URL or a local path. Alternatives: `pi -e git:github.com/AntSeed/pi-antseed` runs the extension once without installing, useful for trying it out. `pi install ./pi-antseed` works from a local clone.

  • Reload Pi so the new provider is picked up
    /reload

    Run this inside the Pi REPL (after typing `pi` to launch it). It re-scans extensions, skills, prompt templates, keybindings, and context files. A full restart works too.

Step 2

Point Pi at AntSeed

ANTSEED_BASE_URLhttp://localhost:8377/v1
Show as shell exports
export ANTSEED_BASE_URL="http://localhost:8377/v1"
No GUI config needed in the common case — the extension reads `ANTSEED_BASE_URL` (default `http://localhost:8377/v1`) and discovers models from the pinned peer automatically. Only set `ANTSEED_API_KEY` if you front the buyer proxy with your own auth layer, or `ANTSEED_MODELS="id1,id2"` to skip discovery and register a fixed list.

Step 3

Pick a model

minimax-m2.7claude-sonnet-4-6deepseek-v4-flashqwen3-coder-480b

The extension auto-discovers from `GET /v1/models` after Pi loads, so anything your pinned peer advertises shows up under `antseed/...`. After re-pinning a different peer, run `/reload` in Pi to refresh the model list.

The exact list of models depends on which peer you pin. Run antseed network browse or open the live network page to see what's available right now.

Verify

Test it

  • Launch Pi
    pi

    You'll see Pi's startup header, which lists loaded extensions. Look for `antseed` (or `pi-antseed`) in that list — if it's there, the extension loaded successfully.

  • Open the model picker and pick an AntSeed-routed model
    /model

    Or press Ctrl+L. The picker is fuzzy-searchable; type "antseed" to filter. You should see entries like `antseed/claude-sonnet-4-6`, `antseed/deepseek-v4-flash`, etc. — one for each service your pinned peer advertises.

  • Or switch directly via slash command
    /model antseed/minimax-m2.7

    Replace `minimax-m2.7` with any id from `curl http://localhost:8377/v1/models`. After this, every prompt routes through AntSeed → your pinned peer → the model.

How Pi talks to AntSeed

  • Wire format sent by Pi: OpenAI Responses (hits /v1/responses on the buyer proxy)
  • Best-fit services: any service whose protocols array contains openai-responses. That's what the peer advertises as natively-supported — zero translation overhead, no transform edge cases.
  • How to check a peer: run antseed network peer <peerId> --json and look at matchingServices[].protocols for each model. The browse command shows the same data per peer in providerServiceApiProtocols.
  • What happens when protocols don't match: AntSeed's @antseed/api-adapter translates between OpenAI Responses and the service's native protocol on the fly. So a request from Pi can still reach a service that only advertises anthropic-messages — just with a small transform step.

If it goes wrong

Troubleshooting

  • `pi: command not found` after installYour global npm bin is not on `PATH`. Run `npm prefix -g` to find it, then add `<that-path>/bin` to `PATH` in your shell rc. Or use a Node version manager (nvm, fnm, volta) which handles this automatically.
  • `antseed` doesn't appear in the model picker (`/model` or Ctrl+L)The extension didn't load. Re-run `pi install git:github.com/AntSeed/pi-antseed`, restart Pi, and watch the startup header — it lists every loaded extension and surfaces load errors there.
  • Picker only shows a few hard-coded `antseed/...` ids, not what my peer offersPi started before the buyer proxy was up, so the extension fell back to its built-in seed list. Make sure `antseed buyer start` is running and a peer is pinned, then run `/reload` inside Pi to refresh the model list.
  • Empty `/v1/models` from the proxyNo peer is connected. Run `antseed network browse` to see options, then `antseed buyer connection set --peer <peerId>`. Or launch the proxy with `antseed buyer start --router <name>` for automatic peer selection.
  • 5xx from the proxy mid-conversationUsually means the pinned peer doesn't offer the model you asked for, or has just gone offline. Re-pin via `antseed buyer connection set --peer <peerId>` and `/reload` in Pi.
  • Want to use a custom buyer proxy URL (remote host, custom port)Set `ANTSEED_BASE_URL=http://your-host:8377/v1` in the shell that launches `pi`. The extension reads this on startup. If your proxy is fronted by auth, also set `ANTSEED_API_KEY=<token>`.

Reference

Links

Same category

Related