该项目充分利用了多代理系统的优势,结合了代理循环工程和编排技术,围绕大规模复杂任务构建灵活、可扩展的应用架构。DeepCode 的设计思想在很大程度上参考了当今 AI 和智能代理技术的发展趋势。每一阶段运行的代理能够高效地完成特定任务,并通过消息交互机制、代理状态管理和数据流控制,确保系统具有高度协调性和稳定性。
graph TD
A[用户请求] --> B("接收并分发请求")
B --> C{"多代理解析"}
C -->|"服务执行"| D("执行业务逻辑")
C -->|"监控和调整"| E("调整代理行为")
D --> F("反馈结果")
E --> F("反馈结果")
F --> G("通知用户")
Advancing Code Generation with Multi-Agent Systems
DeepCode provides TUI, Desktop, and Web clients over one shared local service.
They share Projects, Session history, models, Skills, permissions, Goals, and
Automations. Use deepcode, deepcode desktop, or deepcode web; see
Quick start for installation and your first task.
🎬 Introduction Video
🎯 Watch the DeepCode V2 introduction - Long-horizon tasks, loop engineering, the agent harness, and self-evolution in 100 seconds
“Where AI Agents Transform Ideas into Production-Ready Code”
2026-11-23 — deepcode mcp test --all checks every enabled MCP server in
one run, a blocked shell command now tells the agent to use a narrower
command or ask you instead of pointing to a waiver that does not exist, the
Python package ships only DeepCode’s own modules, and the README shows where
DeepCode’s stargazers work and study.
2026-11-17 — Long sessions keep your own words through compaction, a
malformed tool call no longer stalls a session, commands that reach a
protected file through a link are caught, and new README figures show what
DeepCode adds.
2026-11-16 — DeepCode v2.4.0 is out, with community fixes: GPT-5 and
o-series models work with the default settings, file: URLs are checked
against protected paths, memory tidy-up keeps every topic link, and
Paper2Code no longer mistakes reading several files for a loop or splits
sections at a comment in a code block.
Earlier updates
2026-11-02 — Goals you can trust to finish: confirmed checks DeepCode runs itself, an optional independent reviewer, time limits and automatic stops
2026-10-31 — Long tasks read better on the Web, a calmer Web and Desktop interface, and a terminal UI that wraps Chinese text
2026-10-29 — Lighter compaction, checked Goal completion, folder browsing on the Web, and clearer approvals
2026-10-28 — Agent presets that remove tools, file tools that ask before writing hooks, and unpinned MCP packages flagged
2026-10-21 — A quiet Windows service, a separate code font, and community fixes
2026-10-14 — Sessions that keep their history, a tighter sandbox, and the Desktop and Web apps in Chinese
2026-10-13 — Smoother streaming, a self-managing background service, and safer Web sign-in
2026-10-12 — DeepCode v2.3.1: Markdown answers in the TUI, a Windows service that stays up, /compact for coding sessions, and community fixes
2026-10-10 — A steadier terminal UI: answers shown once, keys that keep your draft, and an orderly /compact
2026-09-28 — DeepCode v2.3.0: voice dictation, Opper and Bedrock, Desktop polish, and opt-in hardening
2026-09-09 — TUI, Desktop, and Web share one local background service
2026-09-06 — DeepCode v2.2.0: Session context-window caps, compaction that leaves a memory, and a fully localized Desktop
2026-09-03 — Desktop catalog race, an honest command screen, GLM-5.2, and two dependency bumps
2026-08-28 — Community fixes: plugin credential warnings and a wider zh-CN Desktop
2026-08-25 — Command executors close two bypasses
2026-08-23 — Five repaired contributions land together
2026-08-19 — Sessions that survive resume, compaction, and a second window
2026-08-18 — Steadier context handling in the runtime, and the TUI gets a face
2026-08-17 — Fixes from a review pass over the new settings and TUI work
2026-08-16 — The TUI answers every bare command with a selector
2026-08-15 — Settings grow up: a new settings dialog, declared models, and a safer config
2026-08-14 — Subagent runtime, compaction, and one-way persistence
2026-08-13 — Desktop typography, themes, and native controls
2026-08-12 — Reviewed upstream core Skills, a managed MCP catalog, OAuth, and real connection checks
2026-08-10 — Generic MCP runtime and portable local Plugins
2026-08-09 — Skills now have a real runtime contract
2026-08-07 — Thinking controls, more providers, and a Desktop you can tune
2026-08-04 — Skills that work wherever you do
2026-08-03 — 🎉 DeepCode v2.0 is here
2026-07-31 — One execution model across CLI and Desktop
2026-07-21 — Durable Goals and safe Session lifecycle
2026-07-20 — Session-level model control and shared Skills
2026-07-17 — Durable Session navigation and replay
2026-07-10 — Loop Engineering and parallel agents
2026-07-08 — General coding agent, durable Sessions, and memory
Most Coding Agents can generate code. The hard part is understanding a real
project, making changes within the right boundaries, continuously correcting
course from runtime results, and making it clear why the outcome can be
trusted.
DeepCode is an open-source Coding Agent for real software engineering. Give it
a simple change or a goal that takes dozens of steps. It can understand the
project, work on the code, run tools, verify results, and continue after an
interruption, restart, or model switch.
“Deep” represents four kinds of depth that remain with the task from start to
finish:
Depth
What it means for you
Deep Context
Understand the task through project structure, engineering rules, Skills, Session history, and long-term memory.
Deep Execution
Search, edit, run commands, and execute tests instead of stopping at suggestions—and show the work as it happens.
Deep Verification
Check results with tests, builds, diagnostics, Diffs, and task Artifacts rather than treating a plausible answer as done.
Deep Continuity
Preserve conversations, decisions, tool records, and evidence across time, directories, clients, and model changes.
DeepCode stands out in three ways, numbered as in the figure above:
① Verified completion. When the agent says a Goal is complete, DeepCode
runs the checklist you confirmed itself, and an optional independent
reviewer proves each requirement with evidence. A claim that falls short
goes back to the agent with what is missing.
② Stays on track. Compaction keeps your own words, not only a summary of
them. A Goal stops on its own when it is stuck, repeats itself, or runs out
of budget or time, and you can add requirements, revise it, pause or stop it
while it runs without losing completed work.
③ Persistent Goals. Goals, sessions, checklists and approvals are kept
by a local background service, so the work survives a restart or a closed
window and continues in any client.
Next, DeepCode will learn from its verified runs and turn what worked into
memory and Skills. This self-evolution is planned and not yet in a release.
DeepCode is not designed to make an Agent look busier. It is designed to help
you finish real software engineering work more reliably.
Why DeepCode
One session, four clients. Turns run in a local background service,
not in the window you started them from. The TUI, Desktop, Web and
deepcode exec share the same projects, sessions, models, Skills and
permissions: close the TUI, reopen the session in the browser, and answer
the pending approval there.
You decide what it may do. A folder must be trusted before the agent
works in it. Each session runs under Ask, Read only or Full access, shell
commands run in an OS sandbox under Ask, and repository hooks need your
approval. Every edit shows as a diff, and each Goal keeps its tool calls and
checks.
Any model. Use any of 14 built-in providers, your own OpenAI- or
Anthropic-compatible endpoint, or a local model.
The Web client after a real Goal: the agent fixed two bugs and
added tests, DeepCode ran the confirmed checks, and an independent review proved every
requirement before the Goal counted as complete.
deepcode init creates ~/.deepcode and sets the default access to Ask.
If your shell cannot find deepcode, run uv tool update-shell and open a new
terminal. On Windows, install uv with
winget install --id astral-sh.uv --exact.
2. Add a model. This example uses OpenRouter; any
supported provider works the same way. The key is
read without echo and stored in ~/.deepcode/credentials.json.
deepcode provider set my-openrouter --template openrouter --api-key
deepcode provider models my-openrouter --refresh
deepcode provider test my-openrouter --model MODEL_ID
Replace MODEL_ID with a model from the list. In Desktop or Web you can do the
same under Settings → Models.
3. Run it in a project.
cd /path/to/your-project
deepcode --trust --connection my-openrouter --model MODEL_ID
--trust is needed once per project. Later, run deepcode in that folder and
use /model to switch models. Try a first task:
Explain how this project is organized and how to run its tests.
Do not change any files yet.
The full workbench (diffs, files, terminal, Goals) in your browser, from the same install. See Web client.
Desktop
deepcode desktop
The same workbench as a native app. Runs from a source checkout for now, see below.
Headless
deepcode exec "<task>"
One turn from a script or CI job; --json prints events as NDJSON. deepcode loop "<goal>" runs a Goal. See Headless and automation.
deepcode web --no-open prints the sign-in link instead of opening a browser.
The link works once and expires after 60 seconds.
Desktop
There are no Desktop installers on the Releases page yet. Desktop runs from a
source checkout and needs Node.js 22+, Rust (stable) and the
Tauri 2 prerequisites for your
platform:
git clone https://github.com/HKUDS/DeepCode.git
cd DeepCode
npm --prefix desktop ci
npm --prefix desktop run build:web
uv tool install --python 3.12 --force .
deepcode init
deepcode desktop
The first launch builds the app’s resources and takes a few minutes; keep the
terminal open while Desktop runs. Windows toolchains and troubleshooting are in
the Desktop guide.
The background service
Starting any client starts the service if it is not running. Closing a client
leaves accepted work running; pending approvals wait for you, and the computer
must stay awake.
Git, for change review and worktrees. On Linux, bubblewrap (bwrap) for the command sandbox.
Model
An API key for a supported provider, or a local Ollama or vLLM server. The model must support tool calling; deepcode provider test <id> --agent checks it.
Web client
A current browser on the same computer
Desktop
Node.js 22+, Rust and the Tauri prerequisites (source build)
Core features
Repository work. Reads, searches and edits files, applies patches, runs
commands and tests, and shows each change as a diff.
Getting started
Goals./goal <objective> in the TUI or the Goal panel in Desktop and
Web. The Goal continues across turns and is kept across restarts. Its
completion is checked: DeepCode runs the checklist you confirmed, and an
independent reviewer can prove each requirement (Settings → General). A
token budget or time limit bounds it.
Goals and automation
Sessions and context. Every session is saved with its tool calls,
approvals and Goal state. /resume, /compact and per-session context caps
keep long work going. Sessions
Project instructions and memory. Reads AGENTS.md and CLAUDE.md, and
keeps project notes in .deepcode/memory/.
Skills and memory
Models and providers. Named connections, per-session model and
reasoning effort, and connection checks before use.
Models and providers
Skills and plugins. Reusable instructions from .agents/skills and
~/.agents/skills, eight bundled Skills, and a Skill creator. Plugins
package Skills and MCP servers. Skills ·
Local plugins
MCP. Connects to stdio, SSE and Streamable HTTP servers, with a bundled
catalog and OAuth sign-in. deepcode mcp serve exposes DeepCode itself as an
MCP server. MCP guide
Agent presets and sub-agents. Presets set a persona and narrow the tool
set. Sub-agents can work in separate Git worktrees.
Configuration
Automations. Run a saved instruction on a schedule with the same
agent, permissions and history.
Automations
Voice input. Optional dictation in the Desktop and Web composer.
Voice dictation
Paper2Code. Turn a paper or technical document into a code base.
Paper2Code
Models and providers
Built-in templates: OpenRouter, Requesty, Opper, Forge, Amazon Bedrock,
Anthropic, OpenAI, DeepSeek, Gemini, Zhipu AI, DashScope, MiniMax, Ollama and
vLLM. A Custom connection points at any endpoint that speaks the OpenAI
Chat Completions, OpenAI Responses or Anthropic Messages API.
deepcode provider list shows them and which ones are ready.
Security and data
Data stays on your computer. Settings, sessions, state and logs are under
~/.deepcode (or $DEEPCODE_HOME). Project notes are in
<project>/.deepcode/memory/. DeepCode has no account system and sends no
analytics.
Local service. The background service listens on 127.0.0.1 only (port
3081, or a free port if that is taken). Native clients authenticate with a
private token; the Web client signs in with a one-time link.
Project trust. The agent does not run in a folder you have not trusted.
A project’s own config cannot select Full access, turn off the sandbox or
redirect model requests.
Access presets and approvals.Ask asks before edits and commands and
runs shell commands in an OS sandbox; Read only denies changes; Full
access removes approvals and the sandbox. Your deny rules apply under
every preset.
Hooks. Hooks a repository declares run only after you approve them;
changed hooks wait for deepcode hooks approve.
Credentials. API keys are stored in ~/.deepcode/credentials.json with
owner-only permissions and never returned to a client. Shell commands do not
see them.
What model providers receive. The system prompt, project instructions,
tool definitions, the conversation and tool results (file contents, command
output) go to the endpoint of the connection you chose. providers.egress
can restrict which hosts are allowed. A local model keeps everything on your
machine.
DeepCode started as Paper2Code, a multi-agent system that turns research papers
into working code. On PaperBench it
scored 75.9% on the human-expert subset, above the best reported human
baseline (72.4%). The method is described in
DeepCode: Open Agentic Coding. Paper2Code
is still available in Desktop and Web; see Paper2Code.
🎬 Live Demonstrations
These recordings show projects produced by earlier DeepCode workflows. They
are output demonstrations rather than screenshots of the current Desktop UI.
Community: the Feishu and WeChat groups listed on the
HKUDS profile
⭐ Star History
Community growth trajectory
🚀 Ready to build with DeepCode?
🙏 Appreciation
Thanks to everyone in the open-source community — your stars, issues, pull
requests and discussions shape where DeepCode goes next.
Everyone who has opened a pull request is listed in
CONTRIBUTORS.md, including contributions that predate the
v2.0 rebuild and so are not reflected in the graph above.
📖 Citation
If DeepCode contributes to your research, cite:
@misc{li2025deepcodeopenagenticcoding,
title = {DeepCode: Open Agentic Coding},
author = {Zongwei Li and Zhonghang Li and Zirui Guo and Xubin Ren and Chao Huang},
year = {2025},
eprint = {2512.07921},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/2512.07921}
}
评论