HKUDS/DeepCode

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

DeepCode: Open Agentic Coding

DeepCode is an open-source coding agent — a program that helps you write, modify, and verify code in real software projects. Instead of just suggesting code, it can actually work inside your project: search, edit files, run commands, run tests, and keep going until a task is done. It's designed for long, multi-step tasks that require understanding a whole codebase, not just a single function.

What makes it "deep"?

The name refers to four kinds of depth that stay with a task from start to finish:

  • Deep Context – Understands the project structure, coding rules, past sessions, and long-term memory.
  • Deep Execution – Actually runs commands and edits files, showing you what it does as it happens.
  • Deep Verification – Checks results with tests, builds, and diffs — it doesn't just say "done" without proof.
  • Deep Continuity – Keeps conversations, decisions, and evidence across time, folders, and even different devices.

Key features

  • Goal-based tasks – You give it a goal (e.g., "fix this bug and add tests"), and it works through multiple steps, checks its own work, and only reports completion after running the checks you confirmed.
  • Multiple interfaces – You can use it in a terminal (TUI), a web browser, a desktop app, or from a script (headless). All share the same projects and sessions.
  • Background service – Work continues even if you close the window. You can reopen the session later and pick up where it left off.
  • Permission controls – You decide what it can do. It must trust a folder before working in it, and sensitive actions (like shell commands) ask for your approval.
  • Model flexibility – Works with 14+ built-in providers (like OpenRouter, OpenAI, Anthropic) or your own compatible endpoint, even local models.
  • Verification built-in – When a goal is complete, DeepCode runs the checklist you approved, and an optional independent reviewer checks each requirement with evidence.

How to get started

  1. Install using uv (a Python package manager):
    uv tool install --python 3.12 deepcode-hku
    deepcode init
    
  2. Add a model – e.g., for OpenRouter:
    deepcode provider set my-openrouter --template openrouter --api-key
    deepcode provider models my-openrouter --refresh
    deepcode provider test my-openrouter --model MODEL_ID
    
  3. Run it in your project – trust the folder and start:
    cd /path/to/your-project
    deepcode --trust --connection my-openrouter --model MODEL_ID
    

Then you can ask it to explain the project, fix bugs, add features, or run tests.

Security and data

  • The agent runs in a sandbox for shell commands under "Ask" mode.
  • You must explicitly trust a folder before it works there.
  • Repository hooks (automated scripts) require your approval.
  • Your API keys are stored locally in ~/.deepcode/credentials.json.

Who made it?

DeepCode comes from the HKU Data Intelligence Lab (HKUDS) and is backed by a research paper on arXiv. It's open-source, so you can contribute or modify it.

For full details, see the project website and the GitHub repository.

Related

  • Project
  • Project
  • Project
  • Project
  • Project