CodeBuddy is an advanced AI-powered VS Code extension featuring an agentic architecture with specialized sub-agents, tool orchestration, and multi-model support. It transforms your development workflow with intelligent code assistance, autonomous task execution, and deep codebase understanding.
π€ Agentic Architecture - DeepAgents-powered autonomous developer agent with specialized sub-agents
π§ LangGraph Integration - Sophisticated multi-agent orchestration with stateful workflows
π§ Tool Orchestration - Web search, file operations, and think tools for complex reasoning
π Mermaid Diagram Rendering - Visual diagram rendering with auto-fix for LLM syntax errors
π PR Review System - Intelligent pull request analysis with change detection
π Persistent Codebase Understanding - SQLite-backed analysis caching across sessions
β‘ Streaming Responses - Real-time token streaming for responsive interactions
CodeBuddy employs a sophisticated multi-agent architecture built on modern AI orchestration patterns:
flowchart TB
subgraph Extension["π§© CodeBuddy Extension"]
subgraph UI["User Interface Layer"]
Webview["π¬ Webview<br/>(React UI)"]
Commands["β‘ Commands<br/>(Actions)"]
Orchestrator["π― Orchestrator<br/>(Event Publisher)"]
end
subgraph AgentLayer["π€ Agent Service Layer"]
DeveloperAgent["π§ Developer Agent<br/>(DeepAgents)"]
subgraph SubAgents["Specialized Sub-Agents"]
CodeAnalyzer["π Code<br/>Analyzer"]
DocWriter["π Doc<br/>Writer"]
Debugger["π Debugger"]
FileOrganizer["π File<br/>Organizer"]
end
end
subgraph Tools["π§ Tool Provider"]
WebSearch["π Web<br/>Search"]
FileTool["π File<br/>Tool"]
ThinkTool["π Think<br/>Tool"]
TavilySearch["π Tavily<br/>Search"]
end
subgraph Backends["πΎ Backend Systems"]
Filesystem["π Filesystem<br/>(/workspace/)"]
Store["ποΈ Store<br/>(/docs/)"]
State["β‘ State<br/>(/ ephemeral)"]
end
end
subgraph External["βοΈ External Services"]
Gemini["Gemini"]
Anthropic["Anthropic"]
Groq["Groq"]
Deepseek["Deepseek"]
Tavily["Tavily API"]
end
Webview --> DeveloperAgent
Commands --> DeveloperAgent
Orchestrator --> DeveloperAgent
DeveloperAgent --> SubAgents
DeveloperAgent --> Tools
Tools --> Backends
Tools --> External
The core of CodeBuddy is built on DeepAgents and LangGraph, providing:
- Developer Agent: Main orchestrating agent with access to tools and sub-agents
- Specialized Sub-Agents:
- Code Analyzer: Deep code review, architecture analysis, bug detection
- Doc Writer: Comprehensive documentation generation
- Debugger: Error investigation with web search for solutions
- File Organizer: Project structure refactoring and organization
CodeBuddy uses a sophisticated three-tier storage system:
| Path | Backend | Persistence | Purpose |
|---|---|---|---|
/workspace/ |
Filesystem | Permanent | Real file operations on your codebase |
/docs/ |
Store | Cross-session | Long-term knowledge and documentation |
/ (root) |
State | Session only | Temporary scratch space |
- Autonomous Task Execution: Agent can plan, execute, and verify multi-step tasks
- Tool Usage: Web search, file analysis, and structured thinking capabilities
- Sub-Agent Delegation: Complex tasks are delegated to specialized agents
- Human-in-the-Loop: Optional approval for file write/edit operations
- Modern React UI: Beautiful, responsive chat with syntax highlighting
- Real-time Streaming: Token-by-token response streaming
- Mermaid Diagrams: Visual diagram rendering with auto-fix for syntax errors
- File Upload: Support for PDF, DOCX, CSV, JSON, TXT analysis
- Customizable Themes: Multiple themes to match your preferences
- Code Review: Comprehensive analysis of code quality, security, and best practices
- Refactoring: Context-aware code improvements and restructuring
- Optimization: AI-driven performance enhancement suggestions
- Explanation: Clear explanations of complex code logic
- Comment Generation: Intelligent documentation for your code
- Visual Rendering: Automatic detection and rendering of Mermaid diagrams
- Dark Theme: Beautiful purple-accented dark theme matching VS Code
- Auto-Fix: Intelligent repair of common LLM syntax errors:
&symbol conversion toand- Smart quote normalization
- Bracket balancing
- Sequence/flowchart-specific fixes
- Copy & Collapsible Source: Easy access to diagram code
- Branch Comparison: Compare current branch against any target branch
- Change Detection: Multi-provider fallback for robust change detection
- Comprehensive Analysis: Security, performance, and best practice review
- Git CLI Integration: Direct integration with Git for accurate diffs
- README Generation: Auto-generates professional README files
- API Documentation: Extracts and documents REST endpoints
- Architecture Diagrams: Creates Mermaid diagrams for system visualization
- Component Documentation: Documents classes, interfaces, and modules
- Tavily Search: High-quality search results for current information
- URL Reranking: Prioritizes authoritative sources
- Content Extraction: Readability-based article parsing
- Solution Discovery: Find fixes for errors and best practices
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search for "CodeBuddy"
- Click Install
- Select AI Model: Choose your preferred AI provider in settings
- Add API Key: Configure your API key for the chosen model
- Start Coding: CodeBuddy is ready to assist!
| Provider | Get API Key |
|---|---|
| Gemini | Google AI Studio |
| Anthropic | Anthropic Console |
| Groq | Groq Console |
| Deepseek | Deepseek Platform |
| XGrok | X.AI Console |
| Tavily | Tavily Dashboard (for web search) |
Right-click on selected code to access:
| Feature | Description |
|---|---|
| π Add Comments | Intelligent code documentation |
| π Review Code | Comprehensive code analysis |
| π Refactor Code | Smart code improvements |
| β‘ Optimize Code | Performance enhancements |
| π¬ Explain Code | Clear explanations |
| π Generate Commit | Smart Git commit messages |
| π« Inline Chat | Context-aware discussions |
| π Interview Me | Technical interview prep |
| π Generate Diagram | Mermaid diagram creation |
| ποΈ Analyze Codebase | Deep architectural analysis |
| π Review PR | Pull request review |
| Command | Windows/Linux | macOS |
|---|---|---|
| Add Comment | Ctrl+Shift+J |
Cmd+Shift+J |
| Review Code | Ctrl+Shift+R |
Cmd+Shift+R |
| Refactor Code | Ctrl+Shift+; |
Cmd+Shift+; |
| Optimize Code | Ctrl+Shift+O |
Cmd+Shift+O |
| Explain Code | Ctrl+Shift+1 |
Cmd+Shift+1 |
| Generate Commit | Ctrl+Shift+2 |
Cmd+Shift+2 |
| Inline Chat | Ctrl+Shift+8 |
Cmd+Shift+8 |
| Generate Architecture Diagram | Ctrl+Shift+8 |
Cmd+Shift+8 |
| Analyze Codebase | Ctrl+Shift+6 |
Cmd+Shift+6 |
Note: Customize shortcuts in VS Code's Keyboard Shortcuts settings (
Cmd+K Cmd+S/Ctrl+K Ctrl+S)
Access via Ctrl+Shift+P / Cmd+Shift+P:
CodeBuddy: Generate DocumentationCodeBuddy: Show Cache StatusCodeBuddy: Clear CacheCodeBuddy: Refresh AnalysisCodeBuddy: Restart
{
"generativeAi.option": "Gemini" // or "Groq", "Anthropic", "XGrok", "Deepseek"
}{
"google.gemini.apiKeys": "your-gemini-api-key",
"google.gemini.model": "gemini-2.5-pro",
"anthropic.apiKey": "your-anthropic-api-key",
"anthropic.model": "claude-sonnet-4-5",
"groq.llama3.apiKey": "your-groq-api-key",
"groq.llama3.model": "llama-3.1-70b-versatile",
"deepseek.apiKey": "your-deepseek-api-key",
"tavily.apiKey": "your-tavily-api-key"
}{
"font.family": "JetBrains Mono",
"chatview.theme": "Atom One Dark",
"chatview.font.size": 16
}codebuddy/
βββ src/
β βββ extension.ts # Extension entry point
β βββ orchestrator.ts # Event orchestration system
β βββ agents/
β β βββ agentService.ts # Main agent service
β β βββ developer/
β β β βββ agent.ts # Developer agent (DeepAgents)
β β β βββ prompts.ts # System prompts
β β β βββ subagents.ts # Specialized sub-agents
β β βββ backends/
β β β βββ filesystem.ts # VS Code filesystem backend
β β βββ langgraph/
β β β βββ tools/ # LangGraph tool implementations
β β β βββ nodes/ # Graph nodes (planner, responder, etc.)
β β β βββ state/ # State management
β β βββ tools/
β β βββ provider.ts # Tool factory and provider
β βββ commands/ # VS Code command implementations
β β βββ pr/ # PR review system
β β βββ *.ts # Individual commands
β βββ services/
β β βββ codebase-understanding.service.ts
β β βββ documentation-generator.service.ts
β β βββ context-retriever.ts
β β βββ web-search-service.ts
β β βββ embedding.ts
β β βββ *.ts
β βββ tools/
β β βββ tools.ts # Tool definitions (Web, File, Think)
β βββ llms/ # AI provider integrations
β βββ infrastructure/ # Logging, database, etc.
β βββ webview-providers/ # Webview provider management
βββ webviewUi/ # React chat interface
β βββ src/
β β βββ components/
β β β βββ MermaidDiagram.tsx
β β β βββ thinkingComponent.tsx
β β β βββ *.tsx
β β βββ App.tsx
β βββ package.json
βββ package.json # Extension manifest
| Provider | Models | Best For |
|---|---|---|
| Gemini | gemini-2.5-pro, gemini-1.5-flash | General purpose, embeddings |
| Anthropic | claude-sonnet-4-5, claude-3-opus | Complex reasoning, code review |
| Groq | llama-3.1-70b-versatile | Fast responses |
| Deepseek | deepseek-chat | Cost-effective coding |
| XGrok | grok-beta | Latest capabilities |
- Multi-model AI support (5 providers)
- Agentic architecture with DeepAgents
- LangGraph integration for orchestration
- Specialized sub-agents (Code Analyzer, Doc Writer, Debugger, File Organizer)
- Web search with Tavily integration
- Mermaid diagram rendering with auto-fix
- PR review system
- Persistent codebase analysis (SQLite)
- Real-time streaming responses
- Keyboard shortcuts
- MCP Integration - Model Context Protocol for enhanced tool usage
- Agent-to-Agent Communication - A2A protocol support
- Local LLM Support - Ollama integration for offline usage
- Multi-language Support - Extended language support
- Team Collaboration - Shared contexts across teams
- Custom Agents - User-defined specialized agents
β Agent not responding
- Verify API key is correct in settings
- Check API quota/billing status
- Try a different AI model
β Mermaid diagrams not rendering
- Diagrams auto-fix common syntax errors
- Check console for specific parse errors
- Try "Show Source Code" to see raw diagram
β PR Review not working
- Ensure you're in a Git repository
- Check that you have multiple branches
- Verify Git CLI is accessible
β Slow responses
- Try Groq for faster responses
- Check internet connection
- Clear cache with
CodeBuddy: Clear Cache
- π Documentation
- π Report Issues
- π§ Contact: oyinolasunkanmi@gmail.com
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Clone the repository
git clone https://github.com/olasunkanmi-SE/codebuddy.git
# Install dependencies
npm install
cd webviewUi && npm install
# Build
npm run compile
cd webviewUi && npm run build
# Run in development
# Press F5 in VS Code to launch extension development host- Bundle Size: ~9MB (Extension) + ~800KB (UI)
- VS Code Version: 1.78.0+
- AI Models: 5 providers supported
- Database: SQLite for metadata, LanceDB for vectors
- Agent Framework: DeepAgents + LangGraph
- UI Framework: React + styled-components
MIT License - see LICENSE for details.
If CodeBuddy enhances your workflow:
- β Star the repository
- π Leave a review on the VS Code Marketplace
- π Leave a review on the open-vsx.org Marketplace
- π Report bugs or suggest features
- π€ Contribute to the codebase
- π¬ Share with fellow developers
Made with β€οΈ by Olasunkanmi Raymond
Transform your coding experience with AI-powered agentic assistance. Install CodeBuddy today and code smarter, not harder!