deepcode-hku 1.0.8__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. {deepcode_hku-1.0.8/deepcode_hku.egg-info → deepcode_hku-1.1.0}/PKG-INFO +316 -104
  2. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/README.md +309 -103
  3. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/__init__.py +1 -1
  4. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/cli_app.py +205 -5
  5. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/cli_interface.py +206 -1
  6. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/main_cli.py +65 -10
  7. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/workflows/cli_workflow_adapter.py +79 -1
  8. deepcode_hku-1.1.0/deepcode.py +755 -0
  9. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0/deepcode_hku.egg-info}/PKG-INFO +316 -104
  10. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/deepcode_hku.egg-info/SOURCES.txt +7 -1
  11. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/deepcode_hku.egg-info/requires.txt +6 -0
  12. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/mcp_agent.config.yaml +18 -10
  13. deepcode_hku-1.1.0/mcp_agent.secrets.yaml +14 -0
  14. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/requirements.txt +9 -0
  15. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/code_indexer.py +4 -1
  16. deepcode_hku-1.1.0/ui/components.py +970 -0
  17. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/ui/handlers.py +189 -2
  18. deepcode_hku-1.1.0/ui/layout.py +142 -0
  19. deepcode_hku-1.1.0/ui/sidebar_feed.py +91 -0
  20. deepcode_hku-1.1.0/ui/styles.py +356 -0
  21. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/llm_utils.py +164 -49
  22. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agent_orchestration_engine.py +60 -11
  23. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/code_implementation_workflow.py +34 -13
  24. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/code_implementation_workflow_index.py +30 -11
  25. deepcode_hku-1.1.0/workflows/plugins/__init__.py +12 -0
  26. deepcode_hku-1.1.0/workflows/plugins/base.py +392 -0
  27. deepcode_hku-1.1.0/workflows/plugins/integration.py +283 -0
  28. deepcode_hku-1.1.0/workflows/plugins/plan_review.py +221 -0
  29. deepcode_hku-1.1.0/workflows/plugins/requirement_analysis.py +185 -0
  30. deepcode_hku-1.0.8/deepcode.py +0 -292
  31. deepcode_hku-1.0.8/mcp_agent.secrets.yaml +0 -7
  32. deepcode_hku-1.0.8/ui/components.py +0 -1621
  33. deepcode_hku-1.0.8/ui/layout.py +0 -161
  34. deepcode_hku-1.0.8/ui/styles.py +0 -3909
  35. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/.pre-commit-config.yaml +0 -0
  36. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/LICENSE +0 -0
  37. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/MANIFEST.in +0 -0
  38. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/__init__.py +0 -0
  39. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/cli_launcher.py +0 -0
  40. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/cli/workflows/__init__.py +0 -0
  41. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/deepcode_hku.egg-info/dependency_links.txt +0 -0
  42. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/deepcode_hku.egg-info/entry_points.txt +0 -0
  43. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/deepcode_hku.egg-info/top_level.txt +0 -0
  44. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/prompts/code_prompts.py +0 -0
  45. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/schema/mcp-agent.config.schema.json +0 -0
  46. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/setup.cfg +0 -0
  47. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/setup.py +0 -0
  48. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/__init__.py +0 -0
  49. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/bocha_search_server.py +0 -0
  50. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/code_implementation_server.py +0 -0
  51. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/code_reference_indexer.py +0 -0
  52. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/command_executor.py +0 -0
  53. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/document_segmentation_server.py +0 -0
  54. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/git_command.py +0 -0
  55. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/pdf_converter.py +0 -0
  56. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/pdf_downloader.py +0 -0
  57. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/tools/pdf_utils.py +0 -0
  58. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/ui/__init__.py +0 -0
  59. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/ui/app.py +0 -0
  60. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/ui/streamlit_app.py +0 -0
  61. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/__init__.py +0 -0
  62. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/cli_interface.py +0 -0
  63. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/cross_platform_file_handler.py +0 -0
  64. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/dialogue_logger.py +0 -0
  65. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/file_processor.py +0 -0
  66. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/utils/simple_llm_logger.py +0 -0
  67. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/__init__.py +0 -0
  68. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/__init__.py +0 -0
  69. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/code_implementation_agent.py +0 -0
  70. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/document_segmentation_agent.py +0 -0
  71. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/memory_agent_concise.py +0 -0
  72. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/memory_agent_concise_index.py +0 -0
  73. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/memory_agent_concise_multi.py +0 -0
  74. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/agents/requirement_analysis_agent.py +0 -0
  75. {deepcode_hku-1.0.8 → deepcode_hku-1.1.0}/workflows/codebase_index_workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepcode-hku
