# Pi

Install the Felo Skill for Pi and optionally add Felo as a Pi model provider.

Use this guide to install the Felo Skill for Pi. Pi keeps its own model configuration; the Skill works with whichever model you already use, and you can optionally add Felo as a provider.

## Before you start

- A Felo API key: [create one](https://openapi.felo.ai/console/api-keys).
- [Node.js 22 or newer](https://nodejs.org/en/download) if you use the FeloAPI CLI.
- Pi installed.

## What this guide configures

| Item | Value |
| --- | --- |
| Model provider | unchanged (your existing Pi model) |
| Felo Skill location | `~/.pi/agent/skills` |
| Protocol for optional Felo models | OpenAI-compatible |

## Option 1: install the Felo Skill

```bash
npm install -g feloapi-cli@latest
feloapi setup --agent pi --skills-only --yes
```

This installs the Skill only; it does not modify Pi's model provider. Start a new Pi session, then ask it to use the `feloapi` Skill, for example: “Use the feloapi skill to search the web for today's AI news and summarize it.” 

## Option 2: use Felo models (manual, optional)

Pi reads providers from `~/.pi/agent/models.json`. Add Felo as an OpenAI-compatible provider:

```json
{
  "providers": {
    "feloapi": {
      "name": "Felo API",
      "baseUrl": "https://openapi.felo.ai/api/v1",
      "api": "openai-completions",
      "apiKey": "$FELO_API_KEY",
      "models": [
        { "id": "MODEL_ID", "name": "Felo model", "contextWindow": 128000, "maxTokens": 8192, "input": ["text"] }
      ]
    }
  }
}
```

Set `FELO_API_KEY` in the environment, then start Pi with `pi --provider feloapi --model MODEL_ID`. If `PI_CODING_AGENT_DIR` is set, the Skill and models file live under that directory.
## Verify

```bash
feloapi doctor --agent pi
```

The Skill is healthy when the report lists `pi` with `ok: true`.

## Switch back / remove Felo

Your current model provider is untouched, so there is nothing to switch back. To remove the Skill:

```bash
feloapi disconnect pi --yes
```

## Troubleshooting

| Issue | What to do |
| --- | --- |
| `feloapi: command not found` | Reopen the terminal and retry; install with `npm install -g feloapi-cli@latest`. |
| Skill is not used | Start a new Pi session; Skills are discovered at startup. |
| Authentication fails when the Skill calls Felo | Create a key and run `feloapi auth login` (or export `FELO_API_KEY`). |
| Felo model does not answer | Check the manual provider fields above; the base URL and key must match. |

## Related

- [FeloAPI CLI guide](https://openapi.felo.ai/tr/docs/cli.md)
- [Models and pricing](https://openapi.felo.ai/tr/docs/guides/models-and-pricing.md)
- [Other AI tools](https://openapi.felo.ai/tr/docs/agent-clients/other-tools.md)
