-
Notifications
You must be signed in to change notification settings - Fork 61
Memory
dEXploarer edited this page Mar 10, 2026
·
1 revision
Milady supports pluggable memory backends. Configuration lives under the memory key in ~/.milady/milady.json.
The schema is defined in src/config/types.milady.ts (MemoryConfig, MemoryQmdConfig).
| Backend | Value | Description |
|---|---|---|
| Built-in | "builtin" |
elizaOS default memory (default) |
| QMD | "qmd" |
Local file-based semantic memory with embedding search |
{
"memory": {
"backend": "builtin"
}
}{
"memory": {
"citations": "auto"
}
}Valid values: "auto", "on", "off".
QMD provides local file-based semantic memory. It uses embedding search to retrieve relevant memories and injects them into context.
{
"memory": {
"backend": "qmd",
"qmd": {
"command": "qmd",
"includeDefaultMemory": true,
"paths": [
{ "path": "~/notes", "name": "notes", "pattern": "**/*.md" }
],
"sessions": {
"enabled": true,
"exportDir": "~/.milady/session-exports",
"retentionDays": 30
},
"update": {
"interval": "1h",
"debounceMs": 2000,
"onBoot": true,
"embedInterval": "6h"
},
"limits": {
"maxResults": 20,
"maxSnippetChars": 500,
"maxInjectedChars": 4000,
"timeoutMs": 5000
}
}
}
}| Field | Description |
|---|---|
command |
QMD CLI command |
includeDefaultMemory |
Include elizaOS default memory alongside QMD results |
paths |
Index paths: path, optional name, optional pattern
|
sessions.enabled |
Index session transcripts |
sessions.exportDir |
Where to export session transcripts |
sessions.retentionDays |
How long to keep exported sessions |
update.interval |
How often to re-index |
update.debounceMs |
Debounce for file watcher |
update.onBoot |
Re-index on startup |
limits.maxResults |
Max memory snippets to inject |
limits.maxSnippetChars |
Max chars per snippet |
limits.maxInjectedChars |
Total injected memory cap |
limits.timeoutMs |
Memory query timeout |
Per-agent memory search config lives under agents.defaults.memorySearch or per-agent under agents.list[].memorySearch. Schema: MemorySearchConfig in src/config/types.tools.ts.
{
"agents": {
"defaults": {
"memorySearch": {
"enabled": true,
"sources": ["memory", "sessions"],
"provider": "local",
"store": {
"driver": "sqlite",
"vector": { "enabled": true }
},
"query": {
"maxResults": 10,
"minScore": 0.7,
"hybrid": {
"enabled": true,
"vectorWeight": 0.7,
"textWeight": 0.3
}
},
"sync": {
"onSessionStart": true,
"watch": true,
"intervalMinutes": 60
}
}
}
}
}| Value | Description |
|---|---|
"local" |
Local GGUF model via node-llama-cpp |
"openai" |
OpenAI embeddings API |
"gemini" |
Google Gemini embeddings API |
Local embedding model config lives under the top-level embedding key:
{
"embedding": {
"model": "nomic-embed-text-v1.5.Q5_K_M.gguf",
"dimensions": 768,
"contextSize": 2048,
"gpuLayers": "auto",
"idleTimeoutMinutes": 30
}
}