Skip to content

Pi Provider

The Pi provider runs Pi in-process through its TypeScript SDK. Unlike Codex and Copilot, which shell out to external CLIs, the Pi adapter calls the SDK directly.

  1. Install Pi independently:
Terminal window
npm install -g @mariozechner/pi-coding-agent
pi /login # authenticate with your provider
pi /model # pick a default model
  1. Node.js 22.5+ (same as the Sidemesh daemon).
Terminal window
npm install -g sidemesh @mariozechner/pi-coding-agent
sidemesh setup # select Pi from the provider list
sidemesh up

Add to ~/.sidemesh/config.json:

{
"providers": [
{
"kind": "pi",
"agentDir": "~/.pi/agent",
"stateDir": null
}
],
"defaultProviderKind": "pi"
}
Field Description
agentDir Pi config directory. Default: ~/.pi/agent
stateDir Sidemesh Pi sidecar state. Default: ~/.sidemesh/pi-provider
Feature Status Notes
Text input Full support
Local images Base64-encoded
Image URLs Ignored with warning
Skills Inlined from Pi skill dirs
Model switching Auth-filtered model list
Thinking level Override when supported
Compaction Native Pi compaction
Session archive Sidecar tracked
Interrupt Calls Pi abort()
Filesystem Host Daemon-owned
Approvals Pi does not expose gating
Terminal Host Daemon-owned
Variable Purpose
SIDEMESH_PI_AGENT_DIR Override Pi agent directory
SIDEMESH_PI_STATE_DIR Override Sidemesh sidecar directory

Unknown Pi session after restart The sidecar index is stale. Restarting triggers a fresh scan of ~/.pi/agent/sessions/.

No API key for anthropic/claude- The model is visible but unauthenticated. Run pi /login for that provider.

Image URLs silently ignored Pi only accepts local files. Sidemesh emits a stderr warning and substitutes an explanatory prompt.

Slow session list First scan walks all .jsonl files. Subsequent calls use a stat-based fingerprint cache.