-
Notifications
You must be signed in to change notification settings - Fork 0
AIMemory
AI Memory gives ClawDE a persistent, user-controlled knowledge store that survives across sessions. The daemon injects relevant memory entries into every AI system prompt, so your preferences, project conventions, and recurring context are always present — without you having to repeat yourself.
- The daemon maintains a
memory_entriesSQLite table with global and project-scoped entries - Before sending a message to the AI, the daemon prepends a
<clawd_memory>block with the most relevant entries (weight-ordered, token-budgeted) - After a session ends, the extractor scans the conversation for new learnable facts and suggests them as memory entries
- Users can manage entries directly in the Memory page or via the CLI
| Scope | Coverage | Example |
|---|---|---|
global |
All sessions, all projects | preferences.language = "Rust" |
proj:{sha256} |
One project only | project.style = "4-space tabs" |
Project scope is derived from the SHA-256 hash of the repo path (first 16 chars).
| Field | Type | Description |
|---|---|---|
key |
string | Dot-notation path — e.g. preferences.verbosity
|
value |
string | The remembered value |
weight |
1–10 | Priority for token-budget ordering. 10 = always included |
scope |
string |
global or proj:{sha256}
|
source |
string |
user (manually added) or ai (extracted) |
| Method | Description |
|---|---|
memory.list |
List entries by scope or repo path |
memory.add |
Add or update an entry (upsert by scope+key) |
memory.remove |
Remove an entry by ID |
memory.update |
Alias for memory.add with upsert semantics |
# List all global entries
clawd memory list
# List entries for a project
clawd memory list --repo-path /path/to/project
# Add a global preference
clawd memory add preferences.language Rust --weight 8
# Show a specific entry
clawd memory show preferences.language
# Remove an entry
clawd memory remove <id>Go to Memory in the sidebar to:
- Search all entries
- Add entries with key, value, and weight slider
- Delete entries with confirmation
- See the weight badge (green = high priority, amber = medium, grey = low)
The session header shows a memory count badge (purple M chip) when entries are active for the current session's repo.
Five built-in starter templates are available at apps/daemon/src/memory/templates/:
| Template | Focus |
|---|---|
rust.toml |
Rust idioms, error handling, async patterns |
typescript.toml |
TypeScript strict mode, ESM, React patterns |
flutter.toml |
Flutter/Dart conventions, Riverpod, null safety |
fullstack.toml |
Full-stack web development preferences |
ml.toml |
Machine learning, Python, Jupyter conventions |
Load a template with:
clawd memory load-template rustThe daemon limits memory injection to avoid consuming too much of the AI's context window. The default budget is 512 tokens. Entries are sorted by weight descending — higher weight entries are always included first.
All memory data is stored locally in the daemon's SQLite database (~/.claw/clawd.db). Nothing is sent to ClawDE servers. In air-gap mode, memory works identically — it never leaves your machine.
ClawDE · GitHub · MIT License
ClawDE
Getting started
Reference
- Architecture
- Daemon-Reference
- Folder-Structure
- Providers
- Multi-Account
- Security
- Features
- Features/Daemon
- Features/Session-Manager
- Features/Mode-System
- Features/Repo-Intelligence
- Features/Projects
- Features/Remote-Access
- Features/Desktop-App
- Features/Provider-Knowledge
- Features/Coding-Standards
- Roadmap
Branding
Contributing