|
6 | 6 | </picture> |
7 | 7 | </p> |
8 | 8 |
|
9 | | -<p align="center"><strong>A document-centered AI coding agent with a durable control plane.</strong></p> |
| 9 | +<p align="center"><strong>AI coding agent with persistent memory and control plane</strong></p> |
10 | 10 |
|
11 | 11 | <p align="center"> |
12 | 12 | <a href="README.md">English</a> | |
|
15 | 15 |
|
16 | 16 | --- |
17 | 17 |
|
18 | | -## What is DeepAgent Code? |
| 18 | +DeepAgent Code is an AI coding agent built on persistent document memory. It keeps [opencode](https://github.com/sst/opencode)'s runtime foundations and adds a control plane for **durable knowledge**, **cross-session memory**, **context assembly**, **learning lifecycle**, and **runtime intelligence**. |
19 | 19 |
|
20 | | -DeepAgent Code is an AI coding agent built around a durable document system. It keeps the proven opencode runtime, tool, MCP, session, and provider foundations, then adds the DeepAgent control plane for document memory, context assembly, retrieval gates, learning, failure triage, domain adapters, and runtime intelligence. |
| 20 | +## What Makes It Different |
21 | 21 |
|
22 | | -The guiding idea is simple: the document system is the agent's durable body. Knowledge, strategy, methodology, skills, memory, diagnosis, decisions, work logs, and context snapshots are represented as typed documents. The context layer selects the smallest useful slice for each model turn, then writes new evidence back into the document graph. |
| 22 | +**Persistent document system** — Knowledge, decisions, diagnostics, and learnings are stored as typed documents in a searchable graph. The agent builds understanding across sessions instead of starting from scratch each time. |
23 | 23 |
|
24 | | -DeepAgent Code is not presented as an upstream-endorsed opencode release. It is a derived work with substantial DeepAgent changes. |
| 24 | +**Project memory sharing** — Multiple conversations within the same project share knowledge, coding patterns, common pitfalls, and build commands. What one session learns becomes available to the next. |
25 | 25 |
|
26 | | -## Highlights |
| 26 | +**AI IDE microservice** — Query code by symbol name and intent (not file:line coordinates). Get definitions, references, call chains, type hierarchies, and diagnostics in one call. Built on LSP with 38 language servers. |
27 | 27 |
|
28 | | -- **Document graph**: typed documents for durable knowledge, working memory, decisions, diagnostics, snapshots, skills, and methodologies. |
29 | | -- **Context control**: deterministic context admission at safe provider-turn boundaries, bounded tool output, evidence-gated retrieval, and conflict-aware memories. |
30 | | -- **Work strengths**: `general`, `high`, `xhigh`, `max`, and `ultra` form a capability ladder; higher strengths add control-plane abilities without silently changing lower-mode contracts. |
31 | | -- **Scenario modes**: `direct` executes the user's prompt immediately; `wish` first refines and confirms intent before stronger automation. |
32 | | -- **AI IDE microservice**: code intelligence via LSP-style symbol search, diagnostics, and source navigation entry points. |
33 | | -- **Preset MCP catalog**: curated MCP server presets for Git platforms, file search, read-only database access, and browser/fetch workflows. |
34 | | -- **Learning lifecycle**: completed work can produce candidate memories, facts, failure dossiers, strategies, and methodologies under evidence and approval gates. |
| 28 | +**Preset MCP catalog** — Curated MCP servers for Git platforms, file search, read-only databases, and browser automation. Risk tiers derived at runtime from catalog structure, not user config. |
| 29 | + |
| 30 | +**Domain packs** — Specialized knowledge packages for specific domains (GPU kernels, React, backend APIs, security, testing). Each pack contains typed documents (strategies, methodologies, knowledge, skills) + validation/diagnostic adapters. Packs compose: activate multiple domains for your task. |
| 31 | + |
| 32 | +**Learning lifecycle** — After completing work, the agent can generate candidate memories, facts, strategies, and methodologies. Evidence and approval gates control what gets persisted. |
| 33 | + |
| 34 | +**Work strength ladder** — `general`, `high`, `xhigh`, `max`, `ultra` scale capability without breaking contracts. Higher strengths add control-plane abilities (multi-agent orchestration, adversarial validation) on top of base behavior. |
| 35 | + |
| 36 | +**Scenario modes** — `direct` executes immediately; `wish` refines intent first, shows draft plan, waits for confirmation before automation. |
35 | 37 |
|
36 | 38 | ## Installation |
37 | 39 |
|
38 | 40 | ```bash |
39 | | -npm i -g deepagent-code@latest |
40 | | -# or |
41 | | -bun add -g deepagent-code |
| 41 | +npm install -g deepagent-code |
42 | 42 | ``` |
43 | 43 |
|
44 | 44 | Then run: |
45 | 45 |
|
46 | 46 | ```bash |
47 | 47 | deepagent-code |
48 | | -# alias: |
| 48 | +# or use the alias: |
49 | 49 | deepagent |
50 | 50 | ``` |
51 | 51 |
|
52 | | -The package also exposes project-specific packages in this monorepo for the app, server, SDK, TUI, desktop shell, and supporting services. |
| 52 | +## Quick Example |
53 | 53 |
|
54 | | -## Quick start |
| 54 | +Start the agent and give it a task: |
55 | 55 |
|
56 | 56 | ```bash |
57 | | -# Start the agent in the current repository |
58 | | -deepagent-code |
59 | | - |
60 | | -# Start with a prompt |
61 | | -deepagent-code "inspect this repo and explain the architecture" |
| 57 | +deepagent-code "add rate limiting to /api/users endpoint" |
62 | 58 | ``` |
63 | 59 |
|
64 | | -Common local development commands: |
| 60 | +The agent will: |
65 | 61 |
|
66 | | -```bash |
67 | | -bun install |
68 | | -bun run typecheck |
69 | | -bun run --cwd packages/deepagent-code test |
70 | | -bun run dev |
| 62 | +1. Use LSP to find the endpoint definition and understand its structure |
| 63 | +2. Check project memory for existing middleware patterns |
| 64 | +3. Implement rate limiting following project conventions |
| 65 | +4. Run tests and capture diagnostics |
| 66 | +5. Generate a candidate memory: "This project uses express-rate-limit middleware" |
| 67 | + |
| 68 | +On your next session, when you ask to add rate limiting elsewhere, the agent already knows the pattern. |
| 69 | + |
| 70 | +## Core Concepts |
| 71 | + |
| 72 | +**Document graph** — All persistent state lives in typed documents: `knowledge`, `strategy`, `methodology`, `skill`, `memory`, `design`, `worklog`, `diagnosis`, `eval`. Documents link to each other (supports/blocks/conflicts/validates), forming a graph. |
| 73 | + |
| 74 | +**Scope layers** — `session-private` (current conversation), `project-shared` (all sessions in this project), `user-global` (cross-project preferences), `public-system` (built-in skills), `sealed` (audit-only, never enters context). |
| 75 | + |
| 76 | +**Domain packs** — Each pack (e.g., `code.frontend.react`, `code.gpu-kernel`, `risk.security`) is a bundle of typed documents + adapters. Documents include strategies (directions), methodologies (multi-step workflows), knowledge (facts), skills (executable capabilities), and failure dossiers. Packs auto-activate based on problem profile or explicit selection. Core stays domain-neutral. |
| 77 | + |
| 78 | +**Context admission** — Retrieval hits go through admission gates. Sensitive information (SSH hosts, tokens, internal paths) gets suggested but not auto-expanded into prompts. |
| 79 | + |
| 80 | +**Evidence-gated learning** — Learnings require evidence (test pass, diagnostic clear, validation confirmed). Candidates enter a queue; auto-merge or manual review depends on policy. |
| 81 | + |
| 82 | +**Symbol-driven navigation** — Code intelligence tools accept symbol names (e.g., "AgentGateway.open"), not coordinates. The agent resolves names to locations internally via LSP workspace/document symbols. |
| 83 | + |
| 84 | +## Architecture |
| 85 | + |
| 86 | +``` |
| 87 | +┌─────────────────────────────────────────────────────────────┐ |
| 88 | +│ Control Plane (DeepAgent additions) │ |
| 89 | +│ • Document graph (persistent memory) │ |
| 90 | +│ • Context assembly & admission gates │ |
| 91 | +│ • Learning worker (background, non-blocking) │ |
| 92 | +│ • Evidence & approval gates │ |
| 93 | +│ • Work strength orchestration │ |
| 94 | +│ • Domain pack system (composable knowledge) │ |
| 95 | +└─────────────────────────────────────────────────────────────┘ |
| 96 | + │ |
| 97 | +┌─────────────────────────────────────────────────────────────┐ |
| 98 | +│ Runtime Foundations (from opencode) │ |
| 99 | +│ • Agent loop & tool execution │ |
| 100 | +│ • Session & provider management │ |
| 101 | +│ • MCP client runtime │ |
| 102 | +│ • Permission system │ |
| 103 | +└─────────────────────────────────────────────────────────────┘ |
| 104 | + │ |
| 105 | +┌─────────────────────────────────────────────────────────────┐ |
| 106 | +│ Intelligence Layers │ |
| 107 | +│ • LSP microservice (38 language servers) │ |
| 108 | +│ • Preset MCP servers (git/files/db/browser) │ |
| 109 | +│ • Domain adapters (validation & diagnostics) │ |
| 110 | +│ • Diagnostic & validation loops │ |
| 111 | +└─────────────────────────────────────────────────────────────┘ |
71 | 112 | ``` |
72 | 113 |
|
73 | | -## Language support |
| 114 | +DeepAgent's control plane operates at provider-turn boundaries: it selects context before each model call and writes evidence back into the document graph afterward. It does not replace opencode's runtime—it layers on top. |
74 | 115 |
|
75 | | -The application UI is internationalized. The officially maintained repository README files are: |
| 116 | +## Documentation |
76 | 117 |
|
77 | | -- [English](README.md) |
78 | | -- [简体中文](README.zh.md) |
| 118 | +- [Architecture & Design](design/README.md) — Control plane, code intelligence, MCP security model |
| 119 | +- [Security Policy](SECURITY.md) — Vulnerability reporting, known limitations |
| 120 | +- [Privacy Policy](PRIVACY.md) — Data handling and storage |
| 121 | +- [Contributing](CONTRIBUTING.md) — Development setup and guidelines |
| 122 | +- [Changelog](CHANGELOG.md) — Release history |
79 | 123 |
|
80 | | -Other UI translations may exist in the product, but non-English README translations are not maintained in this repository unless explicitly marked as official. |
| 124 | +## License & Attribution |
81 | 125 |
|
82 | | -## Security and MCP credentials |
| 126 | +DeepAgent Code is licensed under **AGPL-3.0-or-later**. If you modify and run it as a network service, you must make your source code available to users. |
83 | 127 |
|
84 | | -DeepAgent Code includes a preset MCP catalog with risk tiers derived at runtime from catalog templates, not from user-writable configuration. Read-only database presets are intended to be conservative and still include SQL guardrails. |
| 128 | +This project is derived from [opencode](https://github.com/sst/opencode) (MIT License). See [NOTICE](NOTICE) for the upstream license and attribution. No endorsement by opencode or its contributors is implied. |
85 | 129 |
|
86 | | -Known limitation for V3.4.1: enabling preset MCP servers that require credentials may store those credential values in local configuration. Do not commit configuration files containing secrets. The planned V3.5 M-CRED work moves credentials behind OS-backed secret storage and runtime environment resolution. |
| 130 | +## Project Status |
87 | 131 |
|
88 | | -See [SECURITY.md](SECURITY.md) for reporting instructions, security model notes, and source availability information. |
| 132 | +**V3.4.1** is the first public pre-release hardening milestone. It includes: |
89 | 133 |
|
90 | | -## Source availability and license |
| 134 | +- LSP-to-AI-IDE transformation (symbol-driven code intelligence) |
| 135 | +- Preset MCP catalog with security model |
| 136 | +- License and attribution cleanup |
| 137 | +- Secret scan baseline |
| 138 | +- Design documentation consolidation |
91 | 139 |
|
92 | | -DeepAgent Code is licensed under **AGPL-3.0-or-later**. If you interact with a modified network service based on DeepAgent Code, the AGPL network-use clause gives you the right to receive the corresponding source code for that service. |
| 140 | +**V3.5** (planned) will add: |
93 | 141 |
|
94 | | -This repository is derived from [opencode](https://github.com/sst/opencode), which is licensed under MIT. See [NOTICE](NOTICE) for the retained upstream MIT notice and attribution. No endorsement by opencode or its contributors is implied. |
| 142 | +- DAP integration (debug adapter protocol for runtime intelligence) |
| 143 | +- PAP (performance analysis protocol for profiling: NVIDIA NCU/nsys, AMD rocprof, Intel VTune, CPU perf) |
| 144 | +- OS-backed credential storage for MCP servers |
95 | 145 |
|
96 | | -## Project status |
| 146 | +--- |
97 | 147 |
|
98 | | -V3.4.1 is the first public-release hardening milestone: license and attribution cleanup, documentation consolidation, secret-scan baseline, security disclosure, and rebrand verification before the first public tag. |
| 148 | +<p align="center"> |
| 149 | + <sub>Built by DeepAgent</sub> |
| 150 | +</p> |
0 commit comments