ProvidersPi

Pi

Install, authenticate, verify, and run the Pi coding agent through Tejus on Windows.

Tejus integrates the Pi coding-agent runtime and its model registry. Pi owns provider credentials, models, extensions, skills, commands, and session behavior; Tejus supplies the durable task, working environment, transcript, review surfaces, and Git lifecycle around it.

Tejus runs its own bundled copy of the Pi SDK for tasks; it does not launch the pi CLI to run them. The standalone pi --version reports the CLI version, which can differ from the SDK in Tejus, and extensions must be compatible with the SDK version shipped with Tejus. The CLI is still useful for signing in and for checking your setup.

Install

Install the Pi CLI from its official npm package in PowerShell:

npm install -g @earendil-works/pi-coding-agent

Verify the executable from a new PowerShell window:

pi --version

If pi is not on PATH, Tejus still shows Pi as available but warns: “Pi SDK is bundled, but the Pi CLI (pi) is not on PATH, so Tejus could not verify the installed CLI version.”

Authenticate

In Tejus, open Settings → Agent providers, expand Pi under Provider tools, and click Sign in. Tejus starts pi in a terminal window; complete any startup prompts, then click Sign-in options (which sends /login) to choose a model provider and authenticate. You can also start Pi in a normal terminal:

pi

and type:

/login

Pi can also use model-provider API keys from environment variables or its credential store. For example, set ANTHROPIC_API_KEY as a Windows user environment variable and restart Tejus, or add it to Pi's Environment section under Provider tools with the secret switch on.

Do not commit credentials or paste them into Tejus tasks. Pi stores its user state, including auth.json and models.json, in its agent directory: %USERPROFILE%\.pi\agent by default.

Verify

From a disposable repository:

pi --version
pi

Confirm that /login or the configured API-key provider makes at least one model available. Use /model to inspect the catalog, then ask Pi to summarize the repository without making changes.

This verifies the package, provider credentials, model registry, and working directory before Tejus is involved.

Connect to Tejus

Enable Pi

Open Settings → Agent providers, keep Pi enabled under Provider activity, and click Refresh status. Pi's sign-in state is not reported, so a ready status means the CLI was found.

Confirm provider credentials

Use Pi's own /login, environment variables, or its auth.json. Tejus reads the resulting model availability rather than duplicating the secret.

To use a different Pi profile, set Pi agent directory in Pi's Runtime section under Provider tools (auth, models, skills, and commands are read from there), or set PI_CODING_AGENT_DIR in Pi's Environment section.

Check models and thinking levels

Confirm that the model picker shows the expected provider and model combinations and the thinking levels the selected model supports (off, minimal, low, medium, high, xhigh, and max, depending on the model).

Run a bounded task

Start with Pi's built-in tools and a clean test repository before adding project extensions, skills, or packages that can execute code.

Capabilities in Tejus

Pi sessions can expose:

  • Pi's available provider and model registry
  • Thinking levels supported by the selected model
  • Built-in read, write, edit, and shell tooling
  • Commands, skills, attachments, and project instructions
  • Session history and continuation
  • Tool output, task progress, usage, and context information
  • Context compaction
  • Native steering of a running turn
  • Tejus's terminal, browser, diff, checkpoint, worktree, and Git delivery surfaces

Pi does not have a Plan mode in Tejus, and it does not send approval requests: tools run with Pi's own rules.

A normal message sent during an active Pi turn is queued as a follow-up instead of failing. Explicit steering is a separate request to fold a correction into the active turn; the runtime decides when it can act on it.

Pi's automatic retries appear as inline warnings (for example “Pi retrying after provider error…”) while the task stays active. Stop generation also stops the retry wait and clears queued follow-ups.

Pi extensions and packages run with the permissions of your Windows user account. Review third-party code before enabling it in a repository Tejus will operate.

Model catalog refresh

When Pi has OpenRouter credentials, Tejus refreshes the OpenRouter catalog so you see the models Pi can run. OpenCode Zen entries are refreshed with their protocol and capability metadata. For Anthropic, Tejus keeps Claude Fable 5.1, Fable 5, and Opus 4.8 selectable even when Pi's upstream catalog predates them. Availability still depends on the configured provider and account.

A discovery failure stays visible rather than being treated as proof that an older static list is current.

Updating

Update Pi and its unpinned packages from Pi itself:

pi update

Settings → Agent providers can run pi update for you. You can also update the global npm package with npm. Updating the CLI does not change the Pi SDK bundled with Tejus; that updates with Tejus itself. Restart Tejus after changing the runtime.

Troubleshooting

Pi is not detected

  1. Run pi --version from a new PowerShell window.
  2. Confirm the npm global folder (%APPDATA%\npm) is on PATH.
  3. Check the Pi binary path in Tejus.
  4. Restart Tejus after installation or PATH changes.

No models are available

Run Pi directly and use /login, or configure a supported provider API key. Confirm /model shows at least one authenticated model before refreshing Tejus.

If Anthropic sign-in works but Fable 5.1 is missing, refresh Pi in Tejus and start a new task. Tejus can repair the known Anthropic catalog entry, but it cannot grant model access that the configured account or provider rejects.

The model catalog differs between projects

Check Pi's global and project settings, credentials, custom model definitions, extensions, and the configured agent directory. Project-level resources can change the provider catalog or behavior.

A third-party Pi package behaves unexpectedly

Disable the package and reproduce with Pi's built-in runtime. Extensions run arbitrary code and can modify tools, commands, events, and provider behavior.

Official documentation

Continue with Your first task or Provider handoffs.

Last updated on