3
- Version: 1.0.8
3
+ Version: 1.1.0
4
4
  Summary: AI Research Engine - Transform research papers into working code automatically
5
5
  Home-page: https://github.com/HKUDS/DeepCode
6
6
  Author: DeepCodeTeam
@@ -24,15 +24,21 @@ Requires-Dist: aiohttp>=3.8.0
24
24
  Requires-Dist: anthropic
25
25
  Requires-Dist: asyncio-mqtt
26
26
  Requires-Dist: docling
27
+ Requires-Dist: fastapi>=0.104.0
27
28
  Requires-Dist: google-genai
28
29
  Requires-Dist: mcp-agent
29
30
  Requires-Dist: mcp-server-git
30
31
  Requires-Dist: nest_asyncio
31
32
  Requires-Dist: openai
32
33
  Requires-Dist: pathlib2
34
+ Requires-Dist: pydantic-settings>=2.0.0
33
35
  Requires-Dist: PyPDF2>=2.0.0
36
+ Requires-Dist: python-multipart>=0.0.6
37
+ Requires-Dist: PyYAML>=6.0
34
38
  Requires-Dist: reportlab>=3.5.0
35
39
  Requires-Dist: streamlit
40
+ Requires-Dist: uvicorn>=0.24.0
41
+ Requires-Dist: websockets>=12.0
36
42
  Dynamic: author
37
43
  Dynamic: classifier
38
44
  Dynamic: description
@@ -81,8 +87,9 @@ Dynamic: summary
81
87
  </p> -->
82
88
  <p>
83
89
  <a href="https://github.com/HKUDS/DeepCode/stargazers"><img src='https://img.shields.io/github/stars/HKUDS/DeepCode?color=00d9ff&style=for-the-badge&logo=star&logoColor=white&labelColor=1a1a2e' /></a>
90
+ <a href='https://arxiv.org/abs/2512.07921'><img src="https://img.shields.io/badge/Paper-arXiv-orange?style=for-the-badge&logo=arxiv&logoColor=white&labelColor=1a1a2e"></a>
84
91
  <img src="https://img.shields.io/badge/🐍Python-3.13-4ecdc4?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a2e">
85
- <a href="https://pypi.org/project/deepcode-hku/"><img src="https://img.shields.io/pypi/v/deepcode-hku.svg?style=for-the-badge&logo=pypi&logoColor=white&labelColor=1a1a2e&color=ff6b6b"></a>
92
+ <!-- <a href="https://pypi.org/project/deepcode-hku/"><img src="https://img.shields.io/pypi/v/deepcode-hku.svg?style=for-the-badge&logo=pypi&logoColor=white&labelColor=1a1a2e&color=ff6b6b"></a> -->
86
93
  </p>
87
94
  <p>
88
95
  <a href="https://discord.gg/yF2MmDJyGJ"><img src="https://img.shields.io/badge/💬Discord-Community-7289da?style=for-the-badge&logo=discord&logoColor=white&labelColor=1a1a2e"></a>
@@ -203,6 +210,22 @@ Dynamic: summary
203
210
 
204
211
  ## 📰 News
205
212
 
213
+ 🎨 **[2025-02] New Web UI Experience Upgrade!**
214
+
215
+ - 🔄 **User-in-Loop Interaction**: Support real-time user interaction during workflows - AI asks clarifying questions directly in the chat
216
+ - 💬 **Inline Interaction Design**: Interaction prompts appear naturally within the chat flow for a seamless experience
217
+ - 🚀 **One-Click Launch**: Simply run `deepcode` to start the new UI (cross-platform: Windows/macOS/Linux)
218
+ - 🔧 **Improved Process Management**: Enhanced service start/stop mechanism with automatic port cleanup
219
+ - 📡 **WebSocket Real-time Communication**: Fixed message loss issues, ensuring proper interaction state synchronization
220
+
221
+ <div align="center">
222
+ <img src="./assets/NewUI.png" alt="DeepCode New UI" width="85%" style="border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);" />
223
+ <br/>
224
+ <sub><em>DeepCode New Web UI - Modern React-based Interface</em></sub>
225
+ </div>
226
+
227
+ ---
228
+
206
229
  🎉 **[2025-10] 🎉 [2025-10-28] DeepCode Achieves SOTA on PaperBench!**
207
230
 
208
231
  DeepCode sets new benchmarks on OpenAI's PaperBench Code-Dev across all categories:
@@ -570,10 +593,44 @@ Implementation Generation • Testing • Documentation
570
593
 
571
594
  ## 🚀 Quick Start
572
595
 
596
+ ### 📋 **Prerequisites**
597
+
598
+ Before installing DeepCode, ensure you have the following:
573
599
 
600
+ | Requirement | Version | Purpose |
601
+ |-------------|---------|---------|
602
+ | **Python** | 3.9+ | Core runtime |
603
+ | **Node.js** | 18+ | New UI frontend |
604
+ | **npm** | 8+ | Package management |
605
+
606
+ ```bash
607
+ # Check your versions
608
+ python --version # Should be 3.9+
609
+ node --version # Should be 18+
610
+ npm --version # Should be 8+
611
+ ```
612
+
613
+ <details>
614
+ <summary><strong>📥 Install Node.js (if not installed)</strong></summary>
615
+
616
+ ```bash
617
+ # macOS (using Homebrew)
618
+ brew install node
619
+
620
+ # Ubuntu/Debian
621
+ curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
622
+ sudo apt-get install -y nodejs
623
+
624
+ # Windows
625
+ # Download from https://nodejs.org/
626
+ ```
627
+
628
+ </details>
574
629
 
575
630
  ### 📦 **Step 1: Installation**
576
631
 
632
+ Choose one of the following installation methods:
633
+
577
634
  #### ⚡ **Direct Installation (Recommended)**
578
635
 
579
636
  ```bash
@@ -583,29 +640,6 @@ pip install deepcode-hku
583
640
  # 🔑 Download configuration files
584
641
  curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.config.yaml
585
642
  curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.secrets.yaml
586
-
587
- # 🔑 Configure API keys (required)
588
- # Edit mcp_agent.secrets.yaml with your API keys and base_url:
589
- # - openai: api_key, base_url (for OpenAI/custom endpoints)
590
- # - anthropic: api_key (for Claude models)
591
- # - google: api_key (for Gemini models)
592
-
593
- # 🤖 Select your preferred LLM provider (optional)
594
- # Edit mcp_agent.config.yaml to choose your LLM (line ~106):
595
- # - llm_provider: "google" # Use Google Gemini models
596
- # - llm_provider: "anthropic" # Use Anthropic Claude models
597
- # - llm_provider: "openai" # Use OpenAI/compatible models
598
- # Note: If not set or unavailable, will automatically fallback to first available provider
599
-
600
- # 🔑 Configure search API keys for web search (optional)
601
- # Edit mcp_agent.config.yaml to set your API keys:
602
- # - For Brave Search: Set BRAVE_API_KEY: "your_key_here" in brave.env section (line ~28)
603
- # - For Bocha-MCP: Set BOCHA_API_KEY: "your_key_here" in bocha-mcp.env section (line ~74)
604
-
605
- # 📄 Configure document segmentation (optional)
606
- # Edit mcp_agent.config.yaml to control document processing:
607
- # - enabled: true/false (whether to use intelligent document segmentation)
608
- # - size_threshold_chars: 50000 (document size threshold to trigger segmentation)
609
643
  ```
