OpenAB supports the Pi coding agent via the pi-acp adapter — a Node.js bridge that translates ACP JSON-RPC into Pi CLI invocations.
Pi is a native coding agent that supports subscription-based authentication (like Codex, Cloud Code, and GitHub Copilot). Key advantages:
Pi natively supports Anthropic (Claude Pro/Max) and ChatGPT Plus/Pro subscriptions via OAuth. Unlike agents that require an openab-auth-proxy sidecar for subscription forwarding, Pi handles subscription auth directly — reducing deployment complexity and eliminating a moving part.
| Agent | Subscription Auth | Auth Proxy Needed? |
|---|---|---|
| Pi | Native OAuth (pi /login) |
❌ No |
| Codex | Native device flow | ❌ No |
| GitHub Copilot | Native device flow | ❌ No |
| Claude Code | Native OAuth | ❌ No |
| Kiro | Native OAuth | ❌ No |
Pi exposes only 4 core tools: read, write, edit, bash. Combined with a tiny system prompt, this drastically reduces prompt overhead and maximizes the available context window for actual project source files.
| Agent | Tool Count | System Prompt Size |
|---|---|---|
| Pi | 4 | Minimal |
| Claude Code | 10+ | Large |
| Codex | 8+ | Medium |
| Copilot | 10+ | Large |
Pi is model-agnostic and supports 15+ LLM providers. Developers can switch models mid-session without restarting the agent or changing configuration.
Supported providers include:
- Anthropic (Claude) — via subscription or API key
- OpenAI (GPT/Codex) — via subscription or API key
- Google (Gemini) — via API key
- Any OpenAI-compatible endpoint
Pi saves session history as trees, enabling clean branching of code exploration. This allows developers to explore multiple approaches from a single decision point without losing context.
[agent]
# command = "pi-acp" # optional — defaults from OPENAB_AGENT_COMMAND
# working_dir = "/home/node" # optional — defaults to $HOMEdocker build -f Dockerfile.pi -t openab-pi:latest .agents:
pi:
discord:
enabled: true
allowedChannels:
- "YOUR_CHANNEL_ID"
command: pi-acp
workingDir: /home/node
image: "ghcr.io/openabdev/openab-pi:latest"kubectl exec -it deployment/openab-pi -- pi
# Once inside the interactive interface, type /login to authenticateSupported authentication methods:
| Provider | Auth Method | Subscription |
|---|---|---|
| Anthropic (Claude Pro/Max) | OAuth via pi /login |
Claude subscription |
| ChatGPT Plus/Pro | OAuth via pi /login |
ChatGPT subscription |
| Any API key provider | env = { OPENAI_API_KEY = "..." } |
Pay-per-token |
OpenAB can pass inbound image attachments to Pi as ACP image content blocks, but Pi must also select a model declared as image-capable. For custom OpenAI-compatible providers, add input: ["text", "image"] to the model entry in ~/.pi/agent/models.json.
See Local OpenAI-Compatible Vision Models for the llama-server setup, models.json example, and local vision pitfalls.
Pi reads steering files in this order:
.pi/SYSTEM.md— replaces the default system prompt entirely.pi/APPEND_SYSTEM.md— appends to the default system promptAGENTS.md— loaded hierarchically (project root → global) for context injection
Place your steering instructions in /home/node/AGENTS.md or /home/node/.pi/APPEND_SYSTEM.md.
| Path | Contents |
|---|---|
/home/node/.pi/ |
Pi configuration and auth tokens |
/home/node/.pi/sessions/ |
Session history trees |
- No streaming:
pi-acpreturns the full response at once; streamed output is sent as a singleagent_message_chunknotification. - Cancel is best-effort: Pi CLI runs to completion;
session/cancelmay not interrupt mid-generation.