Skip to content
mberkanbicerPublic
forked from HKUDS/DeepCode

About

"DeepCode: Open Agentic Coding (Agent Harness & Loop Engineering & Multi-Agent Orchestration)"

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

931 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DeepCode Logo
    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•
    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
    β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•      β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•
HKUDS%2FDeepCode | Trendshift HKUDS%2FDeepCode | Trendshift

DeepCode Logo DeepCode: Open Agentic Coding

Advancing Code Generation with Multi-Agent Systems

Website β€” hkuds.github.io/DeepCode

Feishu WeChat

πŸ–₯️ Interface Showcase

πŸ–₯️ DeepCode Desktop

DeepCode Desktop coding agent demo

Work with DeepCode in a visual workspace for Sessions, goals, tool activity, code changes, and verification.

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

Watch Video


"Where AI Agents Transform Ideas into Production-Ready Code"


πŸ“‘ Table of Contents

The DeepCode framework: the TUI, Desktop, Web and scripts talk to one local service. Highlighted is what DeepCode adds: completion verified by checks DeepCode runs and an optional independent reviewer, context that keeps your words with automatic stops, and Goals kept across restarts. Self-evolution is planned.


What's new

  • 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.
  • 2026-11-02 β€” Goals you can trust to finish: the agent proposes a checklist, and once you confirm it DeepCode runs those commands itself before it accepts "complete"; an optional independent reviewer checks every requirement, switched on in Settings, and each check is shown on the Goal card. A Goal can have a time limit, stops when it is stuck or keeps repeating itself, wraps up when its budget runs out, and pauses when DeepCode restarts.
Earlier updates
  • 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
  • 2026-07-04 β€” Agent Harness foundation
  • Earlier history: legacy README

All changes: CHANGELOG.md.


What Deep means in DeepCode

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 DeepCode Web client after a real Goal: the agent fixed the code and tests, and the Goal card shows the completion check that passed, with each requirement and its evidence

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.

Quick start

1. Install. With uv:

uv tool install --python 3.12 deepcode-hku
deepcode init

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.

Model connections in DeepCode settings

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 step-by-step tutorial is Your first coding task.

Choosing a client

All clients connect to the same local service, so a session started in one can be continued in any other.

Client Start with Use it for
TUI deepcode Working in the terminal. See The terminal UI.
Web deepcode web 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.

Task Command
Check whether it is running deepcode service status
Read recent logs deepcode service logs --lines 100
Stop after current work finishes deepcode service stop --drain --timeout 60
Start it when you log in deepcode service install --at-login

Upgrades and backups: Upgrading DeepCode. Problems: Troubleshooting.

Requirements and platforms

Python 3.12 or later (CI tests 3.12, 3.13 and 3.14)
Operating systems macOS, Linux and Windows
Tools 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

How a Goal reaches complete: Turns of work, a completion claim, then a rule check, the checks you confirmed and an independent review, with the claim turned back while anything is missing

  • 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.

Details: Security and data. To report a vulnerability, see SECURITY.md.

Documentation

Topic Guide
First task, step by step Getting started
Terminal UI keys and commands The terminal UI
Resume, compact and manage sessions Sessions
Providers, local models, reasoning Models and providers
Project instructions, memory, Skills Skills and memory
Goals, automations, headless runs Goals and automation
Config file and environment variables Configuration
Data, sandbox, approvals Security and data
Startup and connection problems Troubleshooting
Scripts, CI and administration Headless and automation
MCP servers MCP guide
Background service Local background service
Upgrades and backups Upgrading DeepCode
Desktop from source Desktop guide
Paper2Code Paper2Code

Research origin

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.

DeepCode PaperBench results

🎬 Live Demonstrations

These recordings show projects produced by earlier DeepCode workflows. They are output demonstrations rather than screenshots of the current Desktop UI.

πŸ“„ Paper2Code

Research to implementation

Paper2Code demonstration

β–Ά Watch demonstration

Reproduce a research paper as an executable project.

πŸ–ΌοΈ Generated vision project

Image workflow example

Generated image-processing project

β–Ά Watch demonstration

See an earlier generated image-processing workflow in use.

🌐 Generated web project

Frontend implementation example

Generated frontend project

β–Ά Watch demonstration

Follow a complete frontend implementation from idea to result.

The DeepCode V2 introduction video gives a broader walkthrough.


Contributing

Development setup, checks and pull request guidelines are in CONTRIBUTING.md. Everyone who has opened a pull request is listed in CONTRIBUTORS.md.

Support


⭐ Star History

Community growth trajectory

DeepCode Star History chart

πŸš€ Ready to build with DeepCode?

Get started View DeepCode on GitHub Star 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}
}

πŸ“„ License

MIT License

DeepCode is available under the MIT License.
Copyright Β© 2025 Data Intelligence Lab at The University of Hong Kong.

About

"DeepCode: Open Agentic Coding (Agent Harness & Loop Engineering & Multi-Agent Orchestration)"

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages