deepcode-hku 1.0.1__py3-none-any.whl

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 (44) hide show
  1. cli/__init__.py +18 -0
  2. cli/cli_app.py +296 -0
  3. cli/cli_interface.py +744 -0
  4. cli/cli_launcher.py +155 -0
  5. cli/main_cli.py +243 -0
  6. cli/workflows/__init__.py +11 -0
  7. cli/workflows/cli_workflow_adapter.py +336 -0
  8. deepcode.py +219 -0
  9. deepcode_hku-1.0.1.dist-info/METADATA +695 -0
  10. deepcode_hku-1.0.1.dist-info/RECORD +44 -0
  11. deepcode_hku-1.0.1.dist-info/WHEEL +5 -0
  12. deepcode_hku-1.0.1.dist-info/entry_points.txt +2 -0
  13. deepcode_hku-1.0.1.dist-info/licenses/LICENSE +21 -0
  14. deepcode_hku-1.0.1.dist-info/top_level.txt +6 -0
  15. tools/__init__.py +0 -0
  16. tools/code_implementation_server.py +1045 -0
  17. tools/code_indexer.py +1657 -0
  18. tools/code_reference_indexer.py +486 -0
  19. tools/command_executor.py +324 -0
  20. tools/git_command.py +356 -0
  21. tools/pdf_converter.py +640 -0
  22. tools/pdf_downloader.py +1370 -0
  23. tools/pdf_utils.py +52 -0
  24. ui/__init__.py +43 -0
  25. ui/app.py +13 -0
  26. ui/components.py +1450 -0
  27. ui/handlers.py +773 -0
  28. ui/layout.py +106 -0
  29. ui/streamlit_app.py +38 -0
  30. ui/styles.py +2116 -0
  31. utils/__init__.py +17 -0
  32. utils/cli_interface.py +459 -0
  33. utils/dialogue_logger.py +671 -0
  34. utils/file_processor.py +426 -0
  35. utils/simple_llm_logger.py +198 -0
  36. workflows/__init__.py +31 -0
  37. workflows/agent_orchestration_engine.py +1371 -0
  38. workflows/agents/__init__.py +13 -0
  39. workflows/agents/code_implementation_agent.py +1093 -0
  40. workflows/agents/memory_agent_concise.py +923 -0
  41. workflows/agents/memory_agent_concise_index.py +935 -0
  42. workflows/code_implementation_workflow.py +924 -0
  43. workflows/code_implementation_workflow_index.py +931 -0
  44. workflows/codebase_index_workflow.py +726 -0