610
644
 
611
645
  #### 🔧 **Development Installation (From Source)**
@@ -616,79 +650,91 @@ curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.secrets.
616
650
  ##### 🔥 **Using UV (Recommended for Development)**
617
651
 
618
652
  ```bash
619
- # 🔽 Clone the repository
620
653
  git clone https://github.com/HKUDS/DeepCode.git
621
654
  cd DeepCode/
622
655
 
623
- # 📦 Install UV package manager
624
656
  curl -LsSf https://astral.sh/uv/install.sh | sh
625
-
626
- # 🔧 Install dependencies with UV
627
657
  uv venv --python=3.13
628
658
  source .venv/bin/activate # On Windows: .venv\Scripts\activate
629
659
  uv pip install -r requirements.txt
630
660
 
631
- # 🔑 Configure API keys (required)
632
- # Edit mcp_agent.secrets.yaml with your API keys and base_url:
633
- # - openai: api_key, base_url (for OpenAI/custom endpoints)
634
- # - anthropic: api_key (for Claude models)
635
- # - google: api_key (for Gemini models)
636
-
637
- # 🤖 Select your preferred LLM provider (optional)
638
- # Edit mcp_agent.config.yaml to choose your LLM (line ~106):
639
- # - llm_provider: "google" # Use Google Gemini models
640
- # - llm_provider: "anthropic" # Use Anthropic Claude models
641
- # - llm_provider: "openai" # Use OpenAI/compatible models
642
- # Note: If not set or unavailable, will automatically fallback to first available provider
643
-
644
- # 🔑 Configure search API keys for web search (optional)
645
- # Edit mcp_agent.config.yaml to set your API keys:
646
- # - For Brave Search: Set BRAVE_API_KEY: "your_key_here" in brave.env section (line ~28)
647
- # - For Bocha-MCP: Set BOCHA_API_KEY: "your_key_here" in bocha-mcp.env section (line ~74)
648
-
649
- # 📄 Configure document segmentation (optional)
650
- # Edit mcp_agent.config.yaml to control document processing:
651
- # - enabled: true/false (whether to use intelligent document segmentation)
652
- # - size_threshold_chars: 50000 (document size threshold to trigger segmentation)
661
+ # Install frontend dependencies
662
+ npm install --prefix new_ui/frontend
653
663
  ```
654
664
 
655
665
  ##### 🐍 **Using Traditional pip**
656
666
 
657
667
  ```bash
658
- # 🔽 Clone the repository
659
668
  git clone https://github.com/HKUDS/DeepCode.git
660
669
  cd DeepCode/
661
670
 
662
- # 📦 Install dependencies
663
671
  pip install -r requirements.txt
664
672
 
665
- # 🔑 Configure API keys (required)
666
- # Edit mcp_agent.secrets.yaml with your API keys and base_url:
667
- # - openai: api_key, base_url (for OpenAI/custom endpoints)
668
- # - anthropic: api_key (for Claude models)
669
- # - google: api_key (for Gemini models)
670
-
671
- # 🤖 Select your preferred LLM provider (optional)
672
- # Edit mcp_agent.config.yaml to choose your LLM (line ~106):
673
- # - llm_provider: "google" # Use Google Gemini models
674
- # - llm_provider: "anthropic" # Use Anthropic Claude models
675
- # - llm_provider: "openai" # Use OpenAI/compatible models
676
- # Note: If not set or unavailable, will automatically fallback to first available provider
677
-
678
- # 🔑 Configure search API keys for web search (optional)
679
- # Edit mcp_agent.config.yaml to set your API keys:
680
- # - For Brave Search: Set BRAVE_API_KEY: "your_key_here" in brave.env section (line ~28)
681
- # - For Bocha-MCP: Set BOCHA_API_KEY: "your_key_here" in bocha-mcp.env section (line ~74)
682
-
683
- # 📄 Configure document segmentation (optional)
684
- # Edit mcp_agent.config.yaml to control document processing:
685
- # - enabled: true/false (whether to use intelligent document segmentation)
686
- # - size_threshold_chars: 50000 (document size threshold to trigger segmentation)
673
+ # Install frontend dependencies
674
+ npm install --prefix new_ui/frontend
687
675
  ```
