CodeBuddy
A LangGraph coding agent for VS Code with bring-your-own-model support
CodeBuddy is a coding agent that runs inside VS Code, built on LangGraph and deepagents. It runs a tool-calling agent loop that reads the codebase, edits files, runs commands, queries the language server, searches the web, and reviews its own output. Actions that modify the workspace are gated by explicit approval.
CodeBuddy connects to the model provider you choose using your own account and API keys — Anthropic, Google, OpenAI, Groq, DeepSeek, Qwen, GLM, xAI, or a local model.
Read the DOCS · Report an issue

Overview
- Agent architecture. Built on LangGraph and deepagents (
createDeepAgent): a plan → act → verify loop with tool calls, subagent fan-out, and middleware.
- Bring your own model (BYOK). Nine providers, your keys, stored in the OS keychain rather than in settings. Models can be selected per task, including fully local models.
- Local data. Chat history and indexes are stored in the workspace under
.codebuddy/.
- Security controls. LLM-issued shell commands and file writes require modal approval; every file path is validated against the workspace root; outbound URLs are SSRF-checked; untrusted code executes only in a sandbox.
- Extensible. MCP-native, with a skill system and subagents. MIT-licensed.
Supported models
Select a provider in the onboarding wizard and add your key; it is written directly to the OS keychain.
|
|
| Anthropic (Claude) |
OpenAI (GPT) |
| Google (Gemini) |
Groq |
| DeepSeek |
Qwen |
| GLM |
xAI (Grok) |
| Local / self-hosted |
(more via MCP) |
Multi-model routing can direct background and subagent work to a secondary model while the primary turn runs on another.
Capabilities
Code understanding
- Active-editor context,
lsp_query (hover, definitions, references, signatures), get_diagnostics, search_symbols, fuzzy find_files, dependency-graph queries (query_graph), and semantic codebase search.
Editing
- AST-aware edits (
ast_edit) that replace a named function or class body via tree-sitter, plus string-based edit_file and a multi-file composer. Every write passes through diff review before it is applied.
Command execution
- Terminal command execution, with modal approval — showing the full command — required for anything outside a defined safe-prefix list.
Extensibility
- MCP servers (stdio and SSE) add tools at runtime; skills package repeatable workflows; subagents run specialized or parallel work.
Control and observability
- Plan mode (read-only plan generation), persistent chat history, per-conversation cost tracking with budget caps, and optional Langfuse / OpenTelemetry export.
Automation
- code-health checks, and dependency reviews.
Architecture
VS Code webview (React) → BaseWebViewProvider → CodeBuddyAgentService
└─ LangGraph + deepagents loop
├─ selected LLM (BYOK)
├─ tools (edit / terminal / LSP / search / MCP)
├─ middleware (memory · skills · tool-hooks · sandbox)
└─ subagents (dynamic fan-out)
The agent accesses the editor only through an explicit, permission-filtered tool list, wrapped with rate-limiting, deduplication, and audit logging.
Getting started
- Install CodeBuddy from the VS Code Marketplace.
- Open the CodeBuddy panel. The onboarding wizard covers provider selection and API-key entry (or a local endpoint).
- Issue a request — for example, "explain how authentication flows through this repository", "add a test for
OrderService.create", or "find and fix the failing lint". Approve any proposed commands or edits.
Full setup, provider notes, and configuration are in the DOCS.
Contributing
Contributions are welcome.
License
MIT License — see LICENSE for details.
Repository · Issues · Docs