---
title: "Pi Coding Agent Setup Guide: Install, Configure Models, and Best Extensions"
description: "Step-by-step guide to installing Pi coding agent, connecting cheap models like MiniMax M2.7 and Qwen 3.6, and setting up the most useful extensions. Covers LazyPi one-command setup and the Rust port alternative."
date: 2026-05-21
categories: ["AI"]
tags: ["ai-tools","self-hosted","llm"]
---

import Button from "@components/widgets/Button.astro";
import Notice from "@components/widgets/Notice.astro";
import ListCheck from "@components/widgets/ListCheck.astro";
import Accordion from "@components/widgets/Accordion.astro";
import Tabs from "@components/widgets/Tabs.astro";
import Tab from "@components/widgets/Tab.astro";

I have been running [OpenCode](/opencode-setup-guide/) and [Hermes Agent](/hermes-agent-setup-guide/) for a while now, but Pi kept coming up in conversations. People on Reddit and Hacker News kept calling it "the minimal one that does not get in your way." After two weeks of daily use, I see why. Pi is a terminal coding agent built by Mario Zechner that stays small at the core. You install it, point it at a project, and start working. Everything else — memory, MCP support, sub-agents, themes, skills — gets added through extensions you actually choose.

That minimalism is the point. Where OpenCode ships with a TUI, plan mode, and image support out of the box, Pi gives you a clean slate and a TypeScript extension system. You build the agent you want instead of disabling the features you do not need.

Below you will find installation steps, model configuration with cheap providers, the extensions I actually use, and how to skip the research phase with LazyPi.

<Notice type="info" title="What this covers">
<ListCheck>
<ul>
<li>Installing Pi on Linux, macOS, and via npm</li>
<li>Connecting to cheap models: MiniMax M2.7, Qwen 3.6, DeepSeek V4 Pro, GLM 5.1</li>
<li>Adding custom models through models.json (Ollama, OpenRouter, any OpenAI-compatible API)</li>
<li>The 12 extensions that actually matter and what each one does</li>
<li>LazyPi: one-command setup with 60+ skills, 76 themes, and MCP support</li>
<li>pi_agent_rust: a high-performance Rust port with 823 GitHub stars</li>
</ul>
</ListCheck>
</Notice>

<YouTubeEmbed
  url="https://www.youtube.com/embed/gfw3jBeLeqs"
  label="Pi Agent Setup Guide: Top Extensions That Make It Unstoppable"
/>


If you are still deciding between coding agents, our [OpenCode setup guide](/opencode-setup-guide/) covers the open-source Claude Code alternative, and the [GitHub Copilot alternatives](/github-copilot-alternatives-2026/) article breaks down what to do after the June 1 pricing change.

## What Pi actually is

Pi is a terminal coding agent that reads your codebase, plans changes, edits files, runs shell commands, and iterates on failures. The default installation gives you four tools: read, write, edit, and bash. That is it. No plan mode, no MCP support, no memory, no sub-agents. You add those through extensions.

The extension system is TypeScript. You drop a `.ts` file into `~/.pi/agent/extensions/` and Pi loads it. Extensions can register custom tools the LLM can call, intercept tool calls before they execute (to block `rm -rf` for example), add slash commands, modify the system prompt, and build custom TUI components. You can hot-reload them with `/reload` without restarting Pi.

<Button text="Pi Documentation" link="https://pi.dev/docs/latest" variant="solid" color="blue" size="md" icon="arrow-right" />

## Installing Pi

Pi is distributed as an npm package.

```bash
npm install -g @mariozechner/pi-coding-agent
```

Then run it in a project directory:

```bash
cd /path/to/project
pi
```

Pi needs Node.js 18+. If you do not have Node, install it first:

<Tabs>
<Tab name="nvm">
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
nvm install 22
```
</Tab>
<Tab name="apt">
```bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
```
</Tab>
<Tab name="Docker">
```bash
docker run -it --rm -v $(pwd):/workspace -w /workspace node:22 \
  npx @mariozechner/pi-coding-agent
```
</Tab>
</Tabs>

### Authenticate

Pi supports two authentication approaches. Pick whichever fits.

**Subscription login** — if you have Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, or Google Gemini CLI:

```bash
pi
/login
# Select your provider
```

**API key** — for direct provider access or OpenRouter:

```bash
export ANTHROPIC_API_KEY=sk-ant-...
pi
```

Or store keys in `~/.pi/agent/auth.json`:

```json
{
  "anthropic": { "type": "api_key", "key": "sk-ant-..." },
  "openrouter": { "type": "api_key", "key": "sk-or-..." }
}
```

Auth file entries take priority over environment variables.

## Configuring models

This is where Pi gets interesting. You can connect to any model provider through environment variables, the auth file, or a custom `models.json` file.

### Using built-in providers

Pi has built-in support for these providers:

| Provider | Env Variable | auth.json key |
|----------|-------------|---------------|
| Anthropic | `ANTHROPIC_API_KEY` | `anthropic` |
| OpenAI | `OPENAI_API_KEY` | `openai` |
| DeepSeek | `DEEPSEEK_API_KEY` | `deepseek` |
| OpenRouter | `OPENROUTER_API_KEY` | `openrouter` |
| MiniMax | `MINIMAX_API_KEY` | `minimax` |
| ZAI (GLM) | `ZAI_API_KEY` | `zai` |
| Kimi | `KIMI_API_KEY` | `kimi-coding` |
| Google Gemini | `GEMINI_API_KEY` | `google` |
| Groq | `GROQ_API_KEY` | `groq` |
| xAI | `XAI_API_KEY` | `xai` |
| Mistral | `MISTRAL_API_KEY` | `mistral` |
| Fireworks | `FIREWORKS_API_KEY` | `fireworks` |
| OpenCode Zen | `OPENCODE_API_KEY` | `opencode` |
| OpenCode Go | `OPENCODE_API_KEY` | `opencode-go` |
| Hugging Face | `HF_TOKEN` | `huggingface` |

Set the key and Pi auto-discovers all models for that provider:

```bash
export OPENROUTER_API_KEY=sk-or-...
pi
# /model shows all 200+ OpenRouter models
```

### Adding custom models with models.json

For providers that are not built-in — or for Ollama, LM Studio, vLLM, and any OpenAI-compatible API — create `~/.pi/agent/models.json`:

```json
{
  "providers": {
    "ollama": {
      "baseUrl": "http://localhost:11434/v1",
      "api": "openai-completions",
      "apiKey": "ollama",
      "models": [
        { "id": "llama3.1:8b" },
        { "id": "qwen2.5-coder:7b" }
      ]
    }
  }
}
```

The `apiKey` field is required but Ollama ignores it, so any string works. The file reloads each time you open `/model`, so you can edit it during a session without restarting Pi.

For local models that do not support the `developer` role used by reasoning models, add compatibility flags:

```json
{
  "providers": {
    "ollama": {
      "baseUrl": "http://localhost:11434/v1",
      "api": "openai-completions",
      "apiKey": "ollama",
      "compat": {
        "supportsDeveloperRole": false,
        "supportsReasoningEffort": false
      },
      "models": [
        {
          "id": "qwen3.6:27b",
          "reasoning": true
        }
      ]
    }
  }
}
```

### Connecting to OpenRouter for cheap models

OpenRouter is the easiest way to get access to all the affordable models in one place. Set your key:

```bash
export OPENROUTER_API_KEY=sk-or-...
```

Then use `/model` in Pi to pick from the full list. The models I keep using:

| Model | Why | Cost |
|-------|-----|------|
| MiniMax M2.7 | Cheapest, good for everyday edits | $0.30/M input |
| Qwen 3.6 Plus | Best front-end and "vibe coding" | $0.33/M input |
| DeepSeek V4 Pro | 1M context, lowest hallucination | $0.435/M input |
| GLM 5.1 | Strongest coding accuracy | $1.05/M input |
| Kimi K2.6 | Agent swarm for complex tasks | $0.75/M input |

For a full breakdown of these models with benchmarks and pricing, see the [best cheap models for Hermes Agent](/best-cheap-models-hermes-agent/) guide — the same models work with Pi.

### Using OpenCode Go with Pi

[OpenCode Go](https://go.bitdoze.com/opencode-go) is a $10/month subscription that bundles 12 models including MiniMax M2.7, Qwen 3.6 Plus, GLM 5.1, DeepSeek V4 Pro, and Kimi K2.6. Pi supports it as a built-in provider. For a detailed look at limits and benchmarks, see the [OpenCode Go guide](/opencode-go-plan/).

```bash
export OPENCODE_API_KEY=your-opencode-go-key
pi
# /model, select opencode-go provider
```

<Button text="Get $5 Free Credits for OpenCode Go" link="https://go.bitdoze.com/opencode-go" variant="solid" color="green" size="md" icon="arrow-right" />

#### What OpenCode Go includes

The current lineup has 12 models:

| Model | Notes |
|-------|-------|
| DeepSeek V4 Pro | Good for general coding, strong long context |
| DeepSeek V4 Flash | Fast and cheap, good for quick tasks |
| GLM 5.1 | Zhipu's flagship, strong reasoning |
| GLM 5 | Slightly cheaper than 5.1 |
| Qwen 3.6 Plus | Latest from Alibaba, good for code generation |
| Qwen 3.5 Plus | Previous generation, still fast |
| Kimi K2.5 | Moonshot's model, good with Chinese and English |
| Kimi K2.6 | Newer version with better benchmarks |
| MiniMax M2.7 | My favorite for agentic tasks |
| MiniMax M2.5 | Cheaper MiniMax option |
| MiMo V2.5 Pro | Xiaomi's coding model |
| MiMo V2.5 | Xiaomi's base model |

The list changes as the OpenCode team tests and benchmarks new models. They do not add every open source model. Each one gets tested for coding agent use and the teams work with model providers to optimize the service.

#### Usage limits

Go is not unlimited. It uses dollar-value limits, not request counts:

| Limit | Cap |
|-------|-----|
| Per 5 hours | $12 |
| Per week | $30 |
| Per month | $60 |

Cheaper models stretch further. With DeepSeek V4 Flash you get around 31,650 requests per 5 hours. With GLM 5.1 you get around 880. In practice, the limits are generous enough for daily coding work — I have not hit them once in three weeks of use.

If you have credits in your OpenCode Zen balance, you can enable the "Use balance" option in the console. When Go limits run out, it falls back to your Zen balance instead of blocking requests.

#### How it compares to managing your own keys

With separate API keys, you pay per token and track billing across multiple providers. My monthly cost with direct API keys was $15-20. Go at $10/month gives me access to the same models plus 10 more I would not have bothered setting up. The limits are generous enough that I have not hit them once.

The trade-off is control. With direct API keys, you can switch providers if one goes down. With Go, you depend on the OpenCode team for failover. In practice, I have had no downtime issues, but it is worth mentioning.

### Overriding built-in provider URLs

If you want to route a built-in provider through a proxy, add a minimal entry to models.json:

```json
{
  "providers": {
    "anthropic": {
      "baseUrl": "https://my-proxy.example.com/v1"
    }
  }
}
```

All built-in Anthropic models remain available. Existing auth continues to work.

## Project instructions with AGENTS.md

Pi loads context files at startup. Create an `AGENTS.md` file in your project root:

```markdown
# Project Instructions

- Run `npm run check` after code changes.
- Do not run production migrations locally.
- Use the existing error handling pattern in src/errors/.
- Keep responses concise.
```

Pi loads `~/.pi/agent/AGENTS.md` for global instructions and `AGENTS.md` from parent directories and the current directory. Run `/reload` after changes.

## Extensions worth installing

Extensions are where Pi becomes more than a basic agent. Here are the ones that make a real difference.

### Extensions that make Pi smarter

**pi-memory-md** — Persistent memory stored as Markdown files. The agent remembers what it learned about your project across sessions. Without this, Pi starts fresh every time. This is the first extension I install.

**pi-mcp-adapter** — Connects Pi to any MCP-compatible tool server. GitHub, Playwright, Brave Search, Postgres, Notion, Slack — any MCP server works. If you use MCP with other agents like Hermes or OpenClaw, this lets you reuse the same tools.

**pi-subagents** — Run isolated sub-agents for parallel work. When a task has independent parts, sub-agents tackle them simultaneously instead of doing everything in sequence.

**pi-plan** — Read-only planning mode with approval-based execution. Like OpenCode's Tab-to-switch plan mode. Pi describes what it would do, you review, then approve. Safer for production code.

### Extensions that save you time

**pi-web-access** — Web search and URL fetching inside Pi. The agent can look up documentation, check Stack Overflow, or fetch API references without leaving the terminal.

**pi-autoresearch** — Long-running research loop. Tell Pi to research a topic and it iterates — searching, reading, summarizing, searching again — until it has a complete answer.

**pi-simplify** — Reviews recently changed code for clarity and consistency. After the agent makes changes, run this to catch style issues and dead code.

### Extensions that improve the interface

**pi-powerbar** — Status line showing model name, token usage, and context status at a glance. Small thing that makes a big difference when you switch models often.

**pi-usage-extension** — Tracks token usage and API cost in-session. If you are trying to keep costs down with cheap models, this shows you exactly what each request costs.

**pi-manage-todo-list** — Multi-step work tracking with a live progress widget. Break a task into steps, track what is done, what is in progress, what is left.

**pi-btw** — Ask quick side questions without polluting the conversation history. Useful for "wait, what does this function do again?" without derailing your current task.

**pi-add-dir** — Load extra project directories into the current Pi session. If your work spans multiple repos, this lets Pi see all of them.

### Installing extensions

Single-file extensions go directly in the extensions directory:

```bash
# Example: copy a single extension
cp ask-user-question.ts ~/.pi/agent/extensions/
```

Directory extensions:

```bash
# Copy the directory
cp -r pi-memory-md ~/.pi/agent/extensions/

# Install npm dependencies if the extension has a package.json
cd ~/.pi/agent/extensions/pi-memory-md
npm install
```

Then restart Pi or run `/reload`.

## My Pi setup: what I actually install

After months of testing different combinations, here is the setup I run on every machine. These are the npm packages I install on top of vanilla Pi.

### Required packages

```bash
pi install npm:pi-tinyfish
pi install npm:@juicesharp/rpiv-ask-user-question
pi install npm:@juanibiapina/pi-powerbar
pi install npm:pi-hermes-memory
pi install npm:@juicesharp/rpiv-todo
```

Here is what each one does and why I keep it:

**pi-tinyfish** — Web search and URL fetching inside Pi. The agent can look up documentation, check API references, or fetch articles without leaving the terminal. This replaces the need to copy-paste URLs or switch to a browser mid-session. Search and Fetch are free — [get your API key here](https://go.bitdoze.com/tinyfish).

**@juicesharp/rpiv-ask-user-question** — Structured question prompts during execution. Instead of the agent guessing when requirements are ambiguous, it asks you structured questions with 2-4 options. Keeps conversations focused and reduces back-and-forth.

**@juanibiapina/pi-powerbar** — Status line showing model name, token usage, and context status at a glance. Small thing that makes a big difference when you switch models often. I use multiple models throughout the day, so seeing which one is active saves mistakes.

**pi-hermes-memory** — Persistent memory stored across sessions. The agent remembers project conventions, your preferences, and past decisions. Without this, Pi starts fresh every time. This is the extension that makes Pi feel like it actually knows your codebase.

**@juicesharp/rpiv-todo** — Multi-step task tracking with a live progress widget. Break a task into steps, track what is done, what is in progress, what is left. Essential for any work that takes more than a few turns.

### Optional packages

These two I install when I need them, but they are not part of my daily setup:

```bash
pi install npm:pi-subagents
pi install npm:pi-mcp-adapter
```

**pi-subagents** — Run isolated sub-agents for parallel work. Useful when a task has independent parts that can be tackled simultaneously. I install this for large refactoring sessions or when I need to work across multiple files in parallel.

**pi-mcp-adapter** — Connects Pi to any MCP-compatible tool server. GitHub, Playwright, Brave Search, Postgres, Notion, Slack — any MCP server works. I install this when I need to connect Pi to external services beyond what the other extensions provide.

### Using OpenCode Go with your setup

Instead of managing separate API keys for each model provider, I use [OpenCode Go](https://go.bitdoze.com/opencode-go). It is a $10/month subscription that bundles 12 models including MiniMax M2.7, Qwen 3.6 Plus, GLM 5.1, DeepSeek V4 Pro, and Kimi K2.6. Pi supports it as a built-in provider — you just set the API key:

```bash
export OPENCODE_API_KEY=your-opencode-go-key
pi
# /model, select opencode-go provider
```

That is it. No OpenRouter account, no separate billing, no tracking which key goes where. One key, 12 models, works in Pi and any other agent that speaks OpenAI-compatible APIs.

<Button text="Get $5 Free Credits for OpenCode Go" link="https://go.bitdoze.com/opencode-go" variant="solid" color="green" size="md" icon="arrow-right" />

## LazyPi: one command, everything configured

If you do not want to research and pick individual extensions, LazyPi does it for you.

<Button text="LazyPi" link="https://lazypi.org/" variant="solid" color="purple" size="md" icon="arrow-right" />

```bash
npx @robzolkos/lazypi
```

This installs Pi if you do not have it, then adds:

| Feature | Pi (vanilla) | Pi + LazyPi |
|---------|-------------|-------------|
| Skills | 0 | 60+ |
| Themes | 2 | 76 |
| MCP support | No | Yes |
| Sub-agents | No | Yes |
| Persistent memory | No | Yes |
| Claude Code CLI provider | No | Yes |
| Cost/usage tracking | No | Yes |
| Todo tracking | No | Yes |
| Planning mode | No | Yes |

You can install everything at once or use the interactive picker to choose specific packages. Re-running the command skips anything already installed.

The LazyPi catalog includes all the extensions listed above plus 60+ community skills and 76 terminal themes (Dracula, Nord, Gruvbox, Tokyo Night, Kanagawa, and more).

<Notice type="info" title="LazyPi tip">
LazyPi is a quick start, not a permanent dependency. The extensions it installs live in your `~/.pi/agent/` directory and work independently of LazyPi. You can uninstall LazyPi's runner and keep everything it installed.
</Notice>

## Community config: pi-config

The [pi-config](https://github.com/amosblomqvist/pi-config) repository by amosblomqvist is a curated collection of personal Pi skills and extensions. It is not meant to be installed as one package — browse the repo and copy what you need.

### What is in it

**Extensions:**
- `bash-guard` — blocks dangerous commands before they run
- `context.ts` — loads extra context from external sources
- `filechanges` — tracks file modifications across turns
- `google-image-search` — search Google Images from inside Pi
- `memory.ts` — another persistent memory implementation
- `subagents` — sub-agent support
- `web-fetch` — fetch and read web pages
- `web-search` — web search integration
- `youtube-search` — search YouTube from inside Pi
- `video-extract` — extract information from video URLs
- `zz-read-only-mode` — forces read-only mode (blocks all writes)

**Skills:**
- `orchestrator` — coordinates multi-step workflows
- `pdf-reader` — read and extract text from PDF files
- `reddit` — search and read Reddit posts
- `stop-slop` — prevents the agent from generating low-quality filler

### How to use it

```bash
# Copy a single-file extension
cp extensions/ask-user-question.ts ~/.pi/agent/extensions/