688
676
 
689
677
  </details>
690
678
 
691
- #### 🪟 **Windows Users: Additional MCP Server Configuration**
679
+ ### 🔧 **Step 2: Configuration**
680
+
681
+ > The following configuration applies to **all installation methods** (pip, UV, source, and Docker).
682
+
683
+ #### 🔑 API Keys *(required)*
684
+
685
+ Edit `mcp_agent.secrets.yaml` with your API keys:
686
+
687
+ ```yaml
688
+ # At least ONE provider API key is required
689
+ openai:
690
+ api_key: "your_openai_api_key"
691
+ base_url: "https://openrouter.ai/api/v1" # Optional: for OpenRouter or custom endpoints
692
+
693
+ anthropic:
694
+ api_key: "your_anthropic_api_key" # For Claude models
695
+
696
+ google:
697
+ api_key: "your_google_api_key" # For Gemini models
698
+ ```
699
+
700
+ #### 🤖 LLM Provider *(optional)*
701
+
702
+ Edit `mcp_agent.config.yaml` to choose your preferred LLM provider (line ~106):
703
+
704
+ ```yaml
705
+ # Options: "google", "anthropic", "openai"
706
+ # If not set or unavailable, will automatically fallback to first available provider
707
+ llm_provider: "google"
708
+ ```
709
+
710
+ #### 🔍 Search API Keys *(optional)*
711
+
712
+ Configure web search in `mcp_agent.config.yaml`:
713
+
714
+ ```yaml
715
+ # For Brave Search (default) — set in brave.env section (line ~28)
716
+ brave:
717
+ env:
718
+ BRAVE_API_KEY: "your_brave_api_key_here"
719
+
720
+ # For Bocha-MCP (alternative) — set in bocha-mcp.env section (line ~74)
721
+ bocha-mcp:
722
+ env:
723
+ BOCHA_API_KEY: "your_bocha_api_key_here"
724
+ ```
725
+
726
+ #### 📄 Document Segmentation *(optional)*
727
+
728
+ Control document processing in `mcp_agent.config.yaml`:
729
+
730
+ ```yaml
731
+ document_segmentation:
732
+ enabled: true # true/false — whether to use intelligent document segmentation
733
+ size_threshold_chars: 50000 # Document size threshold to trigger segmentation
734
+ ```
735
+
736
+ <details>
737
+ <summary><strong>🪟 Windows Users: Additional MCP Server Configuration</strong></summary>
692
738
 
693
739
  If you're using Windows, you may need to configure MCP servers manually in `mcp_agent.config.yaml`:
694
740
 
@@ -716,7 +762,10 @@ mcp:
716
762
 
717
763
  > **Note**: Replace the path with your actual global node_modules path from step 2.
718
764
 
719
- #### 🔍 **Search Server Configuration (Optional)**
765
+ </details>
766
+
767
+ <details>
768
+ <summary><strong>🔍 Search Server Configuration (Optional)</strong></summary>
720
769
 
721
770
  DeepCode supports multiple search servers for web search functionality. You can configure your preferred option in `mcp_agent.config.yaml`:
722
771
 
