Edgee CLI setup (recommended)
The fastest way to connect Pi to Edgee is the CLI. It authenticates, registers an Edgee provider in your Pi config (populated from the live Edgee model catalog), and starts Pi.Pi 0.79.4 or newer is required. Earlier versions read the credential differently and the gateway answers
401.1
Install the Edgee CLI
- macOS / Linux
- Homebrew (macOS)
- Windows (PowerShell)
2
Launch Pi through Edgee
Choose how you want to launch. Both options route requests through Edgee.If you are not signed in, Edgee starts sign-in automatically at launch. Follow the prompts and select your organization when asked.Token compression is enabled automatically. Pick an Edgee model from Pi’s model picker, or pass one directly:
- With aliases (recommended)
- Without aliases
With aliases installed in the previous step, use your usual command:The alias runs
edgee launch for you, so requests go through Edgee.edgee provider to ~/.pi/agent/models.json (or your PI_CODING_AGENT_DIR, if set). It is additive: every other provider, model, and login you already had keeps working. Each model carries its context window and per-million-token rates from the Edgee catalog, so Pi’s context gauge and session cost readout work instead of reporting every session as EDGEE_API_KEY` reference and supplied at launch, never written to disk.
Manual setup (advanced)
Get your coding-agent key
Manual setup uses the key of your enrolled Pi agent, not a standard API key created for LLM Router applications.- Open the Edgee Console and select your organization.
- In the header, click Set up coding agent or +, select Pi, and click Enroll. If your agent is already enrolled, use its existing icon.
- Click the agent’s icon, then Advanced settings → Advanced.
- Under Edgee API key (for manual setup), click Reveal key, then the copy icon.
<YOUR_CODING_AGENT_KEY>.
Configure Pi
Prefer to configure Pi yourself? Add the provider to~/.pi/agent/models.json and declare the models you want:
pi:
baseUrl carries no /v1 suffix: with api: "anthropic-messages", Pi appends /v1/messages itself. A custom provider in Pi is defined by its models, so the models list cannot be empty. edgee launch pi writes all of this for you from the live catalog.Next Steps
- Learn more about the Edgee CLI and its launch commands
- Set up observability to monitor usage and costs
- Explore retry and fallback for resilient routing