More Amplifier Stories

VS Code Extension

Native AI assistance in your IDE, powered by the modular Amplifier agent framework

January 2026

Active

Two worlds,
one experience

How do you bring a Python-based AI agent framework into a TypeScript VS Code extension?

Amplifier Core
  • Python ecosystem
  • Async event-driven architecture
  • Modular providers, tools, hooks
  • Extended thinking & streaming
VS Code Extension
  • TypeScript/JavaScript
  • Webview panels & providers
  • Extension host process
  • Native IDE integration

Two-tier architecture

A Python FastAPI backend bridges Amplifier Core to the TypeScript extension via HTTP + Server-Sent Events

VS Code Extension
TypeScript
Python Server
FastAPI + SSE
amplifier-core
AI Kernel

Key insight: HTTP for commands, SSE for streaming events. Local-only server on 127.0.0.1 for security. Credentials passed per-session, never stored.

Full system overview

VS Code Extension (TypeScript)
  ChatViewProvider    CodeActionProvider    ServerManager
         |                    |                    |
         +--------------------+--------------------+
                              |
                       AmplifierClient
                  EventStreamManager (SSE)
                     ApprovalHandler
                              |
                    HTTP + SSE (localhost:8765)
                              |
Python Backend (FastAPI)
                   SessionRunner
                   SessionManager
                              |
amplifier-core (kernel)
  Providers  Tools  Hooks  Orchestrators  Context
                

Chat Panel

Interactive AI chat in the VS Code sidebar with real-time streaming

💬
Streaming Responses
Watch AI think in real-time with progressive text rendering and thinking indicators
📝
Markdown Rendering
Syntax highlighting, code blocks with copy-to-clipboard, formatted lists and tables
🛠
Tool Visibility
See tools execute in real-time: file reads, bash commands, web searches, all streaming
📈
Token Usage
Track input/output tokens per response with live accumulation during streaming

Approval Gates

Human-in-the-loop for sensitive operations with smart session memory

QuickPick UI
Native VS Code QuickPick for clean, consistent approval prompts that match the IDE experience
"Always Allow" Memory
Session-scoped tool allowlists reduce approval fatigue while maintaining security boundaries
// Approval event from server { "event": "approval:required", "data": { "approval_id": "abc123", "prompt": "Run: rm -rf build/", "options": ["allow", "deny"], "timeout": 30, "default": "deny" } }

Context Gathering

Rich workspace awareness sent with every prompt

Workspace Root
Smart detection with multi-folder support. Active editor priority, then visible editors, then first folder.
Open Files
Prioritized by visibility. Active file first, then visible editors, then background tabs. Content included.
Git State
Current branch, staged files, modified files, untracked files. Full repo awareness.
Selection
Current text selection with file path and range. Perfect for "explain this" or "fix this".
Diagnostics
Errors and warnings from VS Code. AI sees what you see in the Problems panel.
Cursor Position
Line and character position in active file. Context-aware completions and suggestions.

Server Management

Automatic lifecycle handling for the Python backend

  • Auto-start on extension activation
  • Health polling every 5 seconds
  • Crash detection with auto-restart
  • Prerequisites check (Python 3.11+, uv)
  • Clean shutdown on extension deactivate
  • Port configuration via settings
// ServerManager lifecycle class ServerManager { async start(): Promise<void> async stop(): Promise<void> async checkHealth(): Promise<boolean> async waitForReady(): Promise<void> } // Health response { "status": "healthy", "version": "0.1.0", "uptime_seconds": 3847, "active_sessions": 2 }

Event Streaming

11+ event types bridge the Python kernel to the TypeScript UI

content_delta thinking_delta thinking_final tool:pre tool:post tool:error approval:required approval:granted approval:denied session:start session:end prompt:complete

Exponential backoff reconnection: SSE connections auto-reconnect on failure. Starting at 1s, maxing at 30s, with 10 attempts before surfacing error to user.

Code Actions

Lightbulb menu integration for instant AI assistance

Explain with Amplifier
Select code, click lightbulb, get a clear explanation of what the code does and why.
Improve with Amplifier
Get suggestions for better patterns, performance improvements, and cleaner code.
Fix with Amplifier
AI analyzes diagnostics and selection to propose fixes for errors and warnings.
// Code action triggers chat with context const action = new vscode.CodeAction( 'Explain with Amplifier', vscode.CodeActionKind.QuickFix ); action.command = { command: 'amplifier.explainSelection', arguments: [selection.getText(), document.uri] };

Built secure
by default

Local-only Server
Backend binds to 127.0.0.1 only. No network exposure, no attack surface from outside.
No Credential Storage
API keys from VS Code SecretStorage or environment variables. Passed per-session, never persisted on server.
Content Security Policy
Webviews use strict CSP with nonce-based script execution. No inline script injection.
Workspace Sandbox
File operations restricted to workspace root. Tools can't escape the project boundary.

Profile System

Switch AI behaviors via declarative profiles

vscode-simple
Minimal tools for quick Q&A. Fast responses, low token usage.
vscode-dev
Full development tools: filesystem, bash, web, search. Complete coding assistant.
vscode-test
Approval testing profile. Every tool requires confirmation.
# Profile bundle example (vscode-dev.md) --- profile: vscode-dev extends: @foundation/dev orchestrator: loop-streaming tools: - filesystem - bash - web_search - web_fetch hooks: - workspace-sandbox ---

Project velocity

2
Languages
(TS + Python)
11+
SSE Event
Types
6
Core
Services
4
Profile
Bundles

Full Amplifier kernel integration: Providers, Tools, Hooks, Orchestrators, Context

Built by Samuel Lee (samueljklee) · 16 commits · Dec 2025 – Jan 2026

Research Methodology

Data as of: February 20, 2026

Feature status: Active

Repository: samueljklee/amplifier-app-vscode

Research performed:

  • GitHub API: gh repo view samueljklee/amplifier-app-vscode
  • Commit history: gh api repos/samueljklee/amplifier-app-vscode/commits (16 commits)
  • Contributor analysis: gh api .../contributors (1 contributor)

Gaps: Repository not cloned locally. Line counts and detailed file analysis unavailable. Feature counts (11+ SSE events, 6 services, 4 profiles) are from code review, not automated enumeration.

Primary contributor: Samuel Lee (samueljklee) — 16 commits (100%)

Try it today

Clone, run, chat. One command to launch.

git clone https://github.com/samueljklee/amplifier-app-vscode cd amplifier-app-vscode ./scripts/run.sh

github.com/samueljklee/amplifier-app-vscode

1 / 15
More Amplifier Stories More Amplifier Stories