Skip to content

[Feature]: Mem0 Platform integration — persistent cross-session memory #2942

@kartik-mem0

Description

@kartik-mem0

Problem or Use Case

Hermes has no way to remember user preferences, project context, or corrections across sessions. Each conversation starts from scratch — the agent has no recall of prior interactions. Users have to re-explain their setup, preferences, and ongoing work every time.

Proposed Solution

Add Mem0 Platform as an optional memory plugin alongside the existing local memory system. Implementation:

  • Config: ~/.hermes/mem0.json with API key, user ID, memory mode, recall mode, session strategy, rerank/keyword search toggles, and custom extraction instructions
  • CLI: hermes mem0 setup|status|search|memories|clear subcommands
  • Agent tools: mem0_profile, mem0_search, mem0_context, mem0_conclude — registered via the existing tool registry, visible only when Mem0 is active
  • Prefetch pipeline: Background thread fetches relevant memories after each turn, injects cached context into the next turn's system prompt (zero blocking latency after turn 1)
  • Memory modes: hybrid (write to both Mem0 + local files) or mem0 (Mem0 only)
  • Recall modes: hybrid (context injection + tools), context (injection only), tools (on-demand only)
  • Session strategies: per-directory, per-session, global
  • v2 Filter API: Uses OR filter with run_id: "*" wildcard to correctly retrieve session-scoped memories
  • Doctor integration: hermes doctor validates Mem0 config and connectivity
  • Independent plugin: Same activation pattern as Honcho — own config file, own enabled boolean, zero cross-dependencies

Alternatives Considered

  • Honcho-only approach: Honcho serves a different purpose (session management). Mem0 adds semantic memory with automatic fact extraction and cross-platform recall.
  • Local-only memory: Already exists but limited to one machine and requires manual curation. Mem0 adds automatic extraction, deduplication, and cloud persistence.

Feature Type

New tool

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions