VV Pi Agent - A simple, useful pi agent for VS Code
A VS Code sidebar extension for the pi coding agent. VV Pi Agent runs the installed pi executable in RPC mode, giving you full access to pi's normal authentication, model catalog, session history, skills, extensions, and prompt templates directly inside VS Code.
Current release: 0.6.8
Installation
Install the extension from the VS Code Marketplace, or install a packaged .vsix file from the command line:
code --install-extension vvpipi-0.6.8.vsix
After installation, open any workspace and click the VV Pi Agent icon in the Activity Bar.
Features
- Real
pi CLI Integration — Runs pi --mode rpc in the background, streaming text, thinking processes, tool calls, compaction, retries, and errors in real time. Provider, tool, runtime, and nested API errors are shown in the transcript with expandable details.
- Multi-Agent Tabs — Run up to 20 isolated pi agents side by side with independent sessions, drafts, attachments, streaming state, and model settings (6 by default).
- Agent-Style Composer — Press Enter to send, Shift+Enter for a new line, and Stop to abort a running turn. Messages can also be steered while pi is working.
- Input History & Copy Actions — Use Up/Down arrows at input boundaries to navigate previous prompts. Handy copy buttons are available for messages, thinking output, tool activity, and notices.
- Live Tool Progress — Long-running bash/write/edit cards show elapsed status and, when available, the number of lines being processed.
- Whole-Turn Timing — Shows the total elapsed time from user prompt submission through the complete AI turn beneath each pi response.
- Model & Thinking Pickers — Quickly search/switch models and select thinking levels right below the input box.
- Model Relay — Optionally configure an ordered fallback chain that continues a turn after an explicit credit/quota exhaustion, with visible switching progress, cancellation, success, recovery notices, and an optional timed loop.
- Rich Context Footer — Displays active context window usage, cumulative input/output token counts, session message count, cost, queued messages, provider, and current thinking level.
- Resource Settings Menu — The top-right gear icon instantly opens
models.json, global/project settings.json, auth.json, and global/project skill/extension folders.
- Editor & File Context — Automatically attaches active file contents (or selections) and diagnostics. Type
@ in the composer to search and reference workspace files. File paths and line references in pi replies are clickable.
- Image Attachments — Paste an image directly into the sidebar input, or use + File to attach PNG, JPEG, GIF, WebP, or BMP images to multimodal pi models.
- Slash Commands — Type
/ to search sidebar actions such as /model, pi skills, prompt templates, and extension commands. Use arrow keys and Enter (or Tab) to complete without clicking.
- Session Resume — Easily resume any saved past session directly from the first-run welcome screen.
- VS Code Commands & Keybindings — Quick access for new chats, model/thinking controls, context compaction, file attachments, and an optional native
pi terminal.
Requirements
- Install Node.js &
pi — Ensure the pi command is available on your system PATH:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
- Authenticate — Log in using
/login, configure auth.json, or set a provider API key environment variable.
- Open Workspace — Open a workspace in VS Code and open the VV Pi Agent sidebar.
Custom Binary Path: If pi is installed in a non-standard location, configure vvpipi.binaryPath in VS Code settings with the command name or absolute path.
Usage
- Chatting: Type your prompt in the sidebar and press Enter (or Shift+Enter for a newline).
- Images: Paste an image into the composer, or click + File and select an image. The selected model must support image input.
- File References: Type
@ to select workspace files, or let the extension automatically attach active editor contents, selections, and diagnostics.
- Model Control: Switch models or adjust reasoning/thinking levels using the controls below the composer.
- Model Relay: Open the model picker, choose Configure, enable relay, and add fallback models. Relay is off by default and only handles explicit credit/quota exhaustion; each fallback is attempted at most once. Enable the optional loop to retry the fallback chain after the configured interval when the chain is exhausted.
- Slash Commands: Type
/ to invoke sidebar actions such as /model, pi skills, custom prompt templates, and extension commands. Press Enter to accept the highlighted completion.
- Sessions: Use the welcome screen to pick up previous chat sessions.
- Settings & Config: Click the gear menu in the header to open
models.json, settings.json, auth.json, skills, and extensions.
Extension Settings
| Setting |
Type |
Default |
Description |
vvpipi.maxAgentTabs |
Number |
6 |
Maximum number of isolated pi agent tabs (1–20). |
vvpipi.binaryPath |
String |
"pi" |
Command name or absolute path for the pi executable. |
vvpipi.thinkingLevel |
String |
"medium" |
Default thinking/reasoning level (off, minimal, low, medium, high, xhigh, max). |
vvpipi.agentDir |
String |
"" |
Optional replacement config directory (PI_CODING_AGENT_DIR). |
vvpipi.approveProjectResources |
Boolean |
true |
Allow pi to load project-local .pi settings, skills, and extensions in RPC mode. |
vvpipi.attachActiveEditorContext |
Boolean |
true |
Automatically include active editor contents, selection, and diagnostics with prompts. |
vvpipi.maxContextCharacters |
Number |
20000 |
Maximum character limit per file attached as context. |
vvpipi.modelRelay.enabled |
Boolean |
false |
Automatically continue with configured fallbacks after explicit credit/quota exhaustion. |
vvpipi.modelRelay.chain |
Array |
[] |
Ordered fallback { provider, modelId } references. |
vvpipi.modelRelay.maxAttempts |
Number |
3 |
Maximum fallback models attempted for one logical turn (1–20). |
vvpipi.modelRelay.stayOnFallback |
Boolean |
true |
Keep the successful fallback model for subsequent prompts. |
vvpipi.modelRelay.randomFallback |
Boolean |
false |
Choose fallback models randomly instead of sequentially. |
vvpipi.modelRelay.loopFallback |
Boolean |
false |
Start another fallback round after all fallback attempts fail. |
vvpipi.modelRelay.loopIntervalMinutes |
Number |
5 |
Minutes to wait before starting the next fallback round. |
Development
To build the extension locally:
npm install
npm run build
To package a .vsix release:
npx @vscode/vsce package
License
MIT License
| |