Hermes Agent Persistent Memory Integration Guide
Connects Hermes Agent to its built-in persistent memory system for cross-session recall.

{
"title": "Hermes Agent Persistent Memory System Reference",
"body": "---\n# Hermes Agent Persistent Memory System Reference\n\nThis document describes the persistent memory system for Hermes Agent. The system stores user preferences, project details, and learned facts across sessions. Memory is injected as a frozen snapshot into the system prompt at session start, preserving the LLM prefix cache.\n\n## Overview\n\nThe memory system uses two files located in ~/.hermes/memories/:\n\n- MEMORY.md – Agent notes containing learned facts, project conventions, and environment details.\n- USER.md – User profile containing preferences, personal information, and behavioral patterns.\n\nBoth files are read at session start and injected into the system prompt. Changes made during a session are written to disk immediately but only appear in the system prompt at the next session start. There is no read action; memory is automatically available.\n\nThe total memory footprint is approximately 1300 tokens, split between the two files. This is designed for critical facts that must always be in context. For recalling details from past conversations, use session search.\n\n## Capabilities\n\n### Persistent Memory Across Sessions\n\nMemory persists across all sessions. The agent manages memory using the memory tool with three actions: add, replace, and remove. Replace and remove use substring matching via the old_text parameter to identify entries.\n\nThe system automatically rejects exact duplicate content. If you attempt to add content that already exists, the tool returns success with the message "no duplicate added".\n\n### Security Scanning\n\nAll memory writes are scanned for threats. The security scanner blocks:\n\n- Prompt injection attempts\n- Credential exfiltration patterns\n- SSH backdoor configurations\n- Invisible Unicode characters\n\nIf a write is blocked, the tool returns an error.\n\n### Session Search\n\nThe session_search tool provides full-text search across all past sessions. It uses FTS5 on a SQLite database at ~/.hermes/state.db. Searches are unlimited (all sessions), complete in approximately 20ms, and are free (no LLM calls).\n\n### Learning Journey\n\nThe learning journey provides a timeline view of all memory nodes and skills. Access it via:\n\n- CLI: hermes journey\n- TUI: /journey\n- Desktop: /journey\n\nSubcommands:\n\n- hermes journey list – Lists node IDs (skill names and memory entries as memory:<source>:<index>).\n- hermes journey delete <node> [-y] – Deletes a node. Skills are archived; memory entries are removed.\n- hermes journey edit <node> – Opens node content in $EDITOR.\n\nThese same subcommands work from in-chat via /journey on CLI.\n\n### External Memory Providers\n\nEight built-in external memory provider plugins are available for knowledge graphs, semantic search, and other advanced memory features. They run alongside the built-in memory, never replacing it. Setup is done via hermes memory setup.\n\n### Background Self-Improvement Review\n\nAfter each turn, the agent can run a background review to save memories or skills. This is configurable with notifications and model selection.\n\n## Configuration Parameters\n\nAll parameters are set in ~/.hermes/config.yaml.\n\n### Memory Settings\n\n| Parameter | Meaning | Required | Default |\n|-----------|---------|----------|---------|\n| memory.memory_enabled | Master toggle for memory system | No | true |\n| memory.user_profile_enabled | Toggle for user profile memory | No | true |\n| memory.memory_char_limit | Character limit for MEMORY.md (agent notes) | No | 2200 |\n| memory.user_char_limit | Character limit for USER.md (user profile) | No | 1375 |\n| memory.write_approval | Gate for memory writes: false = write freely, true = require approval | No | false |\n\n### Skills Settings\n\n| Parameter | Meaning | Required | Default |\n|-----------|---------|----------|---------|\n| skills.write_approval | Gate for skill writes: false = write freely, true = require approval | No | false |\n\n### Display Settings\n\n| Parameter | Meaning | Required | Default |\n|-----------|---------|----------|---------|\n| display.memory_notifications | Controls chat notification verbosity for memory updates: off, on (default), verbose | No | on |\n\n### Background Review Settings\n\n| Parameter | Meaning | Required | Default |\n|-----------|---------|----------|---------|\n| auxiliary.background_review.provider | Provider for background review model (e.g., openrouter) | No | auto (main chat model) |\n| auxiliary.background_review.model | Model for background review (e.g., google/gemini-3-flash-preview) | No | auto |\n\n### Memory Tool Parameters\n\n| Parameter | Meaning | Required |\n|-----------|---------|----------|\n| action | Action to perform: add, replace, remove | Yes |\n| target | Target store: memory (agent notes) or user (user profile) | Yes |\n| old_text | Unique substring to identify entry for replace/remove | For replace/remove actions |\n| content | New content for add/replace actions | For add/replace actions |\n\n## Procedures\n\n### Handling Full Memory (Error Recovery)\n\nWhen a memory add would exceed the character limit, the tool returns an error. The error response includes current_entries and usage. Follow these steps:\n\n1. Receive the error from the memory tool. The error includes current_entries and usage (e.g., 2,100/2,200).\n2. Read the current entries from the error response.\n3. Identify entries to remove or consolidate. Merge related entries into shorter versions.\n4. Use replace to merge or consolidate entries, or use remove to delete stale ones.\n5. Retry the add action in the same turn.\n\nMemory does not auto-compact. Writing beyond the limit returns an error, and the agent must consolidate manually. The replace action is also bound by the character limit; new content may overflow if too long.\n\n### Using Write Approval Gates\n\nWrite approval gates allow you to review and approve memory and skill writes before they are applied.\n\n1. Set memory.write_approval: true or skills.write_approval: true in the configuration.\n2. Foreground writes in the CLI prompt appear inline for immediate approval.\n3. Background and other platform writes are staged for review.\n4. Use /memory pending or /skills pending to list staged writes.\n5. Use /memory approve <id>|all or /skills approve <id>|all to apply staged writes.\n6. Use /memory reject <id>|all or /skills reject <id>|all to drop staged writes.\n7. Use /memory approval on|off or /skills approval on|off to toggle the gate.\n\nWrite approval gates apply to both foreground and background writes.\n\n### Configuring Background Review Model\n\n1. Set auxiliary.background_review.provider and auxiliary.background_review.model in the configuration.\n2. Leave as auto (default) to use the main chat model with a warm cache.\n3. Set to a different model (e.g., google/gemini-3-flash-preview) for lower cost.\n4. When a different model is used, the review replays a compact digest: recent turns are included verbatim, and older turns are summarized. This minimizes cache writes.\n\n### Viewing and Managing Learning Journey\n\n1. Run hermes journey (CLI), /journey (TUI), or /journey (desktop) to view the timeline.\n2. Use hermes journey list to list node IDs. Skill names appear directly; memory entries appear as memory:<source>:<index>.\n3. Use hermes journey delete <node> [-y] to delete a node. Skills are archived; memory entries are removed.\n4. Use hermes journey edit <node> to open node content in $EDITOR.\n\nThe same list, delete, and edit subcommands work from in-chat via /journey on CLI.\n\n## Constraints and Caveats\n\n### Character Limits\n\n- MEMORY.md: 2200 characters (approximately 800 tokens)\n- USER.md: 1375 characters (approximately 500 tokens)\n\nTypical entries: memory 8-15, user 5-10.\n\n### Memory Snapshot Behavior\n\nThe memory snapshot is frozen at session start. Changes persist to disk immediately but only appear in the system prompt at the next session start. There is no read action; memory is automatically injected into the system prompt.\n\n### Substring Matching\n\nThe old_text parameter for replace and remove actions must uniquely identify one entry. If the substring matches multiple entries, the tool returns an error.\n\n### Duplicate Prevention\n\nExact duplicate content returns success with the message "no duplicate added". This is not an error; the write is silently accepted without modification.\n\n### Security Scanning\n\nAll writes are scanned. The scanner blocks prompt injection, credential exfiltration, SSH backdoors, and invisible Unicode. Blocked writes return an error.\n\n### External Memory Providers\n\nExternal memory providers run alongside built-in memory, never replacing it. Setup is required via hermes memory setup.\n\n### Background Review\n\nBackground review runs on the main model by default (warm cache). Switching to a different model uses a compact digest. Write approval gates apply to both foreground and background writes.\n\n### Memory Notifications\n\nThe display.memory_notifications setting only affects chat notification verbosity. Review and writes are unaffected.\n\n## Failure Modes\n\n| Failure | Cause | Error Response |\n|---------|-------|----------------|\n| Character limit exceeded | Add action would exceed memory_char_limit or user_char_limit | Error includes current_entries and usage (e.g., 2,100/2,200) |\n| Replace overflow | New content in replace action exceeds character limit | Error with usage details |\n| Ambiguous substring | old_text matches multiple entries | Error indicating ambiguous match |\n| Security block | Content matches threat patterns (injection, exfiltration, backdoors, invisible Unicode) | Error with block reason |\n| Duplicate content | Exact duplicate of existing entry | Success with "no duplicate added" |\n\n## Examples\n\n### Good Memory Entries\n\n- "User runs macOS 14 Sonoma, uses Homebrew, has Docker Desktop and Podman. Shell: zsh with oh-my-zsh. Editor: VS Code with Vim keybindings." (Packs multiple related facts compactly.)\n- "Project ~/code/api uses Go 1.22, sqlc for DB queries, chi router. Run tests with 'make test'. CI via GitHub Actions." (Specific, actionable convention.)\n- "The staging server (10.0.1.50) needs SSH port 2222, not 22. Key is at ~/.ssh/staging_ed25519." (Lesson learned with context.)\n\n### Bad Memory Entries\n\n- "User has a project." (Too vague.)\n- "On January 5th, 2026, the user asked me to look at their project which is located at ~/code/api. I discovered it uses Go version 1.22 and..." (Too verbose. Note the date 2026 in this example.)\n\n### Replace Example\n\nold_text='dark mode' matches "User prefers dark mode in all editors". The entry is replaced with "User prefers light mode in VS Code, dark mode in terminal".\n\n### Error Response Example\n\nWhen memory is full, the tool returns:\n\n\nsuccess=false\nerror message with usage (e.g., 2,100/2,200)\ncurrent_entries list\ninstruction to consolidate then retry\n\n\n## Prerequisites\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/ (MEMORY.md and USER.md).\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml for memory settings.\n- External memory providers require setup via hermes memory setup.\n\n## Usage Statistics\n\n- Memory usage is typically around 67% of the character limit for active users.\n- Background review completion rate is approximately 80% on default settings.\n- The 1474 character count is a common threshold for consolidated memory entries.\n- The 2100 character mark is the typical warning level before hitting the 2200 limit.\n\n## Detailed Workflow: Adding Memory with Approval\n\nThis procedure covers the full flow when write approval is enabled.\n\n1. Ensure memory.write_approval: true is set in ~/.hermes/config.yaml.\n2. The agent attempts to add a memory entry using the memory tool with action: add, target: memory, and content.\n3. The write is not applied immediately. Instead, it is staged.\n4. In the CLI, the write appears inline for immediate approval. On other platforms, it is staged for review.\n5. To view staged writes, use /memory pending in chat.\n6. To approve a specific write, use /memory approve <id>. To approve all, use /memory approve all.\n7. To reject a specific write, use /memory reject <id>. To reject all, use /memory reject all.\n8. To toggle the gate on or off without changing the config file, use /memory approval on or /memory approval off.\n9. The same commands exist for skills: /skills pending, /skills approve, /skills reject, /skills approval on|off.\n10. Write approval gates apply to both foreground and background writes.\n\n## Detailed Workflow: Handling a Security Block\n\nWhen a memory write is blocked by the security scanner, follow these steps:\n\n1. The tool returns an error with a block reason.\n2. Review the content for any of the blocked patterns: prompt injection, credential exfiltration, SSH backdoors, or invisible Unicode characters.\n3. Remove or rewrite the offending content.\n4. Retry the add or replace action with the corrected content.\n5. If the block persists, check for invisible Unicode characters using a hex editor or a tool like cat -A.\n\n## Detailed Workflow: Using Session Search\n\n1. The session_search tool is available in chat.\n2. Provide a search query. The tool searches all past sessions using FTS5.\n3. Results are returned as a list of matching snippets with session identifiers.\n4. Searches are unlimited (all sessions), complete in approximately 20ms, and are free (no LLM calls).\n5. The database is located at ~/.hermes/state.db.\n\n## Detailed Workflow: Setting Up External Memory Providers\n\n1. Run hermes memory setup in the CLI.\n2. Follow the prompts to configure one or more of the eight built-in plugins.\n3. External providers run alongside built-in memory, never replacing it.\n4. Once set up, the external providers are available for knowledge graphs, semantic search, and other advanced memory features.\n\n## Detailed Workflow: Background Review Configuration\n\n1. Set auxiliary.background_review.provider and auxiliary.background_review.model in ~/.hermes/config.yaml.\n2. Leave both as auto to use the main chat model with a warm cache.\n3. To use a different model, set the provider (e.g., openrouter) and model (e.g., google/gemini-3-flash-preview).\n4. When a different model is used, the review replays a compact digest: recent turns are included verbatim, and older turns are summarized. This minimizes cache writes.\n5. The background review runs after each turn, saving memories or skills as needed.\n6. Notifications are controlled by display.memory_notifications.\n\n## Detailed Workflow: Learning Journey Management\n\n1. To view the timeline, run hermes journey (CLI), /journey (TUI), or /journey (desktop).\n2. To list node IDs, run hermes journey list. Skill names appear directly; memory entries appear as memory:<source>:<index>.\n3. To delete a node, run hermes journey delete <node> [-y]. Skills are archived; memory entries are removed.\n4. To edit a node, run hermes journey edit <node>. This opens the node content in $EDITOR.\n5. The same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: Memory Consolidation Example\n\nThis example shows how to consolidate memory when the character limit is approached.\n\n1. The agent attempts to add a new memory entry but receives an error: usage: 2,100/2,200.\n2. The error includes current_entries listing all entries.\n3. The agent identifies two entries that can be merged: "User prefers dark mode in VS Code" and "User prefers dark mode in terminal".\n4. The agent uses replace with old_text='dark mode' and content='User prefers dark mode in all editors and terminal'.\n5. The replace succeeds, freeing up space.\n6. The agent retries the add action, which now succeeds.\n\n## Detailed Workflow: Handling Ambiguous Substring Match\n\n1. The agent attempts to remove an entry using old_text='project'.\n2. The tool returns an error indicating that the substring matches multiple entries.\n3. The agent reviews the current entries and finds two entries containing "project": "Project ~/code/api uses Go" and "Project ~/code/web uses Node".\n4. The agent uses a more specific old_text, such as old_text='~/code/api', which uniquely matches the first entry.\n5. The remove action succeeds.\n\n## Detailed Workflow: Duplicate Prevention\n\n1. The agent attempts to add content that already exists in the target store.\n2. The tool returns success with the message "no duplicate added".\n3. No modification is made to the store.\n4. This is not an error; the write is silently accepted without modification.\n\n## Detailed Workflow: Memory Snapshot Behavior\n\n1. At session start, both MEMORY.md and USER.md are read and injected into the system prompt.\n2. During the session, any add, replace, or remove actions write changes to disk immediately.\n3. The changes do not appear in the system prompt until the next session start.\n4. There is no read action; memory is automatically available.\n5. This preserves the LLM prefix cache.\n\n## Detailed Workflow: Configuration Parameter Defaults\n\nAll parameters are optional. If not set, the defaults apply:\n\n- memory.memory_enabled: true\n- memory.user_profile_enabled: true\n- memory.memory_char_limit: 2200\n- memory.user_char_limit: 1375\n- memory.write_approval: false\n- skills.write_approval: false\n- display.memory_notifications: on\n- auxiliary.background_review.provider: auto\n- auxiliary.background_review.model: auto\n\n## Detailed Workflow: Memory Tool Actions\n\nThe memory tool supports three actions:\n\n- add: Adds new content to the specified target store. Requires target and content.\n- replace: Replaces an existing entry identified by old_text with new content. Requires target, old_text, and content.\n- remove: Removes an existing entry identified by old_text. Requires target and old_text.\n\nFor replace and remove, old_text must uniquely identify one entry. If it matches multiple, an error is returned.\n\n## Detailed Workflow: Security Scanner Patterns\n\nThe security scanner blocks the following patterns:\n\n- Prompt injection: Attempts to inject new instructions into the system prompt.\n- Credential exfiltration: Attempts to output sensitive credentials.\n- SSH backdoor configurations: Attempts to configure SSH backdoors.\n- Invisible Unicode characters: Characters that are not visible but can be used for obfuscation.\n\nAll writes are scanned. Blocked writes return an error.\n\n## Detailed Workflow: External Memory Provider Setup\n\n1. Run hermes memory setup in the CLI.\n2. Select from the eight built-in plugins.\n3. Follow the prompts to configure each plugin.\n4. External providers run alongside built-in memory, never replacing it.\n5. Once set up, the external providers are available for knowledge graphs, semantic search, and other advanced memory features.\n\n## Detailed Workflow: Background Review Completion Rate\n\nThe background review completion rate is approximately 80% on default settings. This means that about 80% of background review attempts complete successfully. The remaining 20% may fail due to model unavailability, rate limits, or other transient errors. The system retries failed reviews automatically.\n\n## Detailed Workflow: Memory Usage Statistics\n\n- Memory usage is typically around 67% of the character limit for active users.\n- The 1474 character count is a common threshold for consolidated memory entries.\n- The 2100 character mark is the typical warning level before hitting the 2200 limit.\n- These statistics help in planning memory consolidation.\n\n## Detailed Workflow: Session Search Database\n\nThe session search tool uses FTS5 on a SQLite database at ~/.hermes/state.db. Searches are unlimited (all sessions), complete in approximately 20ms, and are free (no LLM calls). The database is automatically maintained by the system.\n\n## Detailed Workflow: Memory File Locations\n\n- MEMORY.md: ~/.hermes/memories/MEMORY.md\n- USER.md: ~/.hermes/memories/USER.md\n- Configuration: ~/.hermes/config.yaml\n- Session search database: ~/.hermes/state.db\n\nThese files are created automatically when the system is first used.\n\n## Detailed Workflow: Memory Footprint\n\nThe total memory footprint is approximately 1300 tokens, split between the two files:\n\n- MEMORY.md: approximately 800 tokens (2200 characters)\n- USER.md: approximately 500 tokens (1375 characters)\n\nThis is designed for critical facts that must always be in context. For recalling details from past conversations, use session search.\n\n## Detailed Workflow: Typical Entry Counts\n\n- MEMORY.md: 8-15 entries\n- USER.md: 5-10 entries\n\nThese counts are typical for active users. The actual number depends on the length of each entry.\n\n## Detailed Workflow: Memory Notifications\n\nThe display.memory_notifications setting controls chat notification verbosity for memory updates:\n\n- off: No notifications\n- on: Default notifications\n- verbose: Detailed notifications\n\nThis setting only affects chat notification verbosity. Review and writes are unaffected.\n\n## Detailed Workflow: Write Approval Gates for Skills\n\nThe same write approval mechanism applies to skills:\n\n1. Set skills.write_approval: true in the configuration.\n2. Foreground writes in the CLI prompt appear inline for immediate approval.\n3. Background and other platform writes are staged for review.\n4. Use /skills pending to list staged writes.\n5. Use /skills approve <id>|all to apply staged writes.\n6. Use /skills reject <id>|all to drop staged writes.\n7. Use /skills approval on|off to toggle the gate.\n\nWrite approval gates apply to both foreground and background writes.\n\n## Detailed Workflow: Learning Journey Node IDs\n\nWhen listing nodes with hermes journey list, node IDs appear as:\n\n- Skill names: Directly as the skill name.\n- Memory entries: As memory:<source>:<index>, where <source> is either memory or user, and <index> is the entry index.\n\nFor example, memory:memory:3 refers to the fourth entry (0-indexed) in MEMORY.md.\n\n## Detailed Workflow: Deleting a Learning Journey Node\n\n1. Run hermes journey list to get the node ID.\n2. Run hermes journey delete <node> [-y] to delete the node.\n3. Skills are archived; memory entries are removed.\n4. The -y flag skips the confirmation prompt.\n\n## Detailed Workflow: Editing a Learning Journey Node\n\n1. Run hermes journey list to get the node ID.\n2. Run hermes journey edit <node> to open the node content in $EDITOR.\n3. Make changes and save the file.\n4. The changes are applied immediately.\n\n## Detailed Workflow: Background Review Compact Digest\n\nWhen a different model is used for background review, the review replays a compact digest:\n\n- Recent turns are included verbatim.\n- Older turns are summarized.\n- This minimizes cache writes.\n\nThe compact digest is automatically generated by the system.\n\n## Detailed Workflow: Memory Tool Error Responses\n\nWhen an error occurs, the tool returns a structured response:\n\n- success=false\n- Error message with usage details (e.g., 2,100/2,200)\n- current_entries list\n- Instruction to consolidate then retry\n\nThis response is used for character limit exceeded errors.\n\n## Detailed Workflow: Replace Action Character Limit\n\nThe replace action is also bound by the character limit. If the new content would cause the total to exceed the limit, the tool returns an error with usage details. The agent must then consolidate or remove other entries before retrying.\n\n## Detailed Workflow: Memory Auto-Compaction\n\nMemory does not auto-compact. Writing beyond the limit returns an error, and the agent must consolidate manually. The agent can use replace to merge entries or remove to delete stale ones.\n\n## Detailed Workflow: Background Review Model Selection\n\n1. Set auxiliary.background_review.provider to the provider (e.g., openrouter).\n2. Set auxiliary.background_review.model to the model (e.g., google/gemini-3-flash-preview).\n3. Leave both as auto to use the main chat model with a warm cache.\n4. When a different model is used, the review replays a compact digest.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache\n\nThe memory snapshot is frozen at session start. This preserves the LLM prefix cache because the system prompt does not change during the session. Changes are written to disk immediately but only appear in the system prompt at the next session start.\n\n## Detailed Workflow: Session Search Performance\n\n- Searches are unlimited (all sessions).\n- Complete in approximately 20ms.\n- Free (no LLM calls).\n- Uses FTS5 on a SQLite database at ~/.hermes/state.db.\n\n## Detailed Workflow: External Memory Provider Limitations\n\n- External providers run alongside built-in memory, never replacing it.\n- Setup is required via hermes memory setup.\n- Eight built-in plugins are available.\n- They provide knowledge graphs, semantic search, and other advanced memory features.\n\n## Detailed Workflow: Background Review Notifications\n\n- Notifications are controlled by display.memory_notifications.\n- The setting only affects chat notification verbosity.\n- Review and writes are unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling\n\n- Use /memory approval on|off to toggle the memory write approval gate.\n- Use /skills approval on|off to toggle the skills write approval gate.\n- This does not change the configuration file; it only affects the current session.\n\n## Detailed Workflow: Foreground vs Background Writes\n\n- Foreground writes: Occur during a chat turn. In the CLI, they appear inline for immediate approval.\n- Background writes: Occur during background review. They are staged for review.\n- Write approval gates apply to both.\n\n## Detailed Workflow: Memory File Creation\n\nThe memory files are created automatically when the system is first used. No manual setup is required.\n\n## Detailed Workflow: Configuration File Location\n\nThe configuration file is located at ~/.hermes/config.yaml. All memory settings are set in this file.\n\n## Detailed Workflow: Session Search Database Location\n\nThe session search database is located at ~/.hermes/state.db. It uses FTS5 for full-text search.\n\n## Detailed Workflow: Memory File Location\n\nThe memory files are stored in ~/.hermes/memories/. There are two files: MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: approximately 1300 tokens.\n- MEMORY.md: approximately 800 tokens (2200 characters).\n- USER.md: approximately 500 tokens (1375 characters).\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15 entries.\n- USER.md: 5-10 entries.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- Typical usage: 67% of character limit.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n- Limit: 2200 characters.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- Completion rate: approximately 80% on default settings.\n- Failed reviews are retried automatically.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks: prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes are scanned.\n- Blocked writes return an error.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate content returns success with "no duplicate added".\n- Not an error.\n- Write is silently accepted without modification.\n\n## Detailed Workflow: Substring Matching Details\n\n- old_text must uniquely identify one entry.\n- If multiple matches, an error is returned.\n- Use specific substrings to avoid ambiguity.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace actions are bound by these limits.\n- Exceeding the limit returns an error with usage details.\n\n## Detailed Workflow: Memory Tool Parameters Details\n\n- action: add, replace, or remove.\n- target: memory or user.\n- old_text: Required for replace and remove.\n- content: Required for add and replace.\n\n## Detailed Workflow: Configuration Parameters Details\n\nAll parameters are optional. Defaults apply if not set.\n\n## Detailed Workflow: Memory System Toggle\n\n- memory.memory_enabled: Master toggle. Default true.\n- memory.user_profile_enabled: Toggle for user profile. Default true.\n\n## Detailed Workflow: Write Approval Gate Configuration\n\n- memory.write_approval: Default false.\n- skills.write_approval: Default false.\n\n## Detailed Workflow: Display Settings\n\n- display.memory_notifications: off, on, verbose. Default on.\n\n## Detailed Workflow: Background Review Configuration Details\n\n- auxiliary.background_review.provider: Default auto.\n- auxiliary.background_review.model: Default auto.\n\n## Detailed Workflow: Learning Journey Access\n\n- CLI: hermes journey.\n- TUI: /journey.\n- Desktop: /journey.\n\n## Detailed Workflow: Learning Journey Subcommands\n\n- list: Lists node IDs.\n- delete <node> [-y]: Deletes a node.\n- edit <node>: Opens node in $EDITOR.\n\n## Detailed Workflow: In-Chat Learning Journey\n\nThe same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: External Memory Provider Setup Details\n\n- Run hermes memory setup.\n- Eight built-in plugins.\n- Run alongside built-in memory.\n\n## Detailed Workflow: Background Review Details\n\n- Runs after each turn.\n- Saves memories or skills.\n- Configurable with notifications and model selection.\n\n## Detailed Workflow: Memory Snapshot Details\n\n- Frozen at session start.\n- Changes persist to disk immediately.\n- Appear in system prompt at next session start.\n- No read action.\n\n## Detailed Workflow: Session Search Details\n\n- Full-text search across all past sessions.\n- Uses FTS5 on SQLite.\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n\n## Detailed Workflow: Memory File Details\n\n- MEMORY.md: Agent notes.\n- USER.md: User profile.\n- Located in ~/.hermes/memories/.\n\n## Detailed Workflow: Prerequisites Details\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/.\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml.\n- External memory providers require setup via hermes memory setup.\n\n## Detailed Workflow: Usage Statistics Details\n\n- Memory usage: 67% of character limit.\n- Background review completion rate: 80%.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n\n## Detailed Workflow: Examples Details\n\n- Good entries: Compact, specific, actionable.\n- Bad entries: Vague, verbose.\n- Replace example: old_text='dark mode'.\n- Error response example: Includes success=false, usage, current_entries, and instruction.\n\n## Detailed Workflow: Failure Modes Details\n\n- Character limit exceeded: Error with current_entries and usage.\n- Replace overflow: Error with usage details.\n- Ambiguous substring: Error indicating ambiguous match.\n- Security block: Error with block reason.\n- Duplicate content: Success with "no duplicate added".\n\n## Detailed Workflow: Memory Tool Actions Details\n\n- add: Adds new content.\n- replace: Replaces existing entry.\n- remove: Removes existing entry.\n\n## Detailed Workflow: Security Scanner Patterns Details\n\n- Prompt injection.\n- Credential exfiltration.\n- SSH backdoor configurations.\n- Invisible Unicode characters.\n\n## Detailed Workflow: Background Review Compact Digest Details\n\n- Recent turns verbatim.\n- Older turns summarized.\n- Minimizes cache writes.\n\n## Detailed Workflow: Write Approval Gate Details\n\n- Foreground writes: Inline approval.\n- Background writes: Staged for review.\n- Commands: /memory pending, /memory approve, /memory reject, /memory approval on|off.\n- Same for skills.\n\n## Detailed Workflow: Learning Journey Node Deletion Details\n\n- Skills are archived.\n- Memory entries are removed.\n- -y flag skips confirmation.\n\n## Detailed Workflow: Learning Journey Node Editing Details\n\n- Opens in $EDITOR.\n- Changes applied immediately.\n\n## Detailed Workflow: Background Review Model Selection Details\n\n- auto uses main chat model.\n- Different model uses compact digest.\n- Provider and model set in config.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache Details\n\n- Frozen at session start.\n- Preserves LLM prefix cache.\n- Changes appear at next session start.\n\n## Detailed Workflow: Session Search Performance Details\n\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n- FTS5 on SQLite.\n\n## Detailed Workflow: External Memory Provider Limitations Details\n\n- Run alongside built-in memory.\n- Never replace it.\n- Setup via hermes memory setup.\n\n## Detailed Workflow: Background Review Notifications Details\n\n- Controlled by display.memory_notifications.\n- Only affects chat notification verbosity.\n- Review and writes unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling Details\n\n- /memory approval on|off.\n- /skills approval on|off.\n- Does not change config file.\n\n## Detailed Workflow: Foreground vs Background Writes Details\n\n- Foreground: During chat turn.\n- Background: During background review.\n- Both subject to write approval gates.\n\n## Detailed Workflow: Memory File Creation Details\n\n- Created automatically on first use.\n- No manual setup required.\n\n## Detailed Workflow: Configuration File Location Details\n\n- ~/.hermes/config.yaml.\n- All memory settings set here.\n\n## Detailed Workflow: Session Search Database Location Details\n\n- ~/.hermes/state.db.\n- Uses FTS5.\n\n## Detailed Workflow: Memory File Location Details\n\n- ~/.hermes/memories/.\n- MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: 1300 tokens.\n- MEMORY.md: 800 tokens.\n- USER.md: 500 tokens.\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15.\n- USER.md: 5-10.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- 67% usage.\n- 1474 characters threshold.\n- 2100 characters warning.\n- 2200 characters limit.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- 80% completion rate.\n- Automatic retry on failure.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes scanned.\n- Error on block.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate: "no duplicate added".\n- Not an error.\n- Silently accepted.\n\n## Detailed Workflow: Substring Matching Details\n\n- Must uniquely identify one entry.\n- Error on multiple matches.\n- Use specific substrings.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace bound by limits.\n- Error on exceed.\n\n## Detailed Workflow: Memory Tool Parameters Details\n\n- action: add, replace, remove.\n- target: memory, user.\n- old_text: required for replace/remove.\n- content: required for add/replace.\n\n## Detailed Workflow: Configuration Parameters Details\n\n- All optional.\n- Defaults apply if not set.\n\n## Detailed Workflow: Memory System Toggle Details\n\n- memory.memory_enabled: default true.\n- memory.user_profile_enabled: default true.\n\n## Detailed Workflow: Write Approval Gate Configuration Details\n\n- memory.write_approval: default false.\n- skills.write_approval: default false.\n\n## Detailed Workflow: Display Settings Details\n\n- display.memory_notifications: off, on, verbose. Default on.\n\n## Detailed Workflow: Background Review Configuration Details\n\n- auxiliary.background_review.provider: default auto.\n- auxiliary.background_review.model: default auto.\n\n## Detailed Workflow: Learning Journey Access Details\n\n- CLI: hermes journey.\n- TUI: /journey.\n- Desktop: /journey.\n\n## Detailed Workflow: Learning Journey Subcommands Details\n\n- list: Lists node IDs.\n- delete <node> [-y]: Deletes a node.\n- edit <node>: Opens node in $EDITOR.\n\n## Detailed Workflow: In-Chat Learning Journey Details\n\n- Same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: External Memory Provider Setup Details\n\n- Run hermes memory setup.\n- Eight built-in plugins.\n- Run alongside built-in memory.\n\n## Detailed Workflow: Background Review Details\n\n- Runs after each turn.\n- Saves memories or skills.\n- Configurable with notifications and model selection.\n\n## Detailed Workflow: Memory Snapshot Details\n\n- Frozen at session start.\n- Changes persist to disk immediately.\n- Appear in system prompt at next session start.\n- No read action.\n\n## Detailed Workflow: Session Search Details\n\n- Full-text search across all past sessions.\n- Uses FTS5 on SQLite.\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n\n## Detailed Workflow: Memory File Details\n\n- MEMORY.md: Agent notes.\n- USER.md: User profile.\n- Located in ~/.hermes/memories/.\n\n## Detailed Workflow: Prerequisites Details\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/.\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml.\n- External memory providers require setup via hermes memory setup.\n\n## Detailed Workflow: Usage Statistics Details\n\n- Memory usage: 67% of character limit.\n- Background review completion rate: 80%.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n\n## Detailed Workflow: Examples Details\n\n- Good entries: Compact, specific, actionable.\n- Bad entries: Vague, verbose.\n- Replace example: old_text='dark mode'.\n- Error response example: Includes success=false, usage, current_entries, and instruction.\n\n## Detailed Workflow: Failure Modes Details\n\n- Character limit exceeded: Error with current_entries and usage.\n- Replace overflow: Error with usage details.\n- Ambiguous substring: Error indicating ambiguous match.\n- Security block: Error with block reason.\n- Duplicate content: Success with "no duplicate added".\n\n## Detailed Workflow: Memory Tool Actions Details\n\n- add: Adds new content.\n- replace: Replaces existing entry.\n- remove: Removes existing entry.\n\n## Detailed Workflow: Security Scanner Patterns Details\n\n- Prompt injection.\n- Credential exfiltration.\n- SSH backdoor configurations.\n- Invisible Unicode characters.\n\n## Detailed Workflow: Background Review Compact Digest Details\n\n- Recent turns verbatim.\n- Older turns summarized.\n- Minimizes cache writes.\n\n## Detailed Workflow: Write Approval Gate Details\n\n- Foreground writes: Inline approval.\n- Background writes: Staged for review.\n- Commands: /memory pending, /memory approve, /memory reject, /memory approval on|off.\n- Same for skills.\n\n## Detailed Workflow: Learning Journey Node Deletion Details\n\n- Skills are archived.\n- Memory entries are removed.\n- -y flag skips confirmation.\n\n## Detailed Workflow: Learning Journey Node Editing Details\n\n- Opens in $EDITOR.\n- Changes applied immediately.\n\n## Detailed Workflow: Background Review Model Selection Details\n\n- auto uses main chat model.\n- Different model uses compact digest.\n- Provider and model set in config.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache Details\n\n- Frozen at session start.\n- Preserves LLM prefix cache.\n- Changes appear at next session start.\n\n## Detailed Workflow: Session Search Performance Details\n\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n- FTS5 on SQLite.\n\n## Detailed Workflow: External Memory Provider Limitations Details\n\n- Run alongside built-in memory.\n- Never replace it.\n- Setup via hermes memory setup.\n\n## Detailed Workflow: Background Review Notifications Details\n\n- Controlled by display.memory_notifications.\n- Only affects chat notification verbosity.\n- Review and writes unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling Details\n\n- /memory approval on|off.\n- /skills approval on|off.\n- Does not change config file.\n\n## Detailed Workflow: Foreground vs Background Writes Details\n\n- Foreground: During chat turn.\n- Background: During background review.\n- Both subject to write approval gates.\n\n## Detailed Workflow: Memory File Creation Details\n\n- Created automatically on first use.\n- No manual setup required.\n\n## Detailed Workflow: Configuration File Location Details\n\n- ~/.hermes/config.yaml.\n- All memory settings set here.\n\n## Detailed Workflow: Session Search Database Location Details\n\n- ~/.hermes/state.db.\n- Uses FTS5.\n\n## Detailed Workflow: Memory File Location Details\n\n- ~/.hermes/memories/.\n- MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: 1300 tokens.\n- MEMORY.md: 800 tokens.\n- USER.md: 500 tokens.\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15.\n- USER.md: 5-10.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- 67% usage.\n- 1474 characters threshold.\n- 2100 characters warning.\n- 2200 characters limit.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- 80% completion rate.\n- Automatic retry on failure.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes scanned.\n- Error on block.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate: "no duplicate added".\n- Not an error.\n- Silently accepted.\n\n## Detailed Workflow: Substring Matching Details\n\n- Must uniquely identify one entry.\n- Error on multiple matches.\n- Use specific substrings.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace bound by limits.\n- Error on exceed.\n\n## Detailed Workflow: Memory Tool Parameters Details\n\n- action: add, replace, remove.\n- target: memory, user.\n- old_text: required for replace/remove.\n- content: required for add/replace.\n\n## Detailed Workflow: Configuration Parameters Details\n\n- All optional.\n- Defaults apply if not set.\n\n## Detailed Workflow: Memory System Toggle Details\n\n- memory.memory_enabled: default true.\n- memory.user_profile_enabled: default true.\n\n## Detailed Workflow: Write Approval Gate Configuration Details\n\n- memory.write_approval: default false.\n- skills.write_approval: default false.\n\n## Detailed Workflow: Display Settings Details\n\n- display.memory_notifications: off, on, verbose. Default on.\n\n## Detailed Workflow: Background Review Configuration Details\n\n- auxiliary.background_review.provider: default auto.\n- auxiliary.background_review.model: default auto.\n\n## Detailed Workflow: Learning Journey Access Details\n\n- CLI: hermes journey.\n- TUI: /journey.\n- Desktop: /journey.\n\n## Detailed Workflow: Learning Journey Subcommands Details\n\n- list: Lists node IDs.\n- delete <node> [-y]: Deletes a node.\n- edit <node>: Opens node in $EDITOR.\n\n## Detailed Workflow: In-Chat Learning Journey Details\n\n- Same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: External Memory Provider Setup Details\n\n- Run hermes memory setup.\n- Eight built-in plugins.\n- Run alongside built-in memory.\n\n## Detailed Workflow: Background Review Details\n\n- Runs after each turn.\n- Saves memories or skills.\n- Configurable with notifications and model selection.\n\n## Detailed Workflow: Memory Snapshot Details\n\n- Frozen at session start.\n- Changes persist to disk immediately.\n- Appear in system prompt at next session start.\n- No read action.\n\n## Detailed Workflow: Session Search Details\n\n- Full-text search across all past sessions.\n- Uses FTS5 on SQLite.\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n\n## Detailed Workflow: Memory File Details\n\n- MEMORY.md: Agent notes.\n- USER.md: User profile.\n- Located in ~/.hermes/memories/.\n\n## Detailed Workflow: Prerequisites Details\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/.\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml.\n- External memory providers require setup via hermes memory setup.\n\n## Detailed Workflow: Usage Statistics Details\n\n- Memory usage: 67% of character limit.\n- Background review completion rate: 80%.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n\n## Detailed Workflow: Examples Details\n\n- Good entries: Compact, specific, actionable.\n- Bad entries: Vague, verbose.\n- Replace example: old_text='dark mode'.\n- Error response example: Includes success=false, usage, current_entries, and instruction.\n\n## Detailed Workflow: Failure Modes Details\n\n- Character limit exceeded: Error with current_entries and usage.\n- Replace overflow: Error with usage details.\n- Ambiguous substring: Error indicating ambiguous match.\n- Security block: Error with block reason.\n- Duplicate content: Success with "no duplicate added".\n\n## Detailed Workflow: Memory Tool Actions Details\n\n- add: Adds new content.\n- replace: Replaces existing entry.\n- remove: Removes existing entry.\n\n## Detailed Workflow: Security Scanner Patterns Details\n\n- Prompt injection.\n- Credential exfiltration.\n- SSH backdoor configurations.\n- Invisible Unicode characters.\n\n## Detailed Workflow: Background Review Compact Digest Details\n\n- Recent turns verbatim.\n- Older turns summarized.\n- Minimizes cache writes.\n\n## Detailed Workflow: Write Approval Gate Details\n\n- Foreground writes: Inline approval.\n- Background writes: Staged for review.\n- Commands: /memory pending, /memory approve, /memory reject, /memory approval on|off.\n- Same for skills.\n\n## Detailed Workflow: Learning Journey Node Deletion Details\n\n- Skills are archived.\n- Memory entries are removed.\n- -y flag skips confirmation.\n\n## Detailed Workflow: Learning Journey Node Editing Details\n\n- Opens in $EDITOR.\n- Changes applied immediately.\n\n## Detailed Workflow: Background Review Model Selection Details\n\n- auto uses main chat model.\n- Different model uses compact digest.\n- Provider and model set in config.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache Details\n\n- Frozen at session start.\n- Preserves LLM prefix cache.\n- Changes appear at next session start.\n\n## Detailed Workflow: Session Search Performance Details\n\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n- FTS5 on SQLite.\n\n## Detailed Workflow: External Memory Provider Limitations Details\n\n- Run alongside built-in memory.\n- Never replace it.\n- Setup via hermes memory setup.\n\n## Detailed Workflow: Background Review Notifications Details\n\n- Controlled by display.memory_notifications.\n- Only affects chat notification verbosity.\n- Review and writes unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling Details\n\n- /memory approval on|off.\n- /skills approval on|off.\n- Does not change config file.\n\n## Detailed Workflow: Foreground vs Background Writes Details\n\n- Foreground: During chat turn.\n- Background: During background review.\n- Both subject to write approval gates.\n\n## Detailed Workflow: Memory File Creation Details\n\n- Created automatically on first use.\n- No manual setup required.\n\n## Detailed Workflow: Configuration File Location Details\n\n- ~/.hermes/config.yaml.\n- All memory settings set here.\n\n## Detailed Workflow: Session Search Database Location Details\n\n- ~/.hermes/state.db.\n- Uses FTS5.\n\n## Detailed Workflow: Memory File Location Details\n\n- ~/.hermes/memories/.\n- MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: 1300 tokens.\n- MEMORY.md: 800 tokens.\n- USER.md: 500 tokens.\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15.\n- USER.md: 5-10.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- 67% usage.\n- 1474 characters threshold.\n- 2100 characters warning.\n- 2200 characters limit.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- 80% completion rate.\n- Automatic retry on failure.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes scanned.\n- Error on block.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate: "no duplicate added".\n- Not an error.\n- Silently accepted.\n\n## Detailed Workflow: Substring Matching Details\n\n- Must uniquely identify one entry.\n- Error on multiple matches.\n- Use specific substrings.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace bound by limits.\n- Error on exceed.\n\n## Detailed Workflow: Memory Tool Parameters Details\n\n- action: add, replace, remove.\n- target: memory, user.\n- old_text: required for replace/remove.\n- content: required for add/replace.\n\n## Detailed Workflow: Configuration Parameters Details\n\n- All optional.\n- Defaults apply if not set.\n\n## Detailed Workflow: Memory System Toggle Details\n\n- memory.memory_enabled: default true.\n- memory.user_profile_enabled: default true.\n\n## Detailed Workflow: Write Approval Gate Configuration Details\n\n- memory.write_approval: default false.\n- skills.write_approval: default false.\n\n## Detailed Workflow: Display Settings Details\n\n- display.memory_notifications: off, on, verbose. Default on.\n\n## Detailed Workflow: Background Review Configuration Details\n\n- auxiliary.background_review.provider: default auto.\n- auxiliary.background_review.model: default auto.\n\n## Detailed Workflow: Learning Journey Access Details\n\n- CLI: hermes journey.\n- TUI: /journey.\n- Desktop: /journey.\n\n## Detailed Workflow: Learning Journey Subcommands Details\n\n- list: Lists node IDs.\n- delete <node> [-y]: Deletes a node.\n- edit <node>: Opens node in $EDITOR.\n\n## Detailed Workflow: In-Chat Learning Journey Details\n\n- Same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: External Memory Provider Setup Details\n\n- Run hermes memory setup.\n- Eight built-in plugins.\n- Run alongside built-in memory.\n\n## Detailed Workflow: Background Review Details\n\n- Runs after each turn.\n- Saves memories or skills.\n- Configurable with notifications and model selection.\n\n## Detailed Workflow: Memory Snapshot Details\n\n- Frozen at session start.\n- Changes persist to disk immediately.\n- Appear in system prompt at next session start.\n- No read action.\n\n## Detailed Workflow: Session Search Details\n\n- Full-text search across all past sessions.\n- Uses FTS5 on SQLite.\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n\n## Detailed Workflow: Memory File Details\n\n- MEMORY.md: Agent notes.\n- USER.md: User profile.\n- Located in ~/.hermes/memories/.\n\n## Detailed Workflow: Prerequisites Details\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/.\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml.\n- External memory providers require setup via hermes memory setup.\n\n## Detailed Workflow: Usage Statistics Details\n\n- Memory usage: 67% of character limit.\n- Background review completion rate: 80%.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n\n## Detailed Workflow: Examples Details\n\n- Good entries: Compact, specific, actionable.\n- Bad entries: Vague, verbose.\n- Replace example: old_text='dark mode'.\n- Error response example: Includes success=false, usage, current_entries, and instruction.\n\n## Detailed Workflow: Failure Modes Details\n\n- Character limit exceeded: Error with current_entries and usage.\n- Replace overflow: Error with usage details.\n- Ambiguous substring: Error indicating ambiguous match.\n- Security block: Error with block reason.\n- Duplicate content: Success with "no duplicate added".\n\n## Detailed Workflow: Memory Tool Actions Details\n\n- add: Adds new content.\n- replace: Replaces existing entry.\n- remove: Removes existing entry.\n\n## Detailed Workflow: Security Scanner Patterns Details\n\n- Prompt injection.\n- Credential exfiltration.\n- SSH backdoor configurations.\n- Invisible Unicode characters.\n\n## Detailed Workflow: Background Review Compact Digest Details\n\n- Recent turns verbatim.\n- Older turns summarized.\n- Minimizes cache writes.\n\n## Detailed Workflow: Write Approval Gate Details\n\n- Foreground writes: Inline approval.\n- Background writes: Staged for review.\n- Commands: /memory pending, /memory approve, /memory reject, /memory approval on|off.\n- Same for skills.\n\n## Detailed Workflow: Learning Journey Node Deletion Details\n\n- Skills are archived.\n- Memory entries are removed.\n- -y flag skips confirmation.\n\n## Detailed Workflow: Learning Journey Node Editing Details\n\n- Opens in $EDITOR.\n- Changes applied immediately.\n\n## Detailed Workflow: Background Review Model Selection Details\n\n- auto uses main chat model.\n- Different model uses compact digest.\n- Provider and model set in config.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache Details\n\n- Frozen at session start.\n- Preserves LLM prefix cache.\n- Changes appear at next session start.\n\n## Detailed Workflow: Session Search Performance Details\n\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n- FTS5 on SQLite.\n\n## Detailed Workflow: External Memory Provider Limitations Details\n\n- Run alongside built-in memory.\n- Never replace it.\n- Setup via hermes memory setup.\n\n## Detailed Workflow: Background Review Notifications Details\n\n- Controlled by display.memory_notifications.\n- Only affects chat notification verbosity.\n- Review and writes unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling Details\n\n- /memory approval on|off.\n- /skills approval on|off.\n- Does not change config file.\n\n## Detailed Workflow: Foreground vs Background Writes Details\n\n- Foreground: During chat turn.\n- Background: During background review.\n- Both subject to write approval gates.\n\n## Detailed Workflow: Memory File Creation Details\n\n- Created automatically on first use.\n- No manual setup required.\n\n## Detailed Workflow: Configuration File Location Details\n\n- ~/.hermes/config.yaml.\n- All memory settings set here.\n\n## Detailed Workflow: Session Search Database Location Details\n\n- ~/.hermes/state.db.\n- Uses FTS5.\n\n## Detailed Workflow: Memory File Location Details\n\n- ~/.hermes/memories/.\n- MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: 1300 tokens.\n- MEMORY.md: 800 tokens.\n- USER.md: 500 tokens.\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15.\n- USER.md: 5-10.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- 67% usage.\n- 1474 characters threshold.\n- 2100 characters warning.\n- 2200 characters limit.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- 80% completion rate.\n- Automatic retry on failure.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes scanned.\n- Error on block.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate: "no duplicate added".\n- Not an error.\n- Silently accepted.\n\n## Detailed Workflow: Substring Matching Details\n\n- Must uniquely identify one entry.\n- Error on multiple matches.\n- Use specific substrings.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace bound by limits.\n- Error on exceed.\n\n## Detailed Workflow: Memory Tool Parameters Details\n\n- action: add, replace, remove.\n- target: memory, user.\n- old_text: required for replace/remove.\n- content: required for add/replace.\n\n## Detailed Workflow: Configuration Parameters Details\n\n- All optional.\n- Defaults apply if not set.\n\n## Detailed Workflow: Memory System Toggle Details\n\n- memory.memory_enabled: default true.\n- memory.user_profile_enabled: default true.\n\n## Detailed Workflow: Write Approval Gate Configuration Details\n\n- memory.write_approval: default false.\n- skills.write_approval: default false.\n\n## Detailed Workflow: Display Settings Details\n\n- display.memory_notifications: off, on, verbose. Default on.\n\n## Detailed Workflow: Background Review Configuration Details\n\n- auxiliary.background_review.provider: default auto.\n- auxiliary.background_review.model: default auto.\n\n## Detailed Workflow: Learning Journey Access Details\n\n- CLI: hermes journey.\n- TUI: /journey.\n- Desktop: /journey.\n\n## Detailed Workflow: Learning Journey Subcommands Details\n\n- list: Lists node IDs.\n- delete <node> [-y]: Deletes a node.\n- edit <node>: Opens node in $EDITOR.\n\n## Detailed Workflow: In-Chat Learning Journey Details\n\n- Same subcommands work from in-chat via /journey on CLI.\n\n## Detailed Workflow: External Memory Provider Setup Details\n\n- Run hermes memory setup.\n- Eight built-in plugins.\n- Run alongside built-in memory.\n\n## Detailed Workflow: Background Review Details\n\n- Runs after each turn.\n- Saves memories or skills.\n- Configurable with notifications and model selection.\n\n## Detailed Workflow: Memory Snapshot Details\n\n- Frozen at session start.\n- Changes persist to disk immediately.\n- Appear in system prompt at next session start.\n- No read action.\n\n## Detailed Workflow: Session Search Details\n\n- Full-text search across all past sessions.\n- Uses FTS5 on SQLite.\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n\n## Detailed Workflow: Memory File Details\n\n- MEMORY.md: Agent notes.\n- USER.md: User profile.\n- Located in ~/.hermes/memories/.\n\n## Detailed Workflow: Prerequisites Details\n\n- Hermes Agent installed and configured.\n- Memory files stored in ~/.hermes/memories/.\n- Session search uses SQLite database at ~/.hermes/state.db with FTS5.\n- Configuration file at ~/.hermes/config.yaml.\n- External memory providers require setup via hermes memory setup.\n\n## Detailed Workflow: Usage Statistics Details\n\n- Memory usage: 67% of character limit.\n- Background review completion rate: 80%.\n- Common threshold: 1474 characters.\n- Warning level: 2100 characters.\n\n## Detailed Workflow: Examples Details\n\n- Good entries: Compact, specific, actionable.\n- Bad entries: Vague, verbose.\n- Replace example: old_text='dark mode'.\n- Error response example: Includes success=false, usage, current_entries, and instruction.\n\n## Detailed Workflow: Failure Modes Details\n\n- Character limit exceeded: Error with current_entries and usage.\n- Replace overflow: Error with usage details.\n- Ambiguous substring: Error indicating ambiguous match.\n- Security block: Error with block reason.\n- Duplicate content: Success with "no duplicate added".\n\n## Detailed Workflow: Memory Tool Actions Details\n\n- add: Adds new content.\n- replace: Replaces existing entry.\n- remove: Removes existing entry.\n\n## Detailed Workflow: Security Scanner Patterns Details\n\n- Prompt injection.\n- Credential exfiltration.\n- SSH backdoor configurations.\n- Invisible Unicode characters.\n\n## Detailed Workflow: Background Review Compact Digest Details\n\n- Recent turns verbatim.\n- Older turns summarized.\n- Minimizes cache writes.\n\n## Detailed Workflow: Write Approval Gate Details\n\n- Foreground writes: Inline approval.\n- Background writes: Staged for review.\n- Commands: /memory pending, /memory approve, /memory reject, /memory approval on|off.\n- Same for skills.\n\n## Detailed Workflow: Learning Journey Node Deletion Details\n\n- Skills are archived.\n- Memory entries are removed.\n- -y flag skips confirmation.\n\n## Detailed Workflow: Learning Journey Node Editing Details\n\n- Opens in $EDITOR.\n- Changes applied immediately.\n\n## Detailed Workflow: Background Review Model Selection Details\n\n- auto uses main chat model.\n- Different model uses compact digest.\n- Provider and model set in config.\n\n## Detailed Workflow: Memory Snapshot and Prefix Cache Details\n\n- Frozen at session start.\n- Preserves LLM prefix cache.\n- Changes appear at next session start.\n\n## Detailed Workflow: Session Search Performance Details\n\n- Unlimited searches.\n- Approximately 20ms.\n- Free.\n- FTS5 on SQLite.\n\n## Detailed Workflow: External Memory Provider Limitations Details\n\n- Run alongside built-in memory.\n- Never replace it.\n- Setup via hermes memory setup.\n\n## Detailed Workflow: Background Review Notifications Details\n\n- Controlled by display.memory_notifications.\n- Only affects chat notification verbosity.\n- Review and writes unaffected.\n\n## Detailed Workflow: Write Approval Gate Toggling Details\n\n- /memory approval on|off.\n- /skills approval on|off.\n- Does not change config file.\n\n## Detailed Workflow: Foreground vs Background Writes Details\n\n- Foreground: During chat turn.\n- Background: During background review.\n- Both subject to write approval gates.\n\n## Detailed Workflow: Memory File Creation Details\n\n- Created automatically on first use.\n- No manual setup required.\n\n## Detailed Workflow: Configuration File Location Details\n\n- ~/.hermes/config.yaml.\n- All memory settings set here.\n\n## Detailed Workflow: Session Search Database Location Details\n\n- ~/.hermes/state.db.\n- Uses FTS5.\n\n## Detailed Workflow: Memory File Location Details\n\n- ~/.hermes/memories/.\n- MEMORY.md and USER.md.\n\n## Detailed Workflow: Memory Footprint Details\n\n- Total: 1300 tokens.\n- MEMORY.md: 800 tokens.\n- USER.md: 500 tokens.\n\n## Detailed Workflow: Typical Entry Counts Details\n\n- MEMORY.md: 8-15.\n- USER.md: 5-10.\n\n## Detailed Workflow: Memory Usage Statistics Details\n\n- 67% usage.\n- 1474 characters threshold.\n- 2100 characters warning.\n- 2200 characters limit.\n\n## Detailed Workflow: Background Review Completion Rate Details\n\n- 80% completion rate.\n- Automatic retry on failure.\n\n## Detailed Workflow: Security Scanner Details\n\n- Blocks prompt injection, credential exfiltration, SSH backdoors, invisible Unicode.\n- All writes scanned.\n- Error on block.\n\n## Detailed Workflow: Duplicate Prevention Details\n\n- Exact duplicate: "no duplicate added".\n- Not an error.\n- Silently accepted.\n\n## Detailed Workflow: Substring Matching Details\n\n- Must uniquely identify one entry.\n- Error on multiple matches.\n- Use specific substrings.\n\n## Detailed Workflow: Character Limit Details\n\n- MEMORY.md: 2200 characters.\n- USER.md: 1375 characters.\n- Add and replace bound by limits.\n- Error on exceed.\n\n
Sources & References
This page was researched from 1 independent source, combined and verified for completeness.
- 1.Persistent MemoryOfficial documentation · primary source
The #1 AI Newsletter
The most important ai updates, guides, and fixes — one weekly email.
No spam, unsubscribe anytime. Privacy policy