Pi
Operating the Pi coding agent on workers — provider keys or login, JSON mode, and add-on models through a models.json of its own.
Install
npm install -g @mariozechner/pi-coding-agentThe worker looks for pi on the worker user's PATH.
Sign-in
Pi uses provider keys from the environment or its own login (/login). Configure it once as the worker's user,
or let the worker give it a provider. With none a run ends with "No API key found for the selected model".
How it runs
pi -p --mode json [--provider <provider>] [--model <model>] <prompt>
- Pi has no permission prompts, so nothing can block a headless run.
- Its
message_endevents report tokens and cost, which the worker records for the task.
Add-on models
For gateway sessions the worker writes a models.json into an agent folder of its own for the run
(PI_CODING_AGENT_DIR) with an OpenAI-compatible provider. The file names the variable that holds the key, not
the key. Settings from your own Pi folder are not loaded in those sessions. A complete task was run this way
against a test model. Pi ignores ANTHROPIC_BASE_URL and OPENAI_BASE_URL, so a provider with its own base URL
gets the same kind of folder with an override for that provider.
Sessions
Resume is not claimed for Pi: no resume command could be verified without an account. After a crash, recovery starts a fresh session from the checkpoint.
What was verified
Checked against Pi 0.73.1 on 2026-10-06: its --help, and a real run without credentials through the worker's
session runtime. It also completed a task through the model gateway against a test model.