@@ -727,17 +776,10 @@ default_search_server: "brave"
727
776
  ```
728
777
 
729
778
  **Available Options:**
730
- - **🔍 Brave Search** (`"brave"`):
731
- - Default option with high-quality search results
732
- - Requires BRAVE_API_KEY configuration
733
- - Recommended for most users
734
-
735
- - **🌐 Bocha-MCP** (`"bocha-mcp"`):
736
- - Alternative search server option
737
- - Requires BOCHA_API_KEY configuration
738
- - Uses local Python server implementation
779
+ - **🔍 Brave Search** (`"brave"`): Default option with high-quality search results. Requires `BRAVE_API_KEY`. Recommended for most users.
780
+ - **🌐 Bocha-MCP** (`"bocha-mcp"`): Alternative search server. Requires `BOCHA_API_KEY`. Uses local Python server implementation.
739
781
 
740
- **API Key Configuration in mcp_agent.config.yaml:**
782
+ **Full MCP server configuration in mcp_agent.config.yaml:**
741
783
  ```yaml
742
784
  # For Brave Search (default) - around line 28
743
785
  brave:
@@ -757,49 +799,196 @@ bocha-mcp:
757
799
 
758
800
  > **💡 Tip**: Both search servers require API key configuration. Choose the one that best fits your API access and requirements.
759
801
 