@@ -0,0 +1,695 @@
1
+ Metadata-Version: 2.4
2
+ Name: deepcode-hku
3
+ Version: 1.0.1
4
+ Summary: (
5
+ Home-page: https://github.com/HKUDS/DeepCode
6
+ Author: DeepCodeTeam
7
+ Project-URL: Documentation, https://github.com/HKUDS/DeepCode
8
+ Project-URL: Source, https://github.com/HKUDS/DeepCode
9
+ Project-URL: Tracker, https://github.com/HKUDS/DeepCode/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Text Processing :: Linguistic
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: aiofiles>=0.8.0
23
+ Requires-Dist: aiohttp>=3.8.0
24
+ Requires-Dist: anthropic
25
+ Requires-Dist: asyncio-mqtt
26
+ Requires-Dist: docling
27
+ Requires-Dist: mcp-agent
28
+ Requires-Dist: mcp-server-git
29
+ Requires-Dist: nest_asyncio
30
+ Requires-Dist: pathlib2
31
+ Requires-Dist: PyPDF2>=2.0.0
32
+ Requires-Dist: reportlab>=3.5.0
33
+ Requires-Dist: streamlit
34
+ Dynamic: author
35
+ Dynamic: classifier
36
+ Dynamic: description
37
+ Dynamic: description-content-type
38
+ Dynamic: home-page
39
+ Dynamic: license-file
40
+ Dynamic: project-url
41
+ Dynamic: requires-dist
42
+ Dynamic: requires-python
43
+ Dynamic: summary
44
+
45
+ <div align="center">
46
+
47
+ <table style="border: none; margin: 0 auto; padding: 0; border-collapse: collapse;">
48
+ <tr>
49
+ <td align="center" style="vertical-align: middle; padding: 10px; border: none; width: 250px;">
50
+ <img src="assets/logo.png" alt="DeepCode Logo" width="200" style="margin: 0; padding: 0; display: block;"/>
51
+ </td>
52
+ <td align="left" style="vertical-align: middle; padding: 10px 0 10px 30px; border: none;">
53
+ <pre style="font-family: 'Courier New', monospace; font-size: 16px; color: #0EA5E9; margin: 0; padding: 0; text-shadow: 0 0 10px #0EA5E9, 0 0 20px rgba(14,165,233,0.5); line-height: 1.2; transform: skew(-1deg, 0deg); display: block;"> ██████╗ ███████╗███████╗██████╗ ██████╗ ██████╗ ██████╗ ███████╗
54
+ ██╔══██╗██╔════╝██╔════╝██╔══██╗██╔════╝██╔═══██╗██╔══██╗██╔════╝
55
+ ██║ ██║█████╗ █████╗ ██████╔╝██║ ██║ ██║██║ ██║█████╗
56
+ ██║ ██║██╔══╝ ██╔══╝ ██╔═══╝ ██║ ██║ ██║██║ ██║██╔══╝
57
+ ██████╔╝███████╗███████╗██║ ╚██████╗╚██████╔╝██████╔╝███████╗
58
+ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝</pre>
59
+ </td>
60
+ </tr>
61
+ </table>
62
+
63
+ <!-- <img src="https://readme-typing-svg.herokuapp.com?font=Russo+One&size=28&duration=2000&pause=800&color=06B6D4&background=00000000&center=true&vCenter=true&width=800&height=50&lines=%E2%9A%A1+OPEN+AGENTIC+CODING+%E2%9A%A1" alt="DeepCode Tech Subtitle" style="margin-top: 5px; filter: drop-shadow(0 0 12px #06B6D4) drop-shadow(0 0 24px rgba(6,182,212,0.4));"/> -->
64
+
65
+ # <img src="https://github.com/Zongwei9888/Experiment_Images/raw/43c585dca3d21b8e4b6390d835cdd34dc4b4b23d/DeepCode_images/title_logo.svg" alt="DeepCode Logo" width="32" height="32" style="vertical-align: middle; margin-right: 8px;"/> DeepCode: Open Agentic Coding
66
+
67
+ ### *Advancing Code Generation with Multi-Agent Systems*
68
+
69
+ <!-- <p align="center">
70
+ <img src="https://img.shields.io/badge/Version-1.0.0-00d4ff?style=for-the-badge&logo=rocket&logoColor=white" alt="Version">
71
+
72
+ <img src="https://img.shields.io/badge/License-MIT-4ecdc4?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="License">
73
+ <img src="https://img.shields.io/badge/AI-Multi--Agent-9b59b6?style=for-the-badge&logo=brain&logoColor=white" alt="AI">
74
+ <img src="https://img.shields.io/badge/HKU-Data_Intelligence_Lab-f39c12?style=for-the-badge&logo=university&logoColor=white" alt="HKU">
75
+ </p> -->
76
+ <p>
77
+ <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>
78
+ <img src="https://img.shields.io/badge/🐍Python-3.13-4ecdc4?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a2e">
79
+ <a href="https://pypi.org/project/deepcode/"><img src="https://img.shields.io/pypi/v/deepcode.svg?style=for-the-badge&logo=pypi&logoColor=white&labelColor=1a1a2e&color=ff6b6b"></a>
80
+ </p>
81
+ <p>
82
+ <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>
83
+ <a href="https://github.com/HKUDS/DeepCode/issues/11"><img src="https://img.shields.io/badge/💬WeChat-Group-07c160?style=for-the-badge&logo=wechat&logoColor=white&labelColor=1a1a2e"></a>
84
+ </p>
85
+ <div align="center">
86
+ <div style="width: 100%; height: 2px; margin: 20px 0; background: linear-gradient(90deg, transparent, #00d9ff, transparent);"></div>
87
+ </div>
88
+
89
+ <div align="center">
90
+ <a href="#-quick-start" style="text-decoration: none;">
91
+ <img src="https://img.shields.io/badge/Quick%20Start-Get%20Started%20Now-00d9ff?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e">
92
+ </a>
93
+ </div>
94
+
95
+ ### 🖥️ **Interface Showcase**
96
+
97
+ <table align="center" width="100%" style="border: none; border-collapse: collapse; margin: 30px 0;">
98
+ <tr>
99
+ <td width="50%" align="center" style="vertical-align: top; padding: 20px;">
100
+
101
+ #### 🖥️ **CLI Interface**
102
+ **Terminal-Based Development**
103
+
104
+ <div align="center">
105
+
106
+ <img src="https://github.com/Zongwei9888/Experiment_Images/blob/8882a7313c504ca97ead6e7b36c51aa761b6a4f3/DeepCode_images/CLI.gif" alt="CLI Interface Demo" width="100%" style="border-radius: 10px; box-shadow: 0 8px 20px rgba(45,55,72,0.3); margin: 15px 0;"/>
107
+
108
+ <div style="background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%); border-radius: 12px; padding: 15px; margin: 15px 0; color: white;">
109
+ <strong>🚀 Advanced Terminal Experience</strong><br/>
110
+ <small>⚡ Fast command-line workflow<br/>🔧 Developer-friendly interface<br/>📊 Real-time progress tracking</small>
111
+ </div>
112
+
113
+ *Professional terminal interface for advanced users and CI/CD integration*
114
+ </div>
115
+
116
+ </td>
117
+ <td width="50%" align="center" style="vertical-align: top; padding: 20px;">
118
+
119
+ #### 🌐 **Web Interface**
120
+ **Visual Interactive Experience**
121
+
122
+ <div align="center">
123
+
124
+ <img src="https://github.com/Zongwei9888/Experiment_Images/raw/8882a7313c504ca97ead6e7b36c51aa761b6a4f3/DeepCode_images/UI.gif" alt="Web Interface Demo" width="100%" style="border-radius: 10px; box-shadow: 0 8px 20px rgba(14,165,233,0.3); margin: 15px 0;"/>
125
+
126
+ <div style="background: linear-gradient(135deg, #0EA5E9 0%, #00D4FF 100%); border-radius: 12px; padding: 15px; margin: 15px 0; color: white;">
127
+ <strong>🎨 Modern Web Dashboard</strong><br/>
128
+ <small>🖱️ Intuitive drag-and-drop<br/>📱 Responsive design<br/>🎯 Visual progress tracking</small>
129
+ </div>
130
+
131
+ *Beautiful web interface with streamlined workflow for all skill levels*
132
+ </div>
133
+
134
+ </td>
135
+ </tr>
136
+ </table>
137
+
138
+
139
+
140
+
141
+
142
+ > *"Where AI Agents Transform Ideas into Production-Ready Code"*
143
+
144
+ </div>
145
+
146
+ ---
147
+
148
+ ## 📑 Table of Contents
149
+
150
+ - [🚀 Key Features](#-key-features)
151
+ - [🏗️ Architecture](#️-architecture)
152
+ - [🚀 Quick Start](#-quick-start)
153
+ - [💡 Examples](#-examples)
154
+ - [🎬 Live Demonstrations](#-live-demonstrations)
155
+ - [⭐ Star History](#-star-history)
156
+ - [📄 License](#-license)
157
+
158
+ ---
159
+
160
+ ## 🚀 Key Features
161
+
162
+ <br/>
163
+
164
+ <table align="center" width="100%" style="border: none; table-layout: fixed;">
165
+ <tr>
166
+ <td width="30%" align="center" style="vertical-align: top; padding: 20px;">
167
+
168
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
169
+ <h3 style="margin: 0; padding: 0;">🚀 <strong>Paper2Code</strong></h3>
170
+ </div>
171
+
172
+ <div align="center" style="margin: 15px 0;">
173
+ <img src="https://img.shields.io/badge/ALGORITHM-IMPLEMENTATION-ff6b6b?style=for-the-badge&logo=algorithm&logoColor=white" alt="Algorithm Badge" />
174
+ </div>
175
+
176
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
177
+ <p align="center"><strong>Automated Implementation of Complex Algorithms</strong></p>
178
+ </div>
179
+
180
+ <div style="height: 60px; display: flex; align-items: center; justify-content: center;">
181
+ <p align="center">Effortlessly converts complex algorithms from research papers into <strong>high-quality</strong>, <strong>production-ready</strong> code, accelerating algorithm reproduction.</p>
182
+ </div>
183
+
184
+
185
+
186
+ </td>
187
+ <td width="30%" align="center" style="vertical-align: top; padding: 20px;">
188
+
189
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
190
+ <h3 style="margin: 0; padding: 0;">🎨 <strong>Text2Web</strong></h3>
191
+ </div>
192
+
193
+ <div align="center" style="margin: 15px 0;">
194
+ <img src="https://img.shields.io/badge/FRONTEND-DEVELOPMENT-4ecdc4?style=for-the-badge&logo=react&logoColor=white" alt="Frontend Badge" />
195
+ </div>
196
+
197
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
198
+ <p align="center"><strong>Automated Front-End Web Development</strong></p>
199
+ </div>
200
+
201
+ <div style="height: 60px; display: flex; align-items: center; justify-content: center;">
202
+ <p align="center">Translates plain textual descriptions into <strong>fully functional</strong>, <strong>visually appealing</strong> front-end web code for rapid interface creation.</p>
203
+ </div>
204
+
205
+
206
+
207
+ </td>
208
+ <td width="30%" align="center" style="vertical-align: top; padding: 20px;">
209
+
210
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
211
+ <h3 style="margin: 0; padding: 0;">⚙️ <strong>Text2Backend</strong></h3>
212
+ </div>
213
+
214
+ <div align="center" style="margin: 15px 0;">
215
+ <img src="https://img.shields.io/badge/BACKEND-DEVELOPMENT-9b59b6?style=for-the-badge&logo=server&logoColor=white" alt="Backend Badge" />
216
+ </div>
217
+
218
+ <div style="height: 80px; display: flex; align-items: center; justify-content: center;">
219
+ <p align="center"><strong>Automated Back-End Development</strong></p>
220
+ </div>
221
+
222
+ <div style="height: 60px; display: flex; align-items: center; justify-content: center;">
223
+ <p align="center">Generates <strong>efficient</strong>, <strong>scalable</strong>, and <strong>feature-rich</strong> back-end code from simple text inputs, streamlining server-side development.</p>
224
+ </div>
225
+
226
+
227
+
228
+ </td>
229
+ </tr>
230
+ </table>
231
+
232
+ <br/>
233
+
234
+ ### 🎯 **Autonomous Multi-Agent Workflow**
235
+
236
+ **The Challenges**:
237
+
238
+ - 📄 **Implementation Complexity**: Converting academic papers and complex algorithms into working code requires significant technical effort and domain expertise
239
+
240
+ - 🔬 **Research Bottleneck**: Researchers spend valuable time implementing algorithms instead of focusing on their core research and discovery work
241
+
242
+ - ⏱️ **Development Delays**: Product teams experience long wait times between concept and testable prototypes, slowing down innovation cycles
243
+
244
+ - 🔄 **Repetitive Coding**: Developers repeatedly implement similar patterns and functionality instead of building on existing solutions
245
+
246
+ **DeepCode** addresses these workflow inefficiencies by providing reliable automation for common development tasks, streamlining your development workflow from concept to code.
247
+
248
+ <div align="center">
249
+
250
+ ```mermaid
251
+ flowchart LR
252
+ A["📄 Research Papers<br/>💬 Text Prompts<br/>🌐 URLs & Document<br/>📎 Files: PDF, DOC, PPTX, TXT, HTML"] --> B["🧠 DeepCode<br/>Multi-Agent Engine"]
253
+ B --> C["🚀 Algorithm Implementation <br/>🎨 Frontend Development <br/>⚙️ Backend Development"]
254
+
255
+ style A fill:#ff6b6b,stroke:#c0392b,stroke-width:2px,color:#000
256
+ style B fill:#00d4ff,stroke:#0984e3,stroke-width:3px,color:#000
257
+ style C fill:#00b894,stroke:#00a085,stroke-width:2px,color:#000
258
+ ```
259
+
260
+ </div>
261
+
262
+ ---
263
+
264
+ ## 🏗️ Architecture
265
+
266
+ ### 📊 **System Overview**
267
+
268
+ **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.
269
+
270
+ 🎯 **Technical Capabilities**:
271
+
272
+ 🧬 **Research-to-Production Pipeline**<br>
273
+ 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.
274
+
275
+ 🪄 **Natural Language Code Synthesis**<br>
276
+ 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.
277
+
278
+ ⚡ **Automated Prototyping Engine**<br>
279
+ 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.
280
+
281
+ 💎 **Quality Assurance Automation**<br>
282
+ Integrated static analysis with automated unit test generation and documentation synthesis. Employs AST analysis for code correctness and property-based testing for comprehensive coverage.
283
+
284
+ 🔮 **CodeRAG Integration System**<br>
285
+ 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.
286
+
287
+ ---
288
+
289
+ ### 🔧 **Core Techniques**
290
+
291
+ - 🧠 **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. <br>
292
+
293
+ - **💾 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. <br>
294
+
295
+ - **🔍 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.
296
+
297
+ ---
298
+
299
+ ### 🤖 **Multi-Agent Architecture of DeepCode**:
300
+
301
+ - **🎯 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. <br>
302
+
303
+ - **📝 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. <br>
304
+
305
+ - **📄 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. <br>
306
+
307
+ - **🏗️ 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.<br>
308
+
309
+ - **🔍 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. <br>
310
+
311
+ - **📚 Code Indexing Agent**: Builds comprehensive knowledge graphs of discovered codebases. Maintains semantic relationships between code components. Enables intelligent retrieval and cross-reference capabilities. <br>
312
+
313
+ - **🧬 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.
314
+
315
+ ---
316
+
317
+ #### 🛠️ **Implementation Tools Matrix**
318
+
319
+ | 🛠️ Tool | 🔧 Function | 💡 Purpose |
320
+ |----------|-------------|------------|
321
+ | **📄 read_code_mem** | Read code summary from memory | Efficient code context retrieval |
322
+ | **✍️ write_file** | Write file contents | Code file generation |
323
+ | **🐍 execute_python** | Execute Python code | Code testing and validation |
324
+ | **⚡ execute_bash** | Execute bash commands | Environment setup and package management |
325
+ | **🔗 search_code_reference** | Search GitHub repositories | Automated CodeRAG and repository discovery |
326
+ | **📁 get_file_structure** | Get directory structure | Project organization |
327
+ | **⚙️ set_workspace** | Set working directory | Environment configuration |
328
+ | **📊 get_operation_history** | Track operations | Process monitoring |
329
+ | **🔍 brave** | Web search via Brave API | Real-time information retrieval |
330
+ | **📂 filesystem** | File system operations | File and directory management |
331
+ | **🌐 fetch** | Fetch content from URLs | Web content extraction |
332
+ | **📥 github-downloader** | Download GitHub repositories | Repository content acquisition |
333
+ | **📋 file-downloader** | Download files and PDFs | Document processing |
334
+
335
+
336
+ ---
337
+
338
+ 🎛️ **Multi-Interface Framework**<br>
339
+ RESTful API with CLI and web frontends featuring real-time code streaming, interactive debugging, and extensible plugin architecture for CI/CD integration.
340
+
341
+ **🚀 Multi-Agent Intelligent Pipeline:**
342
+
343
+ <div align="center">
344
+
345
+ ### 🌟 **Intelligence Processing Flow**
346
+
347
+ <table align="center" width="100%" style="border: none; border-collapse: collapse;">
348
+ <tr>
349
+ <td colspan="3" align="center" style="padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 15px; color: white; font-weight: bold;">
350
+ 💡 <strong>INPUT LAYER</strong><br/>
351
+ 📄 Research Papers • 💬 Natural Language • 🌐 URLs • 📋 Requirements
352
+ </td>
353
+ </tr>
354
+ <tr><td colspan="3" height="20"></td></tr>
355
+ <tr>
356
+ <td colspan="3" align="center" style="padding: 15px; background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); border-radius: 12px; color: white; font-weight: bold;">
357
+ 🎯 <strong>CENTRAL ORCHESTRATION</strong><br/>
358
+ Strategic Decision Making • Workflow Coordination • Agent Management
359
+ </td>
360
+ </tr>
361
+ <tr><td colspan="3" height="15"></td></tr>
362
+ <tr>
363
+ <td align="center" style="padding: 12px; background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%); border-radius: 10px; color: white; width: 50%;">
364
+ 📝 <strong>TEXT ANALYSIS</strong><br/>
365
+ <small>Requirement Processing</small>
366
+ </td>
367
+ <td width="10"></td>
368
+ <td align="center" style="padding: 12px; background: linear-gradient(135deg, #8c7ae6 0%, #9c88ff 100%); border-radius: 10px; color: white; width: 50%;">
369
+ 📄 <strong>DOCUMENT ANALYSIS</strong><br/>
370
+ <small>Paper & Spec Processing</small>
371
+ </td>
372
+ </tr>
373
+ <tr><td colspan="3" height="15"></td></tr>
374
+ <tr>
375
+ <td colspan="3" align="center" style="padding: 15px; background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%); border-radius: 12px; color: white; font-weight: bold;">
376
+ 📋 <strong>REPRODUCTION PLANNING</strong><br/>
377
+ Deep Paper Analysis • Code Requirements Parsing • Reproduction Strategy Development
378
+ </td>
379
+ </tr>
380
+ <tr><td colspan="3" height="15"></td></tr>
381
+ <tr>
382
+ <td align="center" style="padding: 12px; background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%); border-radius: 10px; color: white; width: 50%;">
383
+ 🔍 <strong>REFERENCE ANALYSIS</strong><br/>
384
+ <small>Repository Discovery</small>
385
+ </td>
386
+ <td width="10"></td>
387
+ <td align="center" style="padding: 12px; background: linear-gradient(135deg, #e056fd 0%, #f368e0 100%); border-radius: 10px; color: white; width: 50%;">
388
+ 📚 <strong>CODE INDEXING</strong><br/>
389
+ <small>Knowledge Graph Building</small>
390
+ </td>
391
+ </tr>
392
+ <tr><td colspan="3" height="15"></td></tr>
393
+ <tr>
394
+ <td colspan="3" align="center" style="padding: 15px; background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%); border-radius: 12px; color: white; font-weight: bold;">
395
+ 🧬 <strong>CODE IMPLEMENTATION</strong><br/>
396
+ Implementation Generation • Testing • Documentation
397
+ </td>
398
+ </tr>
399
+ <tr><td colspan="3" height="15"></td></tr>
400
+ <tr>
401
+ <td colspan="3" align="center" style="padding: 20px; background: linear-gradient(135deg, #045de9 0%, #09c6f9 100%); border-radius: 15px; color: white; font-weight: bold;">
402
+ ⚡ <strong>OUTPUT DELIVERY</strong><br/>
403
+ 📦 Complete Codebase • 🧪 Test Suite • 📚 Documentation • 🚀 Deployment Ready
404
+ </td>
405
+ </tr>
406
+ </table>
407
+
408
+ </div>
409
+
410
+ <div align="center">
411
+ <br/>
412
+
413
+ ### 🔄 **Process Intelligence Features**
414
+
415
+ <table align="center" style="border: none;">
416
+ <tr>
417
+ <td align="center" width="25%" style="padding: 15px;">
418
+ <div style="background: #f8f9fa; border-radius: 10px; padding: 15px; border-left: 4px solid #ff6b6b;">
419
+ <h4>🎯 Adaptive Flow</h4>
420
+ <p><small>Dynamic agent selection based on input complexity</small></p>
421
+ </div>
422
+ </td>
423
+ <td align="center" width="25%" style="padding: 15px;">
424
+ <div style="background: #f8f9fa; border-radius: 10px; padding: 15px; border-left: 4px solid #4ecdc4;">
425
+ <h4>🧠 Smart Coordination</h4>
426
+ <p><small>Intelligent task distribution and parallel processing</small></p>
427
+ </div>
428
+ </td>
429
+ <td align="center" width="25%" style="padding: 15px;">
430
+ <div style="background: #f8f9fa; border-radius: 10px; padding: 15px; border-left: 4px solid #45b7d1;">
431
+ <h4>🔍 Context Awareness</h4>
432
+ <p><small>Deep understanding through CodeRAG integration</small></p>
433
+ </div>
434
+ </td>
435
+ <td align="center" width="25%" style="padding: 15px;">
436
+ <div style="background: #f8f9fa; border-radius: 10px; padding: 15px; border-left: 4px solid #96ceb4;">
437
+ <h4>⚡ Quality Assurance</h4>
438
+ <p><small>Automated testing and validation throughout</small></p>
439
+ </div>
440
+ </td>
441
+ </tr>
442
+ </table>
443
+
444
+ </div>
445
+
446
+ ---
447
+
448
+ ## 🚀 Quick Start
449
+
450
+
451
+
452
+ ### 📦 **Step 1: Installation**
453
+
454
+ #### ⚡ **Direct Installation (Recommended)**
455
+
456
+ ```bash
457
+ # 🚀 Install DeepCode package directly
458
+ pip install deepcode
459
+
460
+ # 🔑 Download configuration files
461
+ curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.config.yaml
462
+ curl -O https://raw.githubusercontent.com/HKUDS/DeepCode/main/mcp_agent.secrets.yaml
463
+
464
+ # 🔑 Configure API keys (required)
465
+ # Edit mcp_agent.secrets.yaml with your API keys and base_url:
466
+ # - openai: api_key, base_url (for OpenAI/custom endpoints)
467
+ # - anthropic: api_key (for Claude models)
468
+
469
+ # 🔑 Configure BRAVE_API_KEY for web search (optional)
470
+ # Edit mcp_agent.config.yaml and update BRAVE_API_KEY under brave.env section
471
+ ```
472
+
473
+ #### 🔧 **Development Installation (From Source)**
474
+
475
+ <details>
476
+ <summary><strong>📂 Click to expand development installation options</strong></summary>
477
+
478
+ ##### 🔥 **Using UV (Recommended for Development)**
479
+
480
+ ```bash
481
+ # 🔽 Clone the repository
482
+ git clone https://github.com/HKUDS/DeepCode.git
483
+ cd DeepCode/
484
+
485
+ # 📦 Install UV package manager
486
+ curl -LsSf https://astral.sh/uv/install.sh | sh
487
+
488
+ # 🔧 Install dependencies with UV
489
+ uv venv --python=3.13
490
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
491
+ uv pip install -r requirements.txt
492
+
493
+ # 🔑 Configure API keys (required)
494
+ # Edit mcp_agent.secrets.yaml with your API keys and base_url:
495
+ # - openai: api_key, base_url (for OpenAI/custom endpoints)
496
+ # - anthropic: api_key (for Claude models)
497
+
498
+ # 🔑 Configure BRAVE_API_KEY for web search (optional)
499
+ # Edit mcp_agent.config.yaml and update BRAVE_API_KEY under brave.env section
500
+ ```
501
+
502
+ ##### 🐍 **Using Traditional pip**
503
+
504
+ ```bash
505
+ # 🔽 Clone the repository
506
+ git clone https://github.com/HKUDS/DeepCode.git
507
+ cd DeepCode/
508
+
509
+ # 📦 Install dependencies
510
+ pip install -r requirements.txt
511
+
512
+ # 🔑 Configure API keys (required)
513
+ # Edit mcp_agent.secrets.yaml with your API keys and base_url:
514
+ # - openai: api_key, base_url (for OpenAI/custom endpoints)
515
+ # - anthropic: api_key (for Claude models)
516
+
517
+ # 🔑 Configure BRAVE_API_KEY for web search (optional)
518
+ # Edit mcp_agent.config.yaml and update BRAVE_API_KEY under brave.env section
519
+ ```
520
+
521
+ </details>
522
+
523
+ ### ⚡ **Step 2: Launch Application**
524
+
525
+ #### 🚀 **Using Installed Package (Recommended)**
526
+
527
+ ```bash
528
+ # 🌐 Launch web interface directly
529
+ deepcode
530
+
531
+ # The application will automatically start at http://localhost:8501
532
+ ```
533
+
534
+ #### 🛠️ **Using Source Code**
535
+
536
+ Choose your preferred interface:
537
+
538
+ ##### 🌐 **Web Interface** (Recommended)
539
+ ```bash
540
+ # Using UV
541
+ uv run streamlit run ui/streamlit_app.py
542
+ # Or using traditional Python
543
+ streamlit run ui/streamlit_app.py
544
+ ```
545
+ <div align="center">
546
+ <img src="https://img.shields.io/badge/Access-localhost:8501-00d4ff?style=flat-square&logo=streamlit&logoColor=white" alt="Web Access" />
547
+ </div>
548
+
549
+ ##### 🖥️ **CLI Interface** (Advanced Users)
550
+ ```bash
551
+ # Using UV
552
+ uv run python cli/main_cli.py
553
+ # Or using traditional Python
554
+ python cli/main_cli.py
555
+ ```
556
+ <div align="center">
557
+ <img src="https://img.shields.io/badge/Mode-Interactive_Terminal-9b59b6?style=flat-square&logo=terminal&logoColor=white" alt="CLI Mode" />
558
+ </div>
559
+
560
+ ### 🎯 **Step 3: Generate Code**
561
+
562
+ 1. **📄 Input**: Upload your research paper, provide requirements, or paste a URL
563
+ 2. **🤖 Processing**: Watch the multi-agent system analyze and plan
564
+ 3. **⚡ Output**: Receive production-ready code with tests and documentation
565
+
566
+
567
+ ---
568
+
569
+ ## 💡 Examples
570
+
571
+
572
+
573
+ ### 🎬 **Live Demonstrations**
574
+
575
+
576
+
577
+ <table align="center">
578
+ <tr>
579
+ <td width="33%" align="center">
580
+
581
+ #### 📄 **Paper2Code Demo**
582
+ **Research to Implementation**
583
+
584
+ <div align="center">
585
+ <a href="https://www.youtube.com/watch?v=MQZYpLkzsbw">
586
+ <img src="https://img.youtube.com/vi/MQZYpLkzsbw/maxresdefault.jpg" alt="Paper2Code Demo" width="100%" style="border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);"/>
587
+ </a>
588
+
589
+ **[▶️ Watch Demo](https://www.youtube.com/watch?v=MQZYpLkzsbw)**
590
+
591
+ *Transform academic papers into production-ready code automatically*
592
+ </div>
593
+
594
+ </td>
595
+ <td width="33%" align="center">
596
+
597
+ #### 🖼️ **Image Processing Demo**
598
+ **AI-Powered Image Tools**
599
+
600
+ <div align="center">
601
+ <a href="https://www.youtube.com/watch?v=nFt5mLaMEac">
602
+ <img src="https://img.youtube.com/vi/nFt5mLaMEac/maxresdefault.jpg" alt="Image Processing Demo" width="100%" style="border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);"/>
603
+ </a>
604
+
605
+ **[▶️ Watch Demo](https://www.youtube.com/watch?v=nFt5mLaMEac)**
606
+
607
+ *Intelligent image processing with background removal and enhancement*
608
+ </div>
609
+
610
+ </td>
611
+ <td width="33%" align="center">
612
+
613
+ #### 🌐 **Frontend Implementation**
614
+ **Complete Web Application**
615
+
616
+ <div align="center">
617
+ <a href="https://www.youtube.com/watch?v=78wx3dkTaAU">
618
+ <img src="https://img.youtube.com/vi/78wx3dkTaAU/maxresdefault.jpg" alt="Frontend Demo" width="100%" style="border-radius: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);"/>
619
+ </a>
620
+
621
+ **[▶️ Watch Demo](https://www.youtube.com/watch?v=78wx3dkTaAU)**
622
+
623
+ *Full-stack web development from concept to deployment*
624
+ </div>
625
+
626
+ </td>
627
+ </tr>
628
+ </table>
629
+
630
+
631
+
632
+ ### 🚀 **Coming Soon**
633
+
634
+ We're continuously enhancing DeepCode with exciting new features:
635
+
636
+ #### 🔧 **Enhanced Code Reliability & Validation**
637
+ - **Automated Testing**: Comprehensive functionality testing with execution verification and error detection.
638
+ - **Code Quality Assurance**: Multi-level validation through static analysis, dynamic testing, and performance benchmarking.
639
+ - **Smart Debugging**: AI-powered error detection with automatic correction suggestions
640
+
641
+ #### 📊 **PaperBench Performance Showcase**
642
+ - **Benchmark Dashboard**: Comprehensive performance metrics on the PaperBench evaluation suite.
643
+ - **Accuracy Metrics**: Detailed comparison with state-of-the-art paper reproduction systems.
644
+ - **Success Analytics**: Statistical analysis across paper categories and complexity levels.
645
+
646
+ #### ⚡ **System-wide Optimizations**
647
+ - **Performance Boost**: Multi-threaded processing and optimized agent coordination for faster generation.
648
+ - **Enhanced Reasoning**: Advanced reasoning capabilities with improved context understanding.
649
+ - **Expanded Support**: Extended compatibility with additional programming languages and frameworks.
650
+
651
+ ---
652
+
653
+ ## ⭐ Star History
654
+
655
+ <div align="center">
656
+
657
+ *Community Growth Trajectory*
658
+
659
+ <a href="https://star-history.com/#HKUDS/DeepCode&Date">
660
+ <picture>
661
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=HKUDS/DeepCode&type=Date&theme=dark" />
662
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=HKUDS/DeepCode&type=Date" />
663
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=HKUDS/DeepCode&type=Date" style="border-radius: 15px; box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);" />
664
+ </picture>
665
+ </a>
666
+
667
+ </div>
668
+
669
+ ---
670
+
671
+ ### 🚀 **Ready to Transform Development?**
672
+
673
+ <div align="center">
674
+
675
+ <p>
676
+ <a href="#-quick-start"><img src="https://img.shields.io/badge/🚀_Get_Started-00d4ff?style=for-the-badge&logo=rocket&logoColor=white" alt="Get Started"></a>
677
+ <a href="https://github.com/HKUDS"><img src="https://img.shields.io/badge/🏛️_View_on_GitHub-00d4ff?style=for-the-badge&logo=github&logoColor=white" alt="View on GitHub"></a>
678
+ <a href="https://github.com/HKUDS/deepcode-agent"><img src="https://img.shields.io/badge/⭐_Star_Project-00d4ff?style=for-the-badge&logo=star&logoColor=white" alt="Star Project"></a>
679
+ </p>
680
+
681
+ ---
682
+
683
+ ### 📄 **License**
684
+
685
+ <img src="https://img.shields.io/badge/License-MIT-4ecdc4?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="MIT License">
686
+
687
+ **MIT License** - Copyright (c) 2025 Data Intelligence Lab, The University of Hong Kong
688
+
689
+ ---
690
+
691
+
692
+
693
+ <img src="https://visitor-badge.laobi.icu/badge?page_id=deepcode.readme&style=for-the-badge&color=00d4ff" alt="Visitors">
694
+
695
+ </div>