|
Terminal-Based Development |
Visual Interactive Experience |
๐ฏ Watch our complete introduction - See how DeepCode transforms research papers and natural language into production-ready code
"Where AI Agents Transform Ideas into Production-Ready Code"
- ๐ฐ News
- ๐ Key Features
- ๐๏ธ Architecture
- ๐ Experimental Results
- ๐ Quick Start
- ๐ค nanobot Integration (Feishu Chatbot)
- ๐ก Examples
- โญ Star History
- ๐ License
๐ ๏ธ [2026-04-17] Stability, Windows compatibility & secrets hygiene update
- ๐ Code Implementation no longer crashes with
name 'LoopDetector' is not definedโ added the missingLoopDetector/ProgressTrackerimports in bothworkflows/code_implementation_workflow.pyandworkflows/code_implementation_workflow_index.py. - ๐ช Windows:
mkdir -p/touch/rm -rf/cp -r/mvnow work natively.tools/command_executor.pytranslates these common Unix file-tree commands viapathlib/shutilon every platform, eliminating the bug wherecmd.exewould create a literal-pdirectory and stall the workflow. - ๐ Removed Brave Search end-to-end. All Python code, MCP server config, Dockerfile pre-installs, nanobot integration and docs are scrubbed of
brave/BRAVE_API_KEY/WebSearchTool. Web fetching keeps working via the built-infetchMCP server;bocha-mcpis the recommended search backend. - ๐ OpenAI-compatible providers documented. New
Quick Start โ Configurationsnippet shows how to point theopenaiblock at Poe (https://api.poe.com/v1), OpenRouter, or Alibaba DashScope, plus how to setdefault_model/planning_model/implementation_model(e.g.gpt-5.4). - ๐ Secrets hygiene.
.gitignorenow covers*.secrets.yaml,*.secrets.yml,secrets.json,*credentials*.json,.env,.env.*(with*.env.examplewhitelisted).mcp_agent.secrets.yamlwas alsogit rm --cached'd so existing checkouts stop tracking it. - ๐ Launch table fixed.
deepcode(no flags) actually starts Docker mode โ the README now showsdeepcode --localfor the no-Docker path and adds explicit Troubleshooting rows for "Docker is installed but not running", Windows GBK encoding, and the issues fixed above. - ๐งน Misc: auto-create
logs/directory so JSONL logging never fails on a fresh checkout, replace bareexcept:withexcept Exception:inagent_orchestration_engine.py(Ruff E722),command_executorMCP tool descriptions now embed the host OS so the LLM picks compatible commands.
๐ [2026-02] nanobot โ๏ธ DeepCode. Just chat naturally with openclaw/nanobot to handle your coding tasks:
- nanobot nanobot now powers your agentic coding & engineering! ๐ค๐ป
- Step away from your laptop โ make vibe coding even more vibe! Code directly from your phone! ๐ฑโจ
- One-command deploy:
./nanobot/run_nanobot.shโ Setup Guide โ
๐ [2026-02] New Web UI Experience Upgrade!
- ๐ User-in-Loop Interaction: Support real-time user interaction during workflows - AI asks clarifying questions directly in the chat
- ๐ฌ Inline Interaction Design: Interaction prompts appear naturally within the chat flow for a seamless experience
- ๐ One-Click Launch: Simply run
deepcodeto start the new UI (cross-platform: Windows/macOS/Linux) - ๐ง Improved Process Management: Enhanced service start/stop mechanism with automatic port cleanup
- ๐ก WebSocket Real-time Communication: Fixed message loss issues, ensuring proper interaction state synchronization
๐ [2025-10-28] DeepCode Achieves SOTA on PaperBench!
DeepCode sets new benchmarks on OpenAI's PaperBench Code-Dev across all categories:
- ๐ Surpasses Human Experts: 75.9% (DeepCode) vs Top Machine Learning PhDs 72.4% (+3.5%).
- ๐ฅ Outperforms SOTA Commercial Code Agents: 84.8% (DeepCode) vs Leading Commercial Code Agents (+26.1%) (Cursor, Claude Code, and Codex).
- ๐ฌ Advances Scientific Coding: 73.5% (DeepCode) vs PaperCoder 51.1% (+22.4%).
- ๐ Beats LLM Agents: 73.5% (DeepCode) vs best LLM frameworks 43.3% (+30.2%).
|
Effortlessly converts complex algorithms from research papers into high-quality, production-ready code, accelerating algorithm reproduction. |
Translates plain textual descriptions into fully functional, visually appealing front-end web code for rapid interface creation. |
Generates efficient, scalable, and feature-rich back-end code from simple text inputs, streamlining server-side development. |
We evaluate DeepCode on the PaperBench benchmark (released by OpenAI), a rigorous testbed requiring AI agents to independently reproduce 20 ICML 2024 papers from scratch. The benchmark comprises 8,316 gradable components assessed using SimpleJudge with hierarchical weighting.
Our experiments compare DeepCode against four baseline categories: (1) Human Experts, (2) State-of-the-Art Commercial Code Agents, (3) Scientific Code Agents, and (4) LLM-Based Agents.
DeepCode: 75.9% vs. Top Machine Learning PhD: 72.4% (+3.5%)
DeepCode achieves 75.9% on the 3-paper human evaluation subset, surpassing the best-of-3 human expert baseline (72.4%) by +3.5 percentage points. This demonstrates that our framework not only matches but exceeds expert-level code reproduction capabilities, representing a significant milestone in autonomous scientific software engineering.
DeepCode: 84.8% vs. Best Commercial Agent: 58.7% (+26.1%)
On the 5-paper subset, DeepCode substantially outperforms leading commercial coding tools:
- Cursor: 58.4%
- Claude Code: 58.7%
- Codex: 40.0%
- DeepCode: 84.8%
This represents a +26.1% improvement over the leading commercial code agent. All commercial agents utilize Claude Sonnet 4.5 or GPT-5 Codex-high, highlighting that DeepCode's superior architectureโrather than base model capabilityโdrives this performance gap.
DeepCode: 73.5% vs. PaperCoder: 51.1% (+22.4%)
Compared to PaperCoder (51.1%), the state-of-the-art scientific code reproduction framework, DeepCode achieves 73.5%, demonstrating a +22.4% relative improvement. This substantial margin validates our multi-module architecture combining planning, hierarchical task decomposition, code generation, and iterative debugging over simpler pipeline-based approaches.
DeepCode: 73.5% vs. Best LLM Agent: 43.3% (+30.2%)
DeepCode significantly outperforms all tested LLM agents:
- Claude 3.5 Sonnet + IterativeAgent: 27.5%
- o1 + IterativeAgent (36 hours): 42.4%
- o1 BasicAgent: 43.3%
- DeepCode: 73.5%
The +30.2% improvement over the best-performing LLM agent demonstrates that sophisticated agent scaffolding, rather than extended inference time or larger models, is critical for complex code reproduction tasks.
The Challenges:
-
๐ Implementation Complexity: Converting academic papers and complex algorithms into working code requires significant technical effort and domain expertise
-
๐ฌ Research Bottleneck: Researchers spend valuable time implementing algorithms instead of focusing on their core research and discovery work
-
โฑ๏ธ Development Delays: Product teams experience long wait times between concept and testable prototypes, slowing down innovation cycles
-
๐ Repetitive Coding: Developers repeatedly implement similar patterns and functionality instead of building on existing solutions
DeepCode addresses these workflow inefficiencies by providing reliable automation for common development tasks, streamlining your development workflow from concept to code.
flowchart LR
A["๐ Research Papers<br/>๐ฌ Text Prompts<br/>๐ URLs & Document<br/>๐ Files: PDF, DOC, PPTX, TXT, HTML"] --> B["๐ง DeepCode<br/>Multi-Agent Engine"]
B --> C["๐ Algorithm Implementation <br/>๐จ Frontend Development <br/>โ๏ธ Backend Development"]
style A fill:#ff6b6b,stroke:#c0392b,stroke-width:2px,color:#000
style B fill:#00d4ff,stroke:#0984e3,stroke-width:3px,color:#000
style C fill:#00b894,stroke:#00a085,stroke-width:2px,color:#000
DeepCode is an AI-powered development platform that automates code generation and implementation tasks. Our multi-agent system handles the complexity of translating requirements into functional, well-structured code, allowing you to focus on innovation rather than implementation details.
๐ฏ Technical Capabilities:
๐งฌ Research-to-Production Pipeline
Multi-modal document analysis engine that extracts algorithmic logic and mathematical models from academic papers. Generates optimized implementations with proper data structures while preserving computational complexity characteristics.
๐ช Natural Language Code Synthesis
Context-aware code generation using fine-tuned language models trained on curated code repositories. Maintains architectural consistency across modules while supporting multiple programming languages and frameworks.
โก Automated Prototyping Engine
Intelligent scaffolding system generating complete application structures including database schemas, API endpoints, and frontend components. Uses dependency analysis to ensure scalable architecture from initial generation.
๐ Quality Assurance Automation
Integrated static analysis with automated unit test generation and documentation synthesis. Employs AST analysis for code correctness and property-based testing for comprehensive coverage.
๐ฎ CodeRAG Integration System
Advanced retrieval-augmented generation combining semantic vector embeddings with graph-based dependency analysis. Automatically discovers optimal libraries and implementation patterns from large-scale code corpus.
-
๐ง Intelligent Orchestration Agent: Central decision-making system that coordinates workflow phases and analyzes requirements. Employs dynamic planning algorithms to adapt execution strategies in real-time based on evolving project complexity. Dynamically selects optimal processing strategies for each implementation step.
-
๐พ Efficient Memory Mechanism: Advanced context engineering system that manages large-scale code contexts efficiently. Implements hierarchical memory structures with intelligent compression for handling complex codebases. This component enables instant retrieval of implementation patterns and maintains semantic coherence across extended development sessions.
-
๐ Advanced CodeRAG System: Global code comprehension engine that analyzes complex inter-dependencies across repositories. Performs cross-codebase relationship mapping to understand architectural patterns from a holistic perspective. This module leverages dependency graphs and semantic analysis to provide globally-aware code recommendations during implementation.
-
๐ฏ Central Orchestrating Agent: Orchestrates entire workflow execution and makes strategic decisions. Coordinates specialized agents based on input complexity analysis. Implements dynamic task planning and resource allocation algorithms.
-
๐ Intent Understanding Agent: Performs deep semantic analysis of user requirements to decode complex intentions. Extracts functional specifications and technical constraints through advanced NLP processing. Transforms ambiguous human descriptions into precise, actionable development specifications with structured task decomposition.
-
๐ Document Parsing Agent: Processes complex technical documents and research papers with advanced parsing capabilities. Extracts algorithms and methodologies using document understanding models. Converts academic concepts into practical implementation specifications through intelligent content analysis.
-
๐๏ธ Code Planning Agent: Performs architectural design and technology stack optimization. Dynamic planning for adaptive development roadmaps. Enforces coding standards and generates modular structures through automated design pattern selection.
-
๐ Code Reference Mining Agent: Discovers relevant repositories and frameworks through intelligent search algorithms. Analyzes codebases for compatibility and integration potential. Provides recommendations based on similarity metrics and automated dependency analysis.
-
๐ Code Indexing Agent: Builds comprehensive knowledge graphs of discovered codebases. Maintains semantic relationships between code components. Enables intelligent retrieval and cross-reference capabilities.
-
๐งฌ Code Generation Agent: Synthesizes gathered information into executable code implementations. Creates functional interfaces and integrates discovered components. Generates comprehensive test suites and documentation for reproducibility.
๐ง Powered by MCP (Model Context Protocol)
DeepCode leverages the Model Context Protocol (MCP) standard to seamlessly integrate with various tools and services. This standardized approach ensures reliable communication between AI agents and external systems, enabling powerful automation capabilities.
| ๐ ๏ธ MCP Server | ๐ง Primary Function | ๐ก Purpose & Capabilities |
|---|---|---|
| ๐ bocha-mcp | Alternative Search | Secondary search option with independent API access |
| ๐ filesystem | File System Operations | Local file and directory management, read/write operations |
| ๐ fetch | Web Content Retrieval | Fetch and extract content from URLs and web resources |
| ๐ฅ github-downloader | Repository Management | Clone and download GitHub repositories for analysis |
| ๐ file-downloader | Document Processing | Download and convert files (PDF, DOCX, etc.) to Markdown |
| โก command-executor | System Commands | Execute bash/shell commands for environment management |
| ๐งฌ code-implementation | Code Generation Hub | Comprehensive code reproduction with execution and testing |
| ๐ code-reference-indexer | Smart Code Search | Intelligent indexing and search of code repositories |
| ๐ document-segmentation | Smart Document Analysis | Intelligent document segmentation for large papers and technical documents |
| ๐ ๏ธ Function | ๐ฏ Usage Context |
|---|---|
| ๐ read_code_mem | Efficient code context retrieval from memory |
| โ๏ธ write_file | Direct file content generation and modification |
| ๐ execute_python | Python code testing and validation |
| ๐ get_file_structure | Project structure analysis and organization |
| โ๏ธ set_workspace | Dynamic workspace and environment configuration |
| ๐ get_operation_history | Process monitoring and operation tracking |
๐๏ธ Multi-Interface Framework
RESTful API with CLI and web frontends featuring real-time code streaming, interactive debugging, and extensible plugin architecture for CI/CD integration.
๐ Multi-Agent Intelligent Pipeline:
|
๐ก INPUT LAYER ๐ Research Papers โข ๐ฌ Natural Language โข ๐ URLs โข ๐ Requirements |
||
|
๐ฏ CENTRAL ORCHESTRATION Strategic Decision Making โข Workflow Coordination โข Agent Management |
||
|
๐ TEXT ANALYSIS Requirement Processing |
๐ DOCUMENT ANALYSIS Paper & Spec Processing |
|
|
๐ REPRODUCTION PLANNING Deep Paper Analysis โข Code Requirements Parsing โข Reproduction Strategy Development |
||
|
๐ REFERENCE ANALYSIS Repository Discovery |
๐ CODE INDEXING Knowledge Graph Building |
|
|
๐งฌ CODE IMPLEMENTATION Implementation Generation โข Testing โข Documentation |
||
|
โก OUTPUT DELIVERY ๐ฆ Complete Codebase โข ๐งช Test Suite โข ๐ Documentation โข ๐ Deployment Ready |
||
Before installing DeepCode, ensure you have the following:
| Requirement | Version | Purpose |
|---|---|---|
| Python | 3.9+ | Core runtime |
| Node.js | 18+ | New UI frontend |
| npm | 8+ | Package management |
# Check your versions
python --version # Should be 3.9+
node --version # Should be 18+
npm --version # Should be 8+๐ฅ Install Node.js (if not installed)
# macOS (using Homebrew)
brew install node
# Ubuntu/Debian
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Windows
# Download from https://nodejs.org/Choose one of the following installation methods:
# ๐ Install DeepCode package directly
pip install deepcode-hku
# ๐ Download configuration files
curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.config.yaml
curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.secrets.yaml๐ Click to expand development installation options
git clone https://github.com/HKUDS/DeepCode.git
cd DeepCode/
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python=3.13
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
# Install frontend dependencies
npm install --prefix new_ui/frontendgit clone https://github.com/HKUDS/DeepCode.git
cd DeepCode/
pip install -r requirements.txt
# Install frontend dependencies
npm install --prefix new_ui/frontendIf you want the global deepcode command to launch the source tree you are
hacking on, install the project in editable mode after the steps above:
pip install -e .This registers a deepcode-hku package (current version 1.2.0) and exposes
the deepcode CLI entry point. Any local code change is picked up
immediately on next launch โ no reinstall needed.
If you maintain multiple DeepCode checkouts, only one of them can own the
deepcodecommand at a time (the most recentpip install -e .wins). Reinstall in the checkout you currently want to be active.
The following configuration applies to all installation methods (pip, UV, source, and Docker).
Edit mcp_agent.secrets.yaml with your API keys:
# At least ONE provider API key is required
openai:
api_key: "your_openai_api_key"
base_url: "https://openrouter.ai/api/v1" # Optional: for OpenRouter or custom endpoints
anthropic:
api_key: "your_anthropic_api_key" # For Claude models
google:
api_key: "your_google_api_key" # For Gemini models๐ Using OpenAI-compatible providers (OpenRouter / Poe / DashScope / etc.)
The openai block accepts any OpenAI-compatible endpoint. Just override
base_url. Then in mcp_agent.config.yaml set the model name your provider
expects (the default_model, planning_model, and implementation_model
fields under the openai: section).
# mcp_agent.secrets.yaml
openai:
api_key: "your_provider_api_key"
base_url: "https://api.poe.com/v1" # Poe
# base_url: "https://openrouter.ai/api/v1" # OpenRouter
# base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1" # Alibaba DashScope# mcp_agent.config.yaml โ pick the model your provider supports
openai:
default_model: "gpt-5.4"
planning_model: "gpt-5.4"
implementation_model: "gpt-5.4"๐ Never commit
mcp_agent.secrets.yaml. The provided.gitignoreexcludes it, but if you cloned an older snapshot, also rungit rm --cached mcp_agent.secrets.yamlbefore your next push.
Edit mcp_agent.config.yaml to choose your preferred LLM provider (line ~106):
# Options: "google", "anthropic", "openai"
# If not set or unavailable, will automatically fallback to first available provider
llm_provider: "google"Configure web search in mcp_agent.config.yaml:
# For Bocha-MCP (optional) โ set in bocha-mcp.env section
bocha-mcp:
env:
BOCHA_API_KEY: "your_bocha_api_key_here"Control document processing in mcp_agent.config.yaml:
document_segmentation:
enabled: true # true/false โ whether to use intelligent document segmentation
size_threshold_chars: 50000 # Document size threshold to trigger segmentation๐ช Windows Users: Additional MCP Server Configuration
If you're using Windows, you may need to configure MCP servers manually in mcp_agent.config.yaml:
# 1. Install MCP servers globally
npm i -g @modelcontextprotocol/server-filesystem
# 2. Find your global node_modules path
npm -g rootThen update your mcp_agent.config.yaml to use absolute paths:
mcp:
servers:
filesystem:
command: "node"
args: ["C:/Program Files/nodejs/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js", "."]Note: Replace the path with your actual global node_modules path from step 2.
๐ Search Server Configuration (Optional)
DeepCode supports optional Bocha search plus built-in fetch for web content retrieval:
# Default search server configuration
# Option: "bocha-mcp"
default_search_server: "bocha-mcp"Available Options:
- ๐ Bocha-MCP (
"bocha-mcp"): Alternative search server. RequiresBOCHA_API_KEY. Uses local Python server implementation.
Full MCP server configuration in mcp_agent.config.yaml:
# For Bocha-MCP (optional)
bocha-mcp:
command: "python"
args: ["tools/bocha_search_server.py"]
env:
PYTHONPATH: "."
BOCHA_API_KEY: "your_bocha_api_key_here"๐ก Tip: Both search servers require API key configuration. Choose the one that best fits your API access and requirements.
Choose your preferred launch method:
| ๐ณ Docker (Recommended) | ๐ Local โ no Docker | ๐ ๏ธ Other Methods | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
No Python/Node needed โ everything in container. git clone https://github.com/HKUDS/DeepCode.git
cd DeepCode/
cp mcp_agent.secrets.yaml.example \
mcp_agent.secrets.yaml
# Edit secrets with your API keys
./deepcode_docker/run_docker.sh
Release History
Dependencies & License AuditLoading dependencies... Similar Packagesswing-trading-agentMulti-agent swing trading system โ automated screening, research, and execution with backtesting and live trading0.0.0 MaiBotMaiSaka, an LLM-based intelligent agent, is a digital lifeform devoted to understanding you and interacting in the style of a real human. She does not pursue perfection, nor does she seek efficiency; 1.0.0-pre.4 hermes-gate๐๏ธ Hermes Gate โ Terminal TUI for managing remote Hermes Agent sessions with auto-reconnect, detach support, and zero config0.0.0 ComfyUI-LoaderUtils๐ Optimize model loading in ComfyUI with flexible node connections and controlled sequences for better performance and memory management.main@2026-04-21 Paper2Slides๐ Transform research papers into professional slides and posters seamlessly and quickly with Paper2Slides, saving you valuable time.main@2026-04-21 |









