Skip to content

Commit dcbcac0

Browse files
committed
Release Dhee 7.1.0
1 parent 6cf03e0 commit dcbcac0

17 files changed

Lines changed: 4933 additions & 81 deletions

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## [7.1.0] - 2026-05-22 - World memory layer and context compiler
8+
9+
- Reframed Dhee as the world memory layer and context compiler for AI agents,
10+
with a polished README that explains the agent workflow, MCP setup,
11+
retrieval stack, and production boundaries.
12+
- Added SQLite-first Narrative Scene Intelligence v1:
13+
`Series -> Season -> Episode -> Scene -> SceneCard -> MemoryItem`.
14+
- Added canonical scene intelligence MCP tools in slim and full servers:
15+
`dhee_scene_start`, `dhee_scene_event`, `dhee_scene_end`,
16+
`dhee_scene_context`, and `dhee_narrative_prior`.
17+
- Made SceneCards the canonical prompt-safe retrieval object while keeping
18+
existing temporal scene tools compatible.
19+
- Wired semantic SceneCard retrieval to the NVIDIA/Nemotron embedder and
20+
reranker path by default when available, with deterministic filters for
21+
privacy, secrets, proof gates, categories, markers, recency, and outcome.
22+
- Added auditable Episode, Season, and Series rollups with Gemma 4 31B as the
23+
routine distillation model and Kimi k2.6 as the Series-level strategic model.
24+
725
## [7.0.2] - 2026-05-21 — Chotu dependency compatibility
826

927
- Relaxed Dhee's tree-sitter dependency family from `<0.24` to `<0.26` so

README.md

Lines changed: 127 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<p align="center">
2-
<img src="https://raw.githubusercontent.com/Sankhya-AI/Dhee/main/docs/dhee-hero.png" alt="The shared learning layer for AI agents" width="100%">
2+
<img src="https://raw.githubusercontent.com/Sankhya-AI/Dhee/main/docs/dhee-hero.png" alt="Dhee world memory layer for AI agents" width="100%">
33
</p>
44

55
<h1 align="center">Dhee</h1>
66

77
<p align="center">
8-
<b>The local developer brain for AI coding agents.</b><br>
9-
Persistent memory, repo cognition, handoff, routing, and proof for Codex, Claude Code, Cursor, Gemini CLI, Cline, and any MCP client.
8+
<b>World memory for AI agents.</b><br>
9+
A context compiler, repo brain, narrative scene graph, handoff bus, and proof layer for Codex, Claude Code, Cursor, Gemini CLI, Cline, Chotu, and any MCP client.
1010
</p>
1111

1212
<p align="center">
@@ -18,19 +18,11 @@
1818

1919
---
2020

21-
## What Dhee Is
21+
Dhee gives an agent the bigger story before it takes the next action.
2222

23-
Dhee is a production-ready, local-first context and memory layer for coding agents.
23+
LLMs are powerful, but they still miss the arc. What is the user trying to become? What happened last session? Which decision was already made? Which failure should not be repeated? Which proof is required before touching code?
2424

25-
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:
26-
27-
- **Memory that does not rot into noise:** canonical facts, preferences, decisions, project rules, passive evidence, test fixtures, and operational events are separated.
28-
- **Repo cognition that survives sessions:** symbol graph, imports, calls, route/component map, test map, ownership, historical failures, and impact analysis.
29-
- **Context routing:** large files, grep output, logs, test runs, and agent handoffs become compact digests with evidence pointers.
30-
- **Action contracts:** before edits, Dhee can compile the task into files, constraints, tests, risk, and proof obligations.
31-
- **Handoff:** another agent can continue with the current repo state, decisions, blockers, and next action.
32-
33-
The promise is simple: **less prompt sludge, fewer repeated mistakes, better grounded code edits.**
25+
Dhee stores that story locally and compiles it into the smallest useful context. Not a transcript pile. Not vibes. Memory with shape.
3426

3527
## Install
3628

