Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Pi Agent AHPNew to Visual Studio Code? Get it now.
Pi Agent AHP

Pi Agent AHP

eliasbenb

|
1 install
| (0) | Free
Run Pi in VS Code's native Chat and Agents window using a remote agent host.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pi VS Code Agent

Use Pi in VS Code's own Chat sidebar or Agents window.

This extension integrates Pi with VS Code's native Chat functionality. VS Code shows the conversation, tool calls, and session history in its usual Chat UI. pi-ahp connects that UI to Pi, which uses your Pi profile and runs tools where your project lives: locally, in WSL, in a Dev Container, or over Remote SSH.

Chat Agents
Feature support 👈
Feature Support Notes
Native Chat sidebar ✅
Agents window ✅ Requires manual setup and an editor window to stay open.
WSL ✅
Dev Containers ✅
Remote SSH ✅
Multiple VS Code windows ✅
Streaming replies ✅
Reasoning display ✅ When provided by the model.
Tool calls ✅
Model selection ✅
Thinking levels ✅
Provider authentication ✅ Uses Pi's credentials.
Conversation history ✅
Session deletion 🟡 Use Pi: Delete a Pi Session. Native Chat deletion is disabled due to potential session loss.
Checkpoint restore 🟡 Rewinds the conversation but not file edits.
Context usage ✅
Automatic compaction ✅
Manual /compact ❌
Pi instructions ✅ Supports AGENTS.md, SYSTEM.md, and APPEND_SYSTEM.md.
VS Code instructions ❌ Native Instructions picker and .instructions.md integration are unavailable.
Skills, prompts, and slash commands 🟡 Pi skills (/skill:name) and prompt templates (/name) work when typed, but aren't listed in native autocomplete.
Custom agent selection ❌ Pi subagents aren't exposed as selectable native Chat agents.
@ file references ✅
File attachments ✅
Image attachments ✅ Requires a vision-capable model.
Other VS Code context attachments 🟡 Not all attachment types have been tested.
Per-turn file diffs ❌
Tool approvals ❌
Interactive questions ❌

✅ means the feature is supported natively through direct integration with VS Code. 🟡 means the feature is either partially supported or not natively integrated. ❌ means the feature is not supported.

Get started

Prerequisites

  • VS Code Desktop 1.149 or later.
  • Node.js 24+ and npm on the VS Code host's PATH.

Installation

  • VS Code Marketplace: eliasbenb.pi-vscode-agent (recommended).
  • Install from VSIX: GitHub Releases.
  • Build from source: Build locally.

Set up Chat

  1. Open the project and run Pi: Set up Pi from the Command Palette.
  2. Approve the managed runtime install and allow Pi to register the host in User Settings.
  3. In the Chat Sessions page, select Pi [folder-name] in the agent picker. The host you select determines the project, not the active editor or window.
  4. Select a model (requires Pi setup) and start chatting.

Setup Pi

  • Already use Pi? The extension picks up Pi's default profile in the workspace environment. To use another profile, set piAgent.agentDirectory to its absolute path on that machine. If the setting is blank, the extension honors PI_CODING_AGENT_DIR before falling back to Pi's default.
  • Sign in from VS Code: Run Pi: Sign in to Pi and choose a provider. You can also choose Open Pi and run /login myself to use Pi's own login picker.
  • Use environment variables: Set the provider's variables in the environment VS Code uses to launch Pi.

Run Pi: Restart Host if you switch profiles, add new models, or change the provider environment variables used by the host. If another window still uses that same project host, close or disconnect Pi in that window first.

Set up Agents (optional)

  1. In the project window, run Pi: Set up Agents Window and choose Copy URL and Open Agents.
  2. In the Agents window, run Agents: Add Remote Agent Host…, paste the URL, and use the name shown by Pi. If Agents asks for a folder, pick the project folder on that host.
  3. Keep at least one window for the project open. Agents and Chat use the same Pi host. If the address or token changes, remove the old entry in Agents and repeat setup. Agents entries are added manually and Pi does not edit them.

Build locally

This project uses mise for its tooling.

mise trust
mise install
mise run setup
mise run package

Use Extensions: Install from VSIX… to install the resulting file.

Release

This is just for me, the dev, feel free to ignore.

Release Please opens a release PR on main that bumps package.json and updates the changelog from Conventional Commits.

Prequisites:

  1. Enable Allow GitHub Actions to create and approve pull requests in the repository's Actions settings.
  2. Create a marketplace environment with protected branch main.
  3. Configure Trusted Publishing in Visual Studio Marketplace under the marketplace environment.
  4. Create a repository variable PUBLISH_TO_MARKETPLACE=true
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft