> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aixy-gateway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pi

> Connect the Pi coding agent with the Aixy provider extension.

The [Aixy extension for Pi](https://github.com/aixy-tech/pi-aixy) discovers your project's models
and sends conversations, streaming output, and function-tool calls through Aixy's Chat Completions
API. Use Pi 0.87.0 or newer from `@earendil-works/pi-coding-agent` and Node.js 22.19 or newer.

## Install and sign in

```bash theme={null}
pi install git:github.com/aixy-tech/pi-aixy
```

Restart Pi or run `/reload`. Enter `/login aixy`, supply your Aixy project key, then use `/model`
to select an Aixy model. Choose a model with function-tool support for coding tasks.

Alternatively, use an environment key:

```bash theme={null}
export AIXY_API_KEY="gak_your_project_key"
pi --list-models aixy
pi --provider aixy --model openai/gpt-4.1-mini
```

Replace the example ID with one listed for your project. Routing aliases work unchanged, for
example `pi --provider aixy --model aixy/coding` after creating that route.

## Configure a custom gateway

```bash theme={null}
export AIXY_BASE_URL="https://gateway.example.com/v1"
```

This setting changes both discovery and inference. Keep the key aligned with that gateway.
Pi's saved login takes precedence over `AIXY_API_KEY`; use `/login aixy` to replace it or
`/logout aixy` before switching to an environment credential.

## Verify and maintain

Send a short prompt and inspect the resulting project request in [Activity](/observe/activity).
Model discovery supplies IDs; configure model limits and capabilities in `~/.pi/agent/models.json`
using verified values. Pi's initial local cost defaults are not evidence of free inference.
See the extension's [model configuration instructions](https://github.com/aixy-tech/pi-aixy#model-metadata-and-offline-use).

Update the extension with:

```bash theme={null}
pi update --extension git:github.com/aixy-tech/pi-aixy
```

Restart or reload Pi afterward. Keep its credentials and model configuration outside the
repository. For shared tool accounts, configure [MCP access](/agent-tools/connect-agent) separately
in a client setup that supports remote MCP.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.