@@ -39,13 +31,13 @@ pip install dhee
3931
dhee install
4032
```
4133

42-
Or use the installer:
34+
Or use the one-command installer:
4335

4436
```bash
4537
curl -fsSL https://raw.githubusercontent.com/Sankhya-AI/Dhee/main/install.sh | sh
4638
```
4739

48-
Then wire a repo:
40+
Wire a repo:
4941

5042
```bash
5143
cd /path/to/repo
@@ -54,7 +46,75 @@ dhee status
5446
dhee ui
5547
```
5648

57-
MCP clients can use:
49+
## What Is Dhee?
50+
51+
Dhee is the memory layer agents should have had from day one.
52+
53+
It runs beside the model and answers the questions that raw chat history cannot:
54+
55+
| The agent needs | Dhee gives it |
56+
| --- | --- |
57+
| What matters right now? | A compiled context packet with included and rejected reasons. |
58+
| What happened before? | Durable user, project, repo, scene, and handoff memory. |
59+
| What files are risky? | Repo brain impact analysis, likely tests, owners, routes, and symbols. |
60+
| What should not be used? | Secret filters, privacy classes, supersession, contradiction, and proof gates. |
61+
| What is the larger story? | Series, Seasons, Episodes, Scenes, and SceneCards. |
62+
| Can another agent continue? | Session digests, shared task state, evidence refs, and handoff packets. |
63+
64+
## Context Compiler
65+
66+
Most agents drown in context or starve without it. Dhee does the boring hard part in the middle.
67+
68+
- Reads summarize files instead of dumping them.
69+
- Searches return compact matches with expansion pointers.
70+
- Tool output becomes reusable evidence, not one-turn sludge.
71+
- Task contracts define files, constraints, tests, and proof obligations.
72+
- SceneCards become the default retrieval object.
73+
- Raw transcripts stay out of prompts unless explicitly requested.
74+
75+
The model gets the part of the world it needs, in the form it can use.
76+
77+
## Narrative Memory
78+
79+
This is the new Dhee core.
80+
81+
```text
82+
Series -> Season -> Episode -> Scene -> SceneCard -> MemoryItem
83+
```
84+
85+
In plain English:
86+
87+
- **Series** is the biggest purpose. Example: become a successful CTO.
88+
- **Season** is a period of the story: learning, struggle, first success, downfall, comeback.
89+
- **Episode** is the meaningful arc of a day.
90+
- **Scene** is a bounded work moment with a hero, intent, action, obstacle, result, and outcome.
91+
- **SceneCard** is the retrieval card the agent sees later: compact, evidence-backed, privacy-aware.
92+
- **MemoryItem** is promoted only when the SceneCard is worth keeping long-term.
93+
94+
That story gives the model anticipation. The prior is advisory, never bossy: explicit user intent, facts, privacy, and proof gates win.
95+
96+
## Retrieval That Actually Ranks
97+
98+
Dhee can run model-free, but the production retrieval path is built for serious agent work:
99+
100+
```bash
101+
pip install "dhee[nvidia,zvec,mcp]"
102+
dhee key set nvidia
103+
```
104+
105+
Current high-quality stack:
106+
107+
- Embedder: `nvidia/llama-nemotron-embed-vl-1b-v2`
108+
- Reranker: `nvidia/llama-3.2-nv-rerankqa-1b-v2`
109+
- Vector backend: `zvec` through `dhee-accel`
110+
- Routine narrative rollups: `google/gemma-4-31b-it`
111+
- Series-level strategic rollups: `moonshotai/kimi-k2.6`
112+
113+
Deterministic filters still go first: secrets, private scenes, contradicted cards, superseded cards, and code-mutation proof gates cannot be talked around by a high similarity score.
114+
115+
## MCP Tools
116+
117+
Add Dhee to any MCP client:
58118

59119
```json
60120
{
@@ -64,73 +124,63 @@ MCP clients can use:
64124
}
65125
```
66126

67-
## How It Helps A Coding Agent
127+
Scene intelligence tools:
128+
129+
```text
130+
dhee_scene_start
131+
dhee_scene_event
132+
dhee_scene_end
133+
dhee_scene_context
134+
dhee_narrative_prior
135+
```
136+
137+
Core context tools:
68138

69-
Without Dhee, every turn is a loose pile of files, logs, stale memory, and guesses.
139+
```text
140+
dhee_context_bootstrap
141+
dhee_read
142+
dhee_grep
143+
dhee_bash
144+
dhee_context_pack
145+
dhee_scene_search
146+
```
70147

71-
With Dhee, the agent gets a compact working packet:
148+
A good agent loop is simple:
72149

73-
1. **Recall:** relevant user/project memory, current handoff, and repo facts.
74-
2. **Understand:** repo brain localizes likely files, symbols, routes, tests, and owners.
75-
3. **Act:** task contract controls allowed writes and risky paths.
76-
4. **Verify:** tests, diffs, proof bundles, and contamination checks.
77-
5. **Learn:** only durable lessons are promoted; junk stays suppressed.
150+
```text
151+
bootstrap -> start scene -> gather evidence -> retrieve context -> act -> verify -> end scene -> save digest
152+
```
78153

79-
## Deep Repo Cognition
154+
## Repo Brain
80155

81-
Ask: **"If I touch this file, what breaks?"**
156+
Ask: "If I touch this file, what breaks?"
82157

83-
Dhee's repo brain answers with grounded graph evidence:
158+
Dhee's repo brain answers with graph-backed evidence:
84159

85160
- impacted files and symbols
86161
- impacted routes and React components
87162
- likely tests to run
88163
- owners from git history
89164
- related failure signatures
90-
- source windows with line numbers, not raw file dumps
165+
- source windows with line numbers
91166

92-
The repo brain is git-SHA scoped and persisted under `.dhee/context/repo_brain/`, so agents do not rebuild understanding from scratch every session.
167+
The repo brain is git-SHA scoped and persisted under `.dhee/context/repo_brain/`, so the agent does not rebuild the same understanding every session.
93168

94-
## Memory Quality
169+
## Why It Feels Different
95170

96-
Dhee separates memory into classes instead of letting everything compete:
171+
Normal memory says: "Here are some old notes."
97172

98-
| Memory kind | What happens |
99-
| --- | --- |
100-
| Canonical personal/project facts | Durable, high-confidence, slow decay |
101-
| Passive screen/context observations | Raw evidence, not personal truth |
102-
| Test fixtures and probes | Suppressed from normal recall |
103-
| Operational events | Useful for diagnostics, not identity |
104-
| Repo handoff/session state | Scoped to repo and current work |
105-
106-
This is what keeps a Chotu/Codex/Claude-style agent from sounding clever one minute and strangely blind the next.
173+
Dhee says:
107174

108-
## Useful Commands
175+
- this is the user's bigger goal
176+
- this is the current season of work
177+
- this is today's episode
178+
- this scene has these constraints
179+
- these cards are safe to use
180+
- these cards were rejected and why
181+
- this action needs proof before mutation
109182

110-
```bash
111-
dhee handoff --repo . --json
112-
dhee context task create "fix flaky auth tests" --repo .
113-
dhee context repo-brain index --repo .
114-
dhee context repo-brain impact dhee/auth.py --repo .
115-
dhee shell "cat /handoff/latest.md"
116-
dhee memory-quality audit --user-id default --json
117-
dhee release check --repo .
118-
```
119-
120-
## Provider Defaults
121-
122-
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:
123-
124-
```bash
125-
dhee key set nvidia
126-
pip install "dhee[nvidia,zvec,mcp]"
127-
```
128-
129-
Current high-quality stack:
130-
131-
- Embedder: `nvidia/llama-nemotron-embed-vl-1b-v2`
132-
- Reranker: `nvidia/llama-3.2-nv-rerankqa-1b-v2`
133-
- Vector backend: `zvec` through `dhee-accel`
183+
The result is an agent that feels less random because it can see the arc.
134184

135185
## Benchmarks
136186

@@ -142,11 +192,11 @@ On LongMemEval full 500-question recall:
142192

143193
Reproduction notes and outputs live in [`benchmarks/longmemeval/`](benchmarks/longmemeval/).
144194

145-
## What Is In The Open Source Package
195+
## What Ships
146196

147-
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.
197+
The open source package includes the local memory OS, context compiler, DheeFS, MCP servers, CLI, UI, runtime daemon, handoff bus, repo brain, update capsules, narrative scene intelligence, release checks, and proof tooling.
148198

149-
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.
199+
Team governance, hosted dashboards, org policy, and managed source connectors can build on top of these local primitives. Dhee itself is useful without a hosted account.
150200

151201
## Develop
152202

@@ -155,6 +205,14 @@ pip install -e ".[dev,nvidia,zvec,mcp]"
155205
pytest
156206
```
157207