760
- ### ⚡ **Step 2: Launch Application**
802
+ </details>
803
+
804
+ ### ⚡ **Step 3: Launch Application**
805
+
806
+ #### 🐳 **Docker** (Recommended — Easiest Setup)
807
+
808
+ No need to install Python, Node.js, or any dependencies — everything runs inside the container.
809
+
810
+ **Prerequisites:** Install [Docker Desktop](https://www.docker.com/products/docker-desktop) (includes Docker Engine + Docker Compose).
811
+
812
+ ```bash
813
+ # 1. Clone the repository (if not already done)
814
+ git clone https://github.com/HKUDS/DeepCode.git
815
+ cd DeepCode/
816
+
817
+ # 2. Configure your API keys (see Step 2: Configuration above)
818
+ cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml
819
+ # Edit mcp_agent.secrets.yaml with your API keys
820
+
821
+ # 3. Start with one command
822
+ ./deepcode_docker/run_docker.sh # Build & start (auto-builds on first run)
761
823
 
762
- #### 🚀 **Using Installed Package (Recommended)**
824
+ # Access at http://localhost:8000
825
+ ```
826
+
827
+ **Management Commands:**
828
+ ```bash
829
+ ./deepcode_docker/run_docker.sh stop # Stop the service
830
+ ./deepcode_docker/run_docker.sh restart # Restart (after config changes, no rebuild needed)
831
+ ./deepcode_docker/run_docker.sh --build # Rebuild (after code changes)
832
+ ./deepcode_docker/run_docker.sh logs # View real-time logs
833
+ ./deepcode_docker/run_docker.sh status # Check service status
834
+ ./deepcode_docker/run_docker.sh clean # Remove containers and images
835
+ ```
763
836
 
837
+ Or use Docker Compose directly:
764
838
  ```bash
765
- # 🌐 Launch web interface directly
839
+ docker compose -f deepcode_docker/docker-compose.yml up --build # Build and start
840
+ docker compose -f deepcode_docker/docker-compose.yml up -d # Start in background
841
+ docker compose -f deepcode_docker/docker-compose.yml down # Stop
842
+ docker compose -f deepcode_docker/docker-compose.yml logs -f # View logs
843
+ ```
844
+
845
+ > **💡 Config changes don't need rebuild**: `mcp_agent.config.yaml` and `mcp_agent.secrets.yaml` are mounted as volumes — just edit them and run `./deepcode_docker/run_docker.sh restart`.
846
+ >
847
+ > **💡 Windows users**: Run `docker compose -f deepcode_docker/docker-compose.yml up --build` directly if the shell script is not available.
848
+
849
+ #### 🚀 **Using `deepcode` Command** (Local Installation)
850
+
851
+ ```bash
852
+ # 🌐 Launch the new React-based web interface
766
853
  deepcode
767
854
 
768
- # The application will automatically start at http://localhost:8501
855
+ # Frontend: http://localhost:5173
856
+ # Backend API: http://localhost:8000
857
+ # Press Ctrl+C to stop all services
769
858
  ```
859
+ <div align="center">
860
+ <img src="https://img.shields.io/badge/Frontend-localhost:5173-00d4ff?style=flat-square&logo=react&logoColor=white" alt="Frontend" />
861
+ <img src="https://img.shields.io/badge/Backend-localhost:8000-4ecdc4?style=flat-square&logo=fastapi&logoColor=white" alt="Backend" />
862
+ </div>
863
+
864
+ > **📦 Auto Install**: On first run, dependencies are automatically installed (`pip install` for backend, `npm install` for frontend)
770
865
 
771
- #### 🛠️ **Using Source Code**
866
+ > **✨ Features**: User-in-Loop interaction, real-time progress tracking, inline chat interaction
772
867
 
773
- Choose your preferred interface:
868
+ #### 🛠️ **Alternative Launch Methods**
869
+
870
+ <table>
871
+ <tr>
872
+ <td><strong>🍎 macOS / 🐧 Linux</strong></td>
873
+ <td><strong>🪟 Windows</strong></td>
874
+ </tr>
875
+ <tr>
876
+ <td>
774
877
 
775
- ##### 🌐 **Web Interface** (Recommended)
776
878
  ```bash
777
- # Using UV
778
- uv run streamlit run ui/streamlit_app.py
779
- # Or using traditional Python
780
- streamlit run ui/streamlit_app.py
879
+ # Using run.sh
880
+ ./run.sh
881
+
882
+ # Or using Python directly
883
+ python deepcode.py
884
+ ```
885
+
886
+ </td>
887
+ <td>
888
+
889
+ ```cmd
890
+ # Using run.bat
891
+ run.bat
892
+
893
+ # Or using Python directly
894
+ python deepcode.py
895
+ ```
896
+
897
+ </td>
898
+ </tr>
899
+ </table>
900
+
901
+ ```bash
902
+ # Classic Streamlit UI (all platforms)
903
+ deepcode --classic
781
904
  ```
782
905
  <div align="center">
783
- <img src="https://img.shields.io/badge/Access-localhost:8501-00d4ff?style=flat-square&logo=streamlit&logoColor=white" alt="Web Access" />
906
+ <img src="https://img.shields.io/badge/Classic_UI-localhost:8501-00d4ff?style=flat-square&logo=streamlit&logoColor=white" alt="Classic UI" />
784
907
  </div>
785
908
 
786
909
  ##### 🖥️ **CLI Interface** (Advanced Users)
787
910
  ```bash
788
- # Using UV
789
- uv run python cli/main_cli.py
790
- # Or using traditional Python
911
+ # CLI via Docker (no local Python needed)
912
+ ./deepcode_docker/run_docker.sh cli
913
+
914
+ # Or: deepcode --cli
915
+
916
+ # CLI locally (requires Python environment)
791
917
  python cli/main_cli.py
792
918
  ```
793
919
  <div align="center">
794
920
  <img src="https://img.shields.io/badge/Mode-Interactive_Terminal-9b59b6?style=flat-square&logo=terminal&logoColor=white" alt="CLI Mode" />
795
921
  </div>
796
922
 
797
- ### 🎯 **Step 3: Generate Code**
923
+ ### 🎯 **Step 4: Generate Code**
798
924
 
799
925
  1. **📄 Input**: Upload your research paper, provide requirements, or paste a URL
800
926
  2. **🤖 Processing**: Watch the multi-agent system analyze and plan
801
927
  3. **⚡ Output**: Receive production-ready code with tests and documentation
802
928
 
929
+ ---
930
+
931
+ ### 🔧 **Troubleshooting**
932
+
933
+ <details>
934
+ <summary><strong>❓ Common Issues & Solutions</strong></summary>
935
+
936
+ #### 🐳 Docker build fails with `tsc: not found`
937
+
938
+ ```
939
+ node_modules/.bin/tsc: line 1: ../typescript/bin/tsc: not found
940
+ ```
941
+
942
+ **Cause**: Corrupted Docker build cache.
943
+
944
+ **Fix**: Clear the cache and rebuild:
945
+ ```bash
946
+ docker builder prune -f
947
+ docker compose -f deepcode_docker/docker-compose.yml build --no-cache
948
+ docker compose -f deepcode_docker/docker-compose.yml up -d
949
+ ```
950
+
951
+ #### 🐳 Docker command returns `error during connect` / `cannot find the file specified`
952
+
953
+ **Cause**: Docker Desktop is not running.
954
+
955
+ **Fix**: Start **Docker Desktop** from the Start menu (Windows) or Applications (macOS), wait until it's fully ready, then retry.
956
+
957
+ #### 🌐 Frontend displays abnormally or shows a blank page
958
+
959
+ **Cause**: Corrupted `node_modules` — frontend dependencies are incomplete.
960
+
961
+ **Fix**: Reinstall frontend dependencies:
962
+ ```bash
963
+ cd new_ui/frontend
964
+ rm -rf node_modules
965
+ npm install
966
+ ```
967
+
968
+ Then rebuild (for Docker) or restart (for local mode).
969
+
970
+ #### 🌐 Browser shows `ERR_CONNECTION_REFUSED` or JSON response instead of UI
971
+
972
+ **Cause**: Accessing the wrong port or backend not running.
973
+
974
+ **Fix**:
975
+ - **Docker mode** (`deepcode`): Access **http://localhost:8000**. Make sure the container is running: `docker ps`
976
+ - **Local mode** (`deepcode --local`): Access **http://localhost:5173** (not 8000). Port 5173 is the frontend dev server.
977
+
978
+ #### 📦 `npm install` fails with `Could not read package.json`
979
+
980
+ **Cause**: Running `npm install` in the project root instead of the frontend directory.
981
+
982
+ **Fix**: Run it in the correct directory:
983
+ ```bash
984
+ npm install --prefix new_ui/frontend
985
+ ```
986
+
987
+ #### 🪟 Windows: MCP servers not working
988
+
989
+ See the [Windows MCP Server Configuration](#-step-2-configuration) section above for setting up absolute paths.
990
+
991
+ </details>
803
992
 
804
993
  ---
805
994
 
@@ -925,8 +1114,32 @@ We're continuously enhancing DeepCode with exciting new features:
925
1114
 
926
1115
  ---
927
1116
 
1117
+ <div align="left">
1118
+
1119
+ ### 📖 **Citation**
1120
+
1121
+
1122
+ If you find DeepCode useful in your research or applications, please kindly cite:
1123
+
1124
+ ```
1125
+ @misc{li2025deepcodeopenagenticcoding,
1126
+ title={DeepCode: Open Agentic Coding},
1127
+ author={Zongwei Li and Zhonghang Li and Zirui Guo and Xubin Ren and Chao Huang},
1128
+ year={2025},
1129
+ eprint={2512.07921},
1130
+ archivePrefix={arXiv},
1131
+ primaryClass={cs.SE},
1132
+ url={https://arxiv.org/abs/2512.07921},
1133
+ }
1134
+ ```
1135
+
1136
+ ---
1137
+
1138
+
928
1139
  ### 📄 **License**
929
1140
 
1141
+ <div align="center">
1142
+
930
1143
  <img src="https://img.shields.io/badge/License-MIT-4ecdc4?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="MIT License">
931
1144
 
932
1145
  **MIT License** - Copyright (c) 2025 Data Intelligence Lab, The University of Hong Kong
@@ -934,7 +1147,6 @@ We're continuously enhancing DeepCode with exciting new features:
934
1147
  ---
935
1148
 
936
1149
 
937
-
938
1150
  <img src="https://visitor-badge.laobi.icu/badge?page_id=deepcode.readme&style=for-the-badge&color=00d4ff" alt="Visitors">
939
1151
 
940
1152
  </div>