Pi
Pi is a minimalist open-source terminal agent (TUI) by Earendil. Instead of built-in sub-agents and plan modes it offers extensibility: skills, TypeScript extensions, custom prompt templates. It connects to Mixen as an OpenAI-compatible provider via models.json.
Installation
Section titled “Installation”curl -fsSL https://pi.dev/install.sh | shor via a package manager:
npm install -g --ignore-scripts @earendil-works/pi-coding-agentConfiguration
Section titled “Configuration”Create ~/.pi/agent/models.json (Windows: %USERPROFILE%\.pi\agent\models.json) — this is Pi’s agent directory, where auth.json and settings.json live too:
{ "providers": { "mixen": { "baseUrl": "https://api.mixen.ai/v1", "api": "openai-completions", "apiKey": "$MIXEN_API_KEY", "models": [ { "id": "openai/gpt-6.1-sol" }, { "id": "google/gemini-3.8-flash" }, { "id": "z-ai/glm-5.3" } ] } }}Key points:
api: "openai-completions"— the wire protocol style; Mixen is OpenAI Chat Completions compatible.apiKeysupports environment interpolation ($MIXEN_API_KEY,${MIXEN_API_KEY}), a literal value, or a command with a leading!. Commands run at request time and are not cached.- The
modelslist — which ids from the catalog to expose in Pi; add your own.
The environment variable with an mxn-… key from the dashboard:
export MIXEN_API_KEY="mxn-your-key" # add to ~/.bashrc or ~/.zshrc to persistRunning and picking a model
Section titled “Running and picking a model”pi/model— search and select a model; it also re-readsmodels.jsonafter edits.Ctrl+Son a model — make it the default for new sessions.Ctrl+P— cycle through favorite models.pi -p "query"— print mode for a single command, handy in scripts.
Until Pi can resolve the key, models from models.json stay hidden in /model — make sure the variable is set in the current terminal session.
Agent behaviour
Section titled “Agent behaviour”AGENTS.mdin the project root — instructions for that repository.~/.pi/agent/SYSTEM.md— fully replaces the system prompt;APPEND_SYSTEM.md— appends to it.- Skills — your own CLI tools with a README in
~/.pi/agent/skills/; there is no built-in MCP — tools come from skills or extensions.
Recommended models
Section titled “Recommended models”| Model | ID |
|---|---|
| GPT-6.1 Sol | openai/gpt-6.1-sol |
| Claude Sonnet 5.5 | anthropic/claude-sonnet-5.5 |
| GLM 5.3 | z-ai/glm-5.3 |
| DeepSeek V4 Pro | deepseek/deepseek-v4-pro |
| Kimi K3 | moonshotai/kimi-k3 |
The up-to-date list is in the catalog.
Troubleshooting
Section titled “Troubleshooting”- Mixen models missing from
/model— Pi could not read the key:MIXEN_API_KEYis unset in this session; set it and reopen/model. models.jsonedits not picked up —/modelre-reads the file; there is no separate reload command.- 401 from the API — the key is revoked or mistyped; check it with
curl https://api.mixen.ai/v1/models -H "Authorization: Bearer $MIXEN_API_KEY".