Overseas access: www.kdjingpai.com
Bookmark Us

DeepCode is an open-source framework for coding intelligent bodies, developed by the Data Intelligence Laboratory of the University of Hong Kong (HKUDS). It uses a multi-intelligent body system to understand complex instructions and convert them into code automatically. The core goal of this framework is to address the efficiency of the process from idea to code implementation. Users can input research papers, functional description text, URLs, or local documents, and DeepCode's intelligences will work collaboratively to analyze requirements, retrieve information, plan, write, and test code, and ultimately generate a complete code project that can be used directly. It mainly contains three core functions: Paper2Code, which is used to convert algorithms in academic papers into executable code; Text2Web, which is used to generate front-end web interfaces from text descriptions; and Text2Backend, which is used to generate back-end service logic. The whole system has a clear architecture, with a central coordinating intelligence to dispatch sub-intelligences with different functions, simulating an efficient software development team, aiming to help researchers and developers free themselves from repetitive coding work and focus more on innovation.

 

Function List

  • Paper2Code: Automatically analyze research papers, extract their core algorithms and logic, and implement them into high-quality, production-environment usable code, dramatically accelerating the reproduction of scholarly results.
  • Text2Web:: Automatically generate fully functional, interface-optimized front-end web application code based on simple text descriptions provided by the user.
  • Text2Backend: Generate efficient, scalable back-end service code from textual requirements, including API interfaces, database structures, etc.
  • Autonomous multi-intelligence workflow: The system has a built-in team of multiple specialized intelligences, including coordination, intent understanding, document parsing, code planning, and code generation intelligences, which autonomously collaborate on complex code generation tasks.
  • Advanced Code Retrieval Augmented Generation (CodeRAG): Combines semantic vector embedding and graph-based dependency analysis techniques to automatically discover and utilize optimal libraries and implementation patterns from large-scale codebases.
  • Multi-Interface Support: Provides both command line (CLI) and web (Web) interfaces to satisfy different users' habits. The web interface supports real-time observation of the code generation process, which is very intuitive.
  • Intelligent Document Segmentation: When an input document (e.g., a PDF paper) is too long beyond the model's processing limitations, the system automatically performs intelligent segmentation to ensure that code generation is based on an understanding of the full text.

Using Help

DeepCode provides a complete tool chain that allows users to quickly turn ideas into code. Below is a detailed installation and usage process.

Step 1: Prepare the environment and API key

Before using DeepCode, you need to prepare some necessary API keys, because DeepCode's intelligences need to call the Large Language Model (LLM) and search tools to accomplish tasks.

  1. Large Language Model API Key:
    • You need to have an OpenAI or Anthropic account and obtain the corresponding API key.DeepCode supports the GPT family of models and the Claude Series Models.
      .
  2. Web Search API Key (optional):
    • In order for an intelligent body to go online and search for the latest information or find open source code repositories, it is recommended to configure an API key for a web search tool.DeepCode recommends Brave Search by default.

Have the keys you obtained ready, they will be used in subsequent configuration steps.

Step 2: Install DeepCode

DeepCode's installation process is very straightforward and it is recommended to use the pip Perform the installation, which ensures that you are using the stable version.

  1. Open your terminal (command line tool)The
  2. Install the DeepCode package:
    Run the following command to install the main package.

    pip install deepcode-hku
    
  3. Download Configuration File:
    Once the installation is complete, you will need to download two core configuration files. These two files are in charge of the program's behavior and keys.

    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
    

    These two commands will download mcp_agent.config.yaml(main configuration file) and mcp_agent.secrets.yaml(key file) to your current directory.

Step 3: Configure the API key

This is the most critical step, you need to fill in the corresponding configuration file with the key you prepared in the first step.

  1. Edit the key file:
    Open it with your favorite text editor (e.g. VS Code, Sublime Text, or Notepad). mcp_agent.secrets.yaml Documentation.
  2. Fill in the large language model key:
    The content of the file is structured as follows, and you only need to replace the your_key_here Just replace it with your own key. If you are using a customized OpenAI interface address, you can also modify the base_urlThe

    # 示例:
    # - openai:
    #     api_key: "sk-..."
    #     base_url: "https://api.openai.com/v1"
    # - anthropic:
    #     api_key: "sk-ant-..."
    
  3. Configure network search key (optional):
    show (a ticket) mcp_agent.config.yaml file. Find the brave.env In part, it will BRAVE_API_KEY value is set to your Brave Search API key.

    # 在 mcp_agent.config.yaml 文件中,大约在第28行
    brave:
    command: "npx"
    args: ["-y", "@modelcontextprotocol/server-brave-search"]
    env:
    BRAVE_API_KEY: "your_brave_api_key_here" # <--- 在这里填入你的密钥
    

