GPT Agent — VS Code Extension
AI coding agent with multi-provider support. Chat with GPT-4o, Claude, Azure OpenAI, or any OpenAI-compatible API directly from the VS Code sidebar.
Features
- Multi-provider support — OpenAI, Azure OpenAI, Anthropic (Claude), and any OpenAI-compatible endpoint
- Sidebar chat — Copilot-style streaming chat with markdown rendering
- Tool use — The agent reads, writes, edits files and runs commands in your workspace
- Code blocks — Syntax-highlighted with Copy and Insert at Cursor buttons
- Profile switching — Switch between providers and models mid-conversation
- Session history — Resume previous conversations
- Hot-reload config — No restart needed when you change providers or settings
- Theme aware — Works with dark, light, and high-contrast themes
Quick Start
- Install the extension
- Click the GPT Agent icon in the activity bar
- Click Configure Providers on the welcome screen
- Add your provider (API key + model) and save
- Start chatting
Configuration
Option 1: Visual Setup (recommended)
Open Command Palette (Cmd+Shift+P) and run GPT Agent: Configure Providers.
Option 2: Config File
Create ~/.gpt-agent/config.json:
{
"defaultProfile": "openai",
"profiles": {
"openai": {
"provider": "openai",
"apiKey": "sk-...",
"model": "gpt-4o"
},
"claude": {
"provider": "anthropic",
"apiKey": "$ANTHROPIC_API_KEY",
"model": "claude-sonnet-4-20250514"
},
"azure": {
"provider": "azure-openai",
"apiKey": "$AZURE_OPENAI_API_KEY",
"endpoint": "https://your-resource.openai.azure.com/",
"model": "gpt-4o",
"apiVersion": "2024-08-01-preview"
}
}
}
API key values starting with $ are resolved from environment variables.
VS Code Settings
| Setting |
Description |
gptAgent.defaultProfile |
Override the default profile from config.json |
gptAgent.model |
Override the model for the active profile |
Commands
| Command |
Description |
GPT Agent: Open Chat |
Open/focus the sidebar chat |
GPT Agent: Switch Profile |
Change the active provider profile |
GPT Agent: Switch Model |
Change the model |
GPT Agent: Configure Providers |
Open the provider setup wizard |
GPT Agent: Clear Conversation |
Start a new conversation |
GPT Agent: Resume Session |
Restore a previous session |
Supported Providers
| Provider |
Config provider value |
Required fields |
| OpenAI |
openai |
apiKey, model |
| Azure OpenAI |
azure-openai |
apiKey, endpoint, model, apiVersion |
| Anthropic |
anthropic |
apiKey, model |
| OpenAI-Compatible |
openai-compatible |
apiKey, baseURL, model |