mempalace migrate (.pre-migrate.* full-palace copies) and mempalace repair max-seq-id (chroma.sqlite3.max-seq-id-backup-* DB copies) each wrote a fresh, full-size, timestamped backup every run and never deleted the old ones. On a machine that mines or repairs on a schedule, those copies could silently accumulate until they filled the disk. Add a configurable max_backups setting (default 10; env MEMPALACE_MAX_BACKUPS or config.json) and a shared prune_backups helper that trims the oldest copies after each new backup is written. Pruning is keyed by filesystem mtime, scoped strictly to each backup's own naming pattern so live data is never touched, and best-effort so a deletion failure can never abort the migrate/repair that just succeeded. Set max_backups to 0 to keep every backup.
2.4 KiB
2.4 KiB
Configuration
Global Config
Located at ~/.mempalace/config.json:
{
"palace_path": "/custom/path/to/palace",
"collection_name": "mempalace_drawers",
"people_map": {"Kai": "KAI", "Priya": "PRI"},
"max_backups": 10
}
| Key | Default | Description |
|---|---|---|
palace_path |
~/.mempalace/palace |
Where ChromaDB stores your drawers |
collection_name |
mempalace_drawers |
ChromaDB collection name |
people_map |
{} |
Entity name → AAAK code mappings |
max_backups |
10 |
How many timestamped palace backups to keep before the oldest are pruned. Applies to mempalace migrate (<palace>.pre-migrate.*) and mempalace repair max-seq-id (chroma.sqlite3.max-seq-id-backup-*), which each write a full copy every run. Set to 0 to keep every backup (e.g. when an external retention policy manages cleanup). |
Project Config
Generated by mempalace init in your project directory:
mempalace.yaml
wing: myproject
rooms:
- backend
- frontend
- decisions
palace_path: ~/.mempalace/palace
entities.json
{
"Kai": "KAI",
"Priya": "PRI"
}
Wings are auto-detected during mempalace init from:
- Directory names → project wings
- Detected people in file content → person wings
- Explicit
--wingflag on mine commands
Identity
Located at ~/.mempalace/identity.txt. Plain text. Becomes Layer 0 — loaded every session.
I am Atlas, a personal AI assistant for Alice.
Traits: warm, direct, remembers everything.
People: Alice (creator), Bob (Alice's partner).
Project: A journaling app that helps people process emotions.
::: tip Write your identity file in first person from the AI's perspective. This becomes the AI's self-concept on wake-up. :::
Palace Path Override
All commands accept --palace <path> to override the default location:
mempalace search "query" --palace /tmp/test-palace
mempalace mine ~/data/ --palace /tmp/test-palace
The MCP server also accepts --palace:
python -m mempalace.mcp_server --palace /custom/palace
Environment Variables
| Variable | Description |
|---|---|
MEMPALACE_PALACE_PATH |
Override palace path (same as --palace) |
MEMPAL_DIR |
Directory for auto-mining in hooks |
MEMPALACE_MAX_BACKUPS |
Override max_backups retention count (0 disables pruning) |