# Copy a directory extension
cp -r extensions/web-fetch ~/.pi/agent/extensions/

# Install deps if needed
cd ~/.pi/agent/extensions/web-fetch
npm install

# Copy a skill
cp -r skills/reddit ~/.pi/agent/skills/

# Reload
# In Pi: /reload
```

Some extensions need system tools:

```bash
# For youtube-search and video-extract
brew install yt-dlp ffmpeg

# For pdf-reader
python3 -m venv ~/.pi/agent/skills/pdf-reader/.venv
~/.pi/agent/skills/pdf-reader/.venv/bin/pip install -r ~/.pi/agent/skills/pdf-reader/requirements.txt
```

<Notice type="warning" title="Do not clone over your config">
Do not clone the pi-config repo directly into `~/.pi/agent/` if you already have Pi set up. Copy individual files and directories instead so you do not overwrite your existing configuration.
</Notice>

## pi_agent_rust: the Rust port

If you want the same agent concept but compiled to a single binary with faster startup and lower memory usage, there is [pi_agent_rust](https://github.com/Dicklesworthstone/pi_agent_rust).

<Button text="pi_agent_rust GitHub" link="https://github.com/Dicklesworthstone/pi_agent_rust" variant="solid" color="blue" size="md" icon="github" />

### What it is

A high-performance AI coding agent CLI written in Rust with zero unsafe code. 823 GitHub stars, 2,812 commits, 13 releases, and active development (the latest commit was hours ago at the time of writing). It is a from-scratch Rust implementation that supports the same seven built-in tools as Pi (read, write, edit, bash, grep, find, ls) plus Anthropic and OpenAI providers with streaming.

### Why you might want it

- **Single binary** — no Node.js runtime needed. The release binary is under 8MB.
- **Startup time** — 12ms versus several hundred milliseconds for the Node.js version.
- **Extension ecosystem** — supports TypeScript extensions via a built-in QuickJS runtime, so existing Pi extensions work.
- **Security** — formal threat model, fuzz testing, `forbid(unsafe_code)`, and 60+ pages of security documentation.
- **Session management** — SQLite-backed sessions with branching and tree navigation.

### Installing pi_agent_rust

```bash
# One-line installer
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/pi_agent_rust/main/install.sh | bash
```

Or build from source:

```bash
git clone https://github.com/Dicklesworthstone/pi_agent_rust.git
cd pi_agent_rust
cargo build --release
# Binary at target/release/pi
```

### When to use the Rust port

The Rust port is best for people who want the fastest possible terminal agent, run on resource-constrained machines, or prefer a single binary distribution. The Node.js version has the larger extension ecosystem and more active community extension development. Both read the same `models.json` and `auth.json` files, so you can switch between them without reconfiguring.

## Pi vs OpenCode vs Claude Code

| Feature | Pi | OpenCode | Claude Code |
|---------|-----|----------|-------------|
| **Install** | npm package | npm/binary | npm package |
| **Language** | TypeScript | TypeScript | TypeScript |
| **Default tools** | 4 (read, write, edit, bash) | Full set | Full set |
| **Extension system** | TypeScript extensions | Config + rules | MCP + hooks |
| **Model choice** | 20+ built-in + custom | 75+ providers | Anthropic only |
| **Plan mode** | Via extension | Built-in (Tab key) | No |
| **Memory** | Via extension | No | No |
| **MCP support** | Via extension | Built-in | Built-in |
| **Sub-agents** | Via extension | No | No |
| **Image support** | Paste + drag | Drag and drop | Paste |
| **Themes** | 2 built-in + 76 community | Built-in themes | No |
| **Pricing** | Free (pay API) | Free (pay API) | $20/month + API |

Pi starts smaller but grows through extensions. If you want to build your own agent workflow from parts, Pi is the better foundation. If you want everything working out of the box, OpenCode gets you there faster.

## Daily workflow tips

### Switching models

Use `/model` or `Ctrl+L` to pick a model. Use `Shift+Tab` to cycle thinking level. Use `Ctrl+P` / `Shift+Ctrl+P` to cycle through scoped models.

### Referencing files

Type `@` in the editor to fuzzy-search files, or pass them on the command line:

```bash
pi @README.md "Summarize this"
pi @src/app.ts @src/app.test.ts "Review these together"
```

### Running shell commands

Prefix with `!` to run a command and send its output to the model:

```
!npm run test
```

Use `!!` to run a command without adding it to the context.

### Sessions

Sessions save automatically. Continue your last session:

```bash
pi -c
```

Browse previous sessions:

```bash
pi -r
```

Inside Pi, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.

### Non-interactive mode

For one-shot prompts in scripts or CI:

```bash
pi -p "Summarize this codebase"
cat README.md | pi -p "Summarize this text"
pi -p @screenshot.png "What is in this image?"
```

Use `--mode json` for structured output or `--mode rpc` for process integration.

## Running Pi on a VPS

Pi works over SSH. I run it on a $6/month VPS and connect from my laptop.

```bash
# Use tmux so sessions survive disconnects
tmux new -s pi
cd /path/to/project
pi
```

Detach with `Ctrl+B, D` and reattach later with `tmux attach -t pi`.

For a better SSH experience, use **mosh**:

```bash
mosh user@your-vps-ip
```

## FAQ

<Accordion label="Is Pi free?" group="faq" expanded="true">
The agent itself is free and open source. You pay for the LLM API usage. With cheap models like MiniMax M2.7 at $0.30/M input tokens through OpenRouter, a month of coding costs $3-10. OpenCode Go bundles 12 models for $10/month.
</Accordion>

<Accordion label="Can I use Pi with Ollama for local models?" group="faq">
Yes. Add your Ollama instance to `~/.pi/agent/models.json` with `baseUrl: "http://localhost:11434/v1"`, `api: "openai-completions"`, and `apiKey: "ollama"`. Set `compat.supportsDeveloperRole` to `false` for models that do not support the developer role. See our [Ollama Docker guide](/ollama-docker-install/) for setting up Ollama.
</Accordion>

<Accordion label="How does Pi compare to OpenCode?" group="faq">
Pi is more minimal by design. OpenCode ships with a TUI, plan mode, and image support built in. Pi gives you four tools and a TypeScript extension system — you add features through extensions. If you want to build a custom agent workflow from parts, Pi is the better foundation. If you want everything working out of the box, OpenCode gets you there faster.
</Accordion>

<Accordion label="What is LazyPi?" group="faq">
LazyPi (`npx @robzolkos/lazypi`) is a one-command installer that adds 60+ community skills, 76 themes, MCP support, sub-agents, persistent memory, usage tracking, and planning mode to Pi. It is a curated starting point, not a permanent dependency. Everything it installs lives in your `~/.pi/agent/` directory and works independently.
</Accordion>

<Accordion label="Should I use the Rust port or the Node.js version?" group="faq">
The Node.js version has the larger extension ecosystem and more community support. The Rust port (pi_agent_rust) starts in 12ms, uses under 8MB of memory, and compiles to a single binary. Both read the same config files. If you care about speed and minimal resource usage, use the Rust port. If you want access to the full community extension ecosystem, use the Node.js version.
</Accordion>

<Accordion label="Can I use Pi alongside Hermes Agent or OpenClaw?" group="faq">
Yes. Pi is for coding tasks — editing files, running builds, refactoring code. Hermes Agent handles broader tasks like web searches, scheduled jobs, messaging, and server management. OpenClaw is another self-hosted agent with its own strengths. They do not conflict. Run them all on the same VPS if you want.
</Accordion>

For more AI agent guides, check out the [Hermes Agent setup guide](/hermes-agent-setup-guide/), the [OpenCode setup guide](/opencode-setup-guide/), and the [best cheap models for any coding agent](/best-cheap-models-hermes-agent/). For the GitHub Copilot pricing changes and what they mean for your workflow, see the [Copilot alternatives article](/github-copilot-alternatives-2026/). For a side-by-side comparison of OpenCode and Pi, see the [OpenCode vs Pi Agent comparison](/opencode-vs-pi-agent/).