208+
Focused release checks:
209+
210+
```bash
211+
python -m pytest tests/test_narrative_scene_intelligence.py tests/test_mcp_tools_slim.py tests/test_scene.py tests/test_temporal_scenes.py tests/test_reranker_defaults.py tests/test_nvidia_embedder.py -q
212+
python -m build
213+
python -m twine check dist/*
214+
```
215+
158216
## License
159217

160218
MIT. Built by Sankhya AI Labs.

dhee/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
"""dhee the local developer brain for AI coding agents.
1+
"""dhee - the world memory layer and context compiler for AI agents.
22
3-
Dhee gives Codex, Claude Code, Cursor, Cline, Gemini CLI, and MCP clients a
4-
shared memory, repo-cognition, handoff, and proof layer that survives sessions.
3+
Dhee gives Codex, Claude Code, Cursor, Cline, Gemini CLI, Chotu, and MCP
4+
clients durable memory, repo cognition, narrative scene intelligence, handoff,
5+
proof, and prompt-safe context that survives sessions.
56
67
Quick Start:
78
from dhee import Dhee
@@ -40,7 +41,7 @@
4041
# Default import remains model-free for backwards compatibility.
4142
Memory = CoreMemory
4243

43-
__version__ = "7.0.2"
44+
__version__ = "7.1.0"
4445
__all__ = [
4546
# Memory classes
4647
"Engram",

0 commit comments

Comments
 (0)