$npx -y skills add timfewi/tentaflake --skill hermes-memory-personalityManage Hermes memory (MEMORY.md, USER.md) and personality (SOUL.md, /personality) — persistence, capacity, context files, identity
| 1 | # Hermes Memory & Personality |
| 2 | |
| 3 | > **Tentaflake context:** This skill describes Hermes' built-in memory system |
| 4 | > — it works the same inside tentaflake agent containers. The memory settings |
| 5 | > (`memory.memory_enabled`, `memory.user_profile_enabled`, etc.) can be |
| 6 | > configured declaratively via the `settings` attrset in `my-agents.nix`. |
| 7 | > See `my-agents.nix.example` for examples. Agent state (including memory) |
| 8 | > persists in `/var/lib/hermes-<name>/` on the host. |
| 9 | |
| 10 | ## When to Use |
| 11 | |
| 12 | - Manage what the agent remembers across sessions |
| 13 | - Configure SOUL.md personality |
| 14 | - Set up AGENTS.md project context files |
| 15 | - Control memory capacity and consolidation |
| 16 | - Switch personalities mid-session |
| 17 | - Understand memory vs skills distinction |
| 18 | - Use context files (CLAUDE.md, .cursorrules) |
| 19 | |
| 20 | ## Procedure |
| 21 | |
| 22 | ### 1. Memory System Overview |
| 23 | |
| 24 | Two files persist across sessions: |
| 25 | |
| 26 | | File | Purpose | Char Limit | Location | |
| 27 | | ------------- | ----------------------------------------------- | ------------------------- | ------------------------------ | |
| 28 | | **MEMORY.md** | Agent's notes — env facts, conventions, lessons | 2,200 chars (~800 tokens) | `~/.hermes/memories/MEMORY.md` | |
| 29 | | **USER.md** | User profile — preferences, style, expectations | 1,375 chars (~500 tokens) | `~/.hermes/memories/USER.md` | |
| 30 | |
| 31 | Both inject into system prompt as frozen snapshot at session start. |
| 32 | |
| 33 | ### 2. Memory Tool Actions |
| 34 | |
| 35 | Agent uses `memory` tool: |
| 36 | |
| 37 | ```text |
| 38 | memory(action="add", target="memory", content="User prefers TypeScript over JavaScript") |
| 39 | memory(action="replace", target="memory", |
| 40 | old_text="TypeScript", |
| 41 | content="User prefers TypeScript over JavaScript") |
| 42 | memory(action="remove", target="memory", old_text="TypeScript") |
| 43 | ``` |
| 44 | |
| 45 | | Action | Use | Key params | |
| 46 | | --------- | --------------- | ------------------------------------------- | |
| 47 | | `add` | New entry | `target` (`memory` / `user`), `content` | |
| 48 | | `replace` | Update existing | `target`, `old_text` (substring), `content` | |
| 49 | | `remove` | Delete entry | `target`, `old_text` (substring) | |
| 50 | |
| 51 | No `read` — memory auto-injected in system prompt. `old_text` uses substring matching. If multiple matches → error asking for more specific text. |
| 52 | |
| 53 | ### 3. Memory vs Skills |
| 54 | |
| 55 | | Feature | Memory | Skills | |
| 56 | | ---------- | ------------------------------- | -------------------------------- | |
| 57 | | Stores | Facts ("what") | Procedures ("how") | |
| 58 | | Trigger | Auto-injected in prompt | On-demand via `/skill-name` | |
| 59 | | Capacity | ~1,300 tokens total | Unlimited (files on disk) | |
| 60 | | Management | Agent curated via `memory` tool | Agent created via `skill_manage` | |
| 61 | | Token cost | Fixed per session | Variable (loaded when needed) | |
| 62 | |
| 63 | **Memory = facts** (environment, preferences). **Skills = procedures** (multi-step workflows). |
| 64 | |
| 65 | ### 4. Capacity Management |
| 66 | |
| 67 | **Char limits:** |
| 68 | |
| 69 | | Store | Limit | Typical entries | |
| 70 | | ------ | ----------- | --------------- | |
| 71 | | memory | 2,200 chars | 8-15 entries | |
| 72 | | user | 1,375 chars | 5-10 entries | |
| 73 | |
| 74 | **When memory is full**, add returns error with current entries. Agent should: |
| 75 | |
| 76 | 1. Read current entries |
| 77 | 2. Remove or consolidate |
| 78 | 3. Replace merged entries (shorter) |
| 79 | 4. Re-add new entry |
| 80 | |
| 81 | **Best practice**: Above 80% capacity, consolidate before adding. Merge related facts. |
| 82 | |
| 83 | **Good entries:** |
| 84 | |
| 85 | ```text |
| 86 | # Packs multiple facts |
| 87 | User runs macOS 14 Sonoma, uses Homebrew, has Docker Desktop. Shell: zsh with oh-my-zsh. |
| 88 | |
| 89 | # Specific convention |
| 90 | Project ~/code/api uses Go 1.22, sqlc for DB queries, chi router. Run tests with 'make test'. |
| 91 | ``` |
| 92 | |
| 93 | **Bad entries:** |
| 94 | |
| 95 | ```text |
| 96 | # Too vague |
| 97 | User has a project. |
| 98 | |
| 99 | # Too verbose |
| 100 | On January 5th, 2026, the user asked me to look at... |
| 101 | ``` |
| 102 | |
| 103 | ### 5. Memory Config |
| 104 | |
| 105 | ```yaml |
| 106 | # ~/.hermes/config.yaml |
| 107 | memory: |
| 108 | memory_enabled: true |
| 109 | user_profile_enabled: true |
| 110 | memory_char_limit: 2200 |
| 111 | user_char_limit: 1375 |
| 112 | write_approval: false # false=write freely | true=require approval |
| 113 | ``` |
| 114 | |
| 115 | **`write_approval: true`** gates all saves. Use `/memory` commands in session: |
| 116 | |
| 117 | ```text |
| 118 | /memory pending # List staged writes |
| 119 | /memory approve <id> # Apply one (or 'all') |
| 120 | /memory reject <id> # Drop one (or 'all') |
| 121 | /memory approval on # Turn gate on/off |
| 122 | ``` |
| 123 | |
| 124 | ### 6. Session Search vs Memory |
| 125 | |
| 126 | | Feature | Memory | Session Search | |
| 127 | | -------- | -------------------------- | ------------------- | |
| 128 | | Capacity | ~1,30 |