Step 4: Launch the DeepCode app

Once the configuration is complete, you can launch DeepCode's web interface.

  1. Run the startup command in a terminal:
    deepcode
    
  2. Access to the web interface:
    After the command is run, the program automatically opens in the browser http://localhost:8501Now you can see the DeepCode interface. Now you can see the DeepCode interface.

Step 5: Using DeepCode to generate code

The web interface is very intuitive and is divided into an input area, a configuration area and an output area.

  1. Select Task Mode:
    In the interface, you can see the Paper2CodeText2WebText2Backend and other options. First choose a mode according to your needs.
  2. Providing input information:
    • Uploading files: If you want to turn a paper into code, you can upload the PDF file directly.
    • input text: If you want to create a web page or back-end service, you can describe your needs in detail in a text box. For example, "Please help me create a user login page that needs to have username and password input boxes, and a login button."
    • Provide URL: You can also provide a URL with detailed information.
  3. start generating:
    Click "Generate" or similar button, DeepCode's multi-intelligence system will start working. You can see the thinking process and work logs of each intelligence in real time on the interface, such as "Intent understanding intelligence is analyzing requirements", "Code planning intelligence is designing project structure", etc. This process is completely transparent. This process is completely transparent.
  4. Getting the output:
    After the task is completed, DeepCode provides a complete code project. You'll usually get a downloadable zip containing the source code, dependency files, test files, and related documentation in a ready-to-run project.

With the above steps, you can utilize the powerful capabilities of DeepCode to automate many complex coding tasks.

application scenario

  1. Academic researchers
    After reading a paper about a novel algorithm, researchers want to quickly verify its effectiveness. They can use DeepCode's Paper2Code feature to upload a PDF file of the paper, and DeepCode's intelligent system will automatically parse the mathematical formulas, pseudo-code, and implementation logic of the paper, and generate corresponding high-quality Python or Java code with accompanying test cases. This allows researchers to free themselves from the tedious work of algorithm reproduction and focus their efforts on algorithm evaluation and improvement.
  2. Front-end development and product prototyping
    A product manager or front-end developer wants to quickly create a prototype of a new web application to demonstrate to his superiors. He can enter a description into DeepCode's Text2Web feature, such as, "Create a responsive portfolio website with four pages: home, about me, project showcase, and contact. The home page needs to have an eye-catching header and a work preview grid." DeepCode generates the complete front-end code (HTML, CSS, JavaScript), which developers can directly modify and iterate on, dramatically reducing the time it takes to go from idea to visible prototype.
  3. Rapid setup of back-end services
    A startup team needs to develop a backend service for their mobile application to manage user data and handle business logic. The technical lead of the team can use the Text2Backend feature and enter the requirement, "Develop a Node.js-based user management API that needs to support user registration, login, information query and modification functions, and use MongoDB to store data." DeepCode is able to generate a complete backend project structure including API routing, database model and business logic controllers, helping teams quickly build stable and reliable backend services.

QA

  1. What exactly is DeepCode?
    DeepCode is an open source, code generation platform based on a multi-intelligent body system. Unlike traditional code snippet generation tools, it simulates the workflow of a development team, collaborating with AI intelligences in different roles to understand complex textual or documentation requirements and automatically generating structured, directly deployable application code.
  2. Do I need to pay to use DeepCode? What API keys does it require?
    DeepCode itself is open source and free, following the MIT license. However, it relies on third-party Large Language Modeling (LLM) services for its operation, such as OpenAI's GPT family or Anthropic's Claude family of models. Therefore, you need to prepare your own API keys for these services and bear the costs incurred by using these APIs. In addition, if you need networked search functionality, you will need to configure API keys for search tools such as Brave Search.
  3. If I provide a very long paper or document, can DeepCode handle it?
    DeepCode has a built-in Smart Document Segmentation feature. When it detects that the length of the input document may exceed the single processing limit of the large language model, it will automatically cut the document into multiple logically related semantic blocks, analyze and understand the blocks, and then synthesize all the information for code planning and generation to ensure that key information is not lost.
  4. What is the quality of code generated by DeepCode? Can it be used directly in a production environment?
    DeepCode is designed to generate "production-ready" code, taking into account code structure, modularity and maintainability. It also automatically generates unit tests and documentation to ensure code quality. Although the generated code is of high quality, a final Code Review and full testing by a human developer is highly recommended before formal deployment to a production environment.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish