Dhee Developer Brain — local memory, repo cognition, handoff, and proof for AI coding agents
Project description
Dhee
The local developer brain for AI coding agents.
Persistent memory, repo cognition, handoff, routing, and proof for Codex, Claude Code, Cursor, Gemini CLI, Cline, and any MCP client.
What Dhee Is
Dhee is a production-ready, local-first context and memory layer for coding agents.
It is not a model, not an autocomplete tool, and not a hosted vector database. It sits beside your agent and keeps the work grounded:
- Memory that does not rot into noise: canonical facts, preferences, decisions, project rules, passive evidence, test fixtures, and operational events are separated.
- Repo cognition that survives sessions: symbol graph, imports, calls, route/component map, test map, ownership, historical failures, and impact analysis.
- Context routing: large files, grep output, logs, test runs, and agent handoffs become compact digests with evidence pointers.
- Action contracts: before edits, Dhee can compile the task into files, constraints, tests, risk, and proof obligations.
- Handoff: another agent can continue with the current repo state, decisions, blockers, and next action.
The promise is simple: less prompt sludge, fewer repeated mistakes, better grounded code edits.
Install
pip install dhee
dhee install
Or use the installer:
curl -fsSL https://raw.githubusercontent.com/Sankhya-AI/Dhee/main/install.sh | sh
Then wire a repo:
cd /path/to/repo
dhee init
dhee status
dhee ui
MCP clients can use:
{
"mcpServers": {
"dhee": { "command": "dhee-mcp" }
}
}
How It Helps A Coding Agent
Without Dhee, every turn is a loose pile of files, logs, stale memory, and guesses.
With Dhee, the agent gets a compact working packet:
- Recall: relevant user/project memory, current handoff, and repo facts.
- Understand: repo brain localizes likely files, symbols, routes, tests, and owners.
- Act: task contract controls allowed writes and risky paths.
- Verify: tests, diffs, proof bundles, and contamination checks.
- Learn: only durable lessons are promoted; junk stays suppressed.
Deep Repo Cognition
Ask: "If I touch this file, what breaks?"
Dhee's repo brain answers with grounded graph evidence:
- impacted files and symbols
- impacted routes and React components
- likely tests to run
- owners from git history
- related failure signatures
- source windows with line numbers, not raw file dumps
The repo brain is git-SHA scoped and persisted under .dhee/context/repo_brain/, so agents do not rebuild understanding from scratch every session.
Memory Quality
Dhee separates memory into classes instead of letting everything compete:
| Memory kind | What happens |
|---|---|
| Canonical personal/project facts | Durable, high-confidence, slow decay |
| Passive screen/context observations | Raw evidence, not personal truth |
| Test fixtures and probes | Suppressed from normal recall |
| Operational events | Useful for diagnostics, not identity |
| Repo handoff/session state | Scoped to repo and current work |
This is what keeps a Chotu/Codex/Claude-style agent from sounding clever one minute and strangely blind the next.
Useful Commands
dhee handoff --repo . --json
dhee context task create "fix flaky auth tests" --repo .
dhee context repo-brain index --repo .
dhee context repo-brain impact dhee/auth.py --repo .
dhee shell "cat /handoff/latest.md"
dhee memory-quality audit --user-id default --json
dhee release check --repo .
Provider Defaults
Dhee can run model-free for repo tooling and handoff. For high-quality semantic memory, the default provider map points to the NVIDIA-compatible OpenAI API stack used in our LongMemEval runs:
dhee key set nvidia
pip install "dhee[nvidia,zvec,mcp]"
Current high-quality stack:
- Embedder:
nvidia/llama-nemotron-embed-vl-1b-v2 - Reranker:
nvidia/llama-3.2-nv-rerankqa-1b-v2 - Vector backend:
zvecthroughdhee-accel
Benchmarks
On LongMemEval full 500-question recall:
| System | R@1 | R@3 | R@5 | R@10 |
|---|---|---|---|---|
| Dhee | 94.8% | 99.0% | 99.4% | 99.8% |
Reproduction notes and outputs live in benchmarks/longmemeval/.
What Is In The Open Source Package
You get the local developer brain: memory OS, repo brain, DheeFS, MCP server, CLI, UI, runtime daemon, handoff bus, update capsules, and release/proof tooling.
Enterprise/team governance, hosted dashboards, org policy, and managed source connectors can build on top of these local primitives. The OSS package is useful by itself and does not require a hosted account.
Develop
pip install -e ".[dev,nvidia,zvec,mcp]"
pytest
License
MIT. Built by Sankhya AI Labs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dhee-7.0.2.tar.gz.
File metadata
- Download URL: dhee-7.0.2.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c656dfd8867b5619162d90dfd5a2c648968402b95c32bd4fa634bc498336472
|
|
| MD5 |
a6cebce34dd7c11ad053fc16ebaaf4ed
|
|
| BLAKE2b-256 |
d3e73c05757fa37f7324798fd54ba89da3e0b8db6b875faf21a16e21914279f8
|
File details
Details for the file dhee-7.0.2-py3-none-any.whl.
File metadata
- Download URL: dhee-7.0.2-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c175912be02005b20a8d2a3081650954d88c7e9507fe52b06f55ca316c125d8
|
|
| MD5 |
c85c12ed5483ef3f47a024ee669736a8
|
|
| BLAKE2b-256 |
b8d13746cd6bd88491e029a8b90abdfbc71bfb082dcd8ebe7200b0891c6655dd
|