A VS Code extension where AI agents plan, write, review, and test your code โ not just autocomplete it.
ICE is a VS Code extension powered by a 3-agent AI pipeline that understands your entire codebase. Unlike autocomplete tools, ICE can plan multi-file changes, generate production-quality code, validate it with real tests, and auto-fix issues โ all streaming live in your editor.
| Mode | Trigger | Speed | Use Case |
|---|---|---|---|
| โก Fast | Just type | ~10s | Quick questions, small edits |
| ๐ Pipeline | /agents prefix |
~55s | Complex features, refactors, new code |
You: "/agents add pagination to the UserList component"
โ
โผ
โโโโโโโโโโโโโโโ RAG search + AST analysis
โ ๐ Planner โโโโโถ Finds relevant files, reads target,
โโโโโโโโฌโโโโโโโ creates plan with exact edit locations
โ
โผ
โโโโโโโโโโโโโโโ Receives plan + existing code
โ โจ๏ธ Coder โโโโโถ Generates ONLY the changes needed
โโโโโโโโฌโโโโโโโ (INSERT_AFTER or REPLACE_FUNCTION)
โ
โผ
โโโโโโโโโโโโโโโ Static checks + LLM review + pytest
โ โ
Validatorโโโโโถ If issues found โ sends back to Coder
โโโโโโโโฌโโโโโโโ Auto-accepts after max fix attempts
โ
โผ
๐ Proposed changes with diff preview
Context-aware inline completions powered by your indexed codebase. Understands imports, function signatures, and project patterns.
Select code, press โK, describe what you want changed. ICE modifies just the selection.
Side panel with real-time streaming of agent actions. Watch the Planner search your codebase, the Coder generate code, and the Validator run tests โ all live.
ICE indexes your entire project on startup:
- Semantic search โ sentence-transformers + FAISS embeddings
- Symbol matching โ AST-extracted functions, classes, methods
- Dependency graph โ Import relationships and call chains
- Fusion retrieval โ Combines all three for best results
The Validator doesn't just review code โ it generates pytest tests and runs them in an isolated sandbox. Real failures, real feedback.
LLMs are bad at outputting entire files. ICE uses Python's ast module to:
- Find exact function boundaries (handles multi-line strings correctly)
- Extract only the target function from LLM output
- Merge via line splice โ zero ambiguity
ice-vscode/
โโโ src/ # VS Code Extension (TypeScript)
โ โโโ extension.ts # Entry point, command registration
โ โโโ backend/manager.ts # Python backend lifecycle
โ โโโ providers/autocomplete.ts # Ghost completions
โ โโโ commands/
โ โ โโโ indexProject.ts # Codebase indexing command
โ โ โโโ inlineEdit.ts # โK inline edit
โ โโโ views/
โ โ โโโ chatPanel.ts # Agent chat UI (webview)
โ โ โโโ agentTreeView.ts # Agent status tree
โ โโโ utils/
โ โโโ api.ts # Backend HTTP client
โ โโโ config.ts # Extension settings
โ
โโโ backend/ # Python Backend (FastAPI)
โ โโโ src/
โ โโโ main.py # Uvicorn entry point
โ โโโ api/ # REST + SSE endpoints
โ โโโ agents/
โ โ โโโ base.py # BaseAgent with LLM + logging
โ โ โโโ planner.py # RAG retrieval + implementation plan
โ โ โโโ coder.py # Code generation + AST-based merging
โ โ โโโ validator.py # Static checks + LLM review + pytest
โ โโโ workflows/
โ โ โโโ generate.py # 3-agent sequential pipeline
โ โโโ indexer/
โ โ โโโ ast_parser.py # tree-sitter multi-language parsing
โ โ โโโ chunker.py # Intelligent code chunking
โ โ โโโ embedder.py # sentence-transformers embeddings
โ โ โโโ graph_builder.py # Dependency graph construction
โ โโโ retriever/
โ โ โโโ fusion.py # Fusion retrieval (semantic + symbol + graph)
โ โ โโโ semantic.py # Vector similarity search
โ โ โโโ symbol.py # Symbol name matching
โ โ โโโ graph.py # Graph-based retrieval
โ โโโ core/
โ โโโ models.py # Pydantic models (WorkflowState, etc.)
โ โโโ config.py # Settings via pydantic-settings
โ โโโ logging.py # Structured logging (structlog)
โ
โโโ package.json # Extension manifest + commands
โโโ webpack.config.js # TypeScript bundling
โโโ setup.sh # One-command setup
| Layer | Technology |
|---|---|
| Extension | TypeScript, VS Code Extension API, Webpack |
| Backend | Python 3.11+, FastAPI, Uvicorn |
| LLM | Claude API (Anthropic) |
| Embeddings | sentence-transformers (all-MiniLM-L6-v2) |
| Vector Search | FAISS |
| Code Parsing | tree-sitter (Python, JS, TS) |
| Testing | pytest (sandboxed execution) |
| Models | Pydantic v2 |
| Logging | structlog |
- VS Code 1.85+
- Python 3.11+
- Node.js 18+
- Anthropic API key
# Clone
git clone https://github.com/your-username/ice-vscode.git
cd ice-vscode
# Backend
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Create .env
cp .env.example .env
# Edit .env โ set ANTHROPIC_API_KEY=sk-ant-...
# Frontend
cd ..
npm install
npm run compile- Open
ice-vscode/in VS Code - Press fn+F5 (starts Extension Development Host)
- โโงP โ "ICE: Index Current Project"
- Open the chat panel (ICE icon in sidebar)
- Type a request or prefix with
/agentsfor the full pipeline
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Backend health check |
/api/index |
POST | Index a codebase directory |
/api/status |
GET | Index status + stats |
/api/chat |
POST | Fast single-call chat |
/api/generate-stream |
POST | Full 3-agent pipeline (SSE) |
/api/complete |
POST | Autocomplete suggestions |
/api/search |
POST | Semantic code search |
/api/explain |
POST | Code explanation |
The pipeline was consolidated from 7 agents to 3 for performance:
| v1 (7 agents) | v2 (3 agents) | Why |
|---|---|---|
| Researcher | โ Planner | RAG is a function call, not an agent |
| Architect | โ Planner | One LLM call does both |
| Coder | โ Coder | Same |
| Fixer | โ Coder | Coder + feedback = Fixer |
| Reviewer | โ Validator | Both are quality checks |
| Tester | โ Validator | Combined with review |
| Supervisor | โ loop logic | Simple conditional, not an agent |
Result: 7 LLM calls โ 3-4 calls, ~2min โ ~55s, same quality.
ICE doesn't rewrite entire files. The merge system uses three approaches:
| Strategy | When | How |
|---|---|---|
| REPLACE_FUNCTION | Improving existing code | AST finds function boundaries โ swap in place |
| INSERT_AFTER | Adding new code | Line matching โ insert at exact position |
| Full file | New files or files < 300 lines | LLM outputs complete file |
The AST-based approach (Python's ast module) correctly handles multi-line strings, decorators, and nested classes โ unlike regex/indentation scanners.
๐ก Work in Progress โ Actively developing and improving daily.
- โ Ghost autocomplete with codebase context
- โ โK inline editing
- โ 3-agent pipeline (Planner โ Coder โ Validator)
- โ Real-time streaming in chat panel
- โ RAG with fusion retrieval
- โ Real pytest execution
- โ AST-based function replacement
- โ Auto-fix loop on validation failure
- ๐ง Planner-driven edit ranges (AST line numbers passed to Coder)
- ๐ง Full-file mode for small files (< 300 lines)
- ๐ง Multi-file edit support
- ๐ง Diff preview with accept/reject UI
- Python-focused AST merging (JS/TS files fall back to regex)
- Single-file edits per pipeline run
- Validator test generation can be slow (~30-60s)
Settings available via VS Code Settings (โ,):
| Setting | Default | Description |
|---|---|---|
ice.provider |
anthropic |
LLM provider |
ice.model |
claude-sonnet-4-20250514 |
Model name |
ice.anthropicApiKey |
โ | Your API key |
ice.backendPort |
8420 |
Backend server port |
ice.pythonPath |
auto-detect | Custom Python path |
This is a personal project in active development. If you're interested in contributing or have ideas, feel free to open an issue or reach out.
MIT
Built with frustration, curiosity, and way too many iterations on indentation matching.