hermes - ✅(Solved) Fix [Feature]: feat(mem0) add OSS mode, v3 API migration, update/delete tools [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16401Fetched 2026-04-28 06:53:37
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1unsubscribed ×1

Fix Action

Fixed

PR fix notes

PR #15624: feat: update to version 3 endpoints and adding update and delete tool and adding oss support to mem0 plugin in hermes agent.

Description (problem / solution / changelog)

resolves #16401

What does this PR do?

Adds OSS (self-hosted) mode to the Mem0 memory provider, allowing users to run Mem0 locally with their own LLM, embedder, and vector store instead of requiring the Mem0 Platform API. Also upgrades the plugin from v2 to v3 API endpoints, adds mem0_update and mem0_delete tools and renames for better dx for existing cli users in mem0, and fixes circuit breaker false positives on client errors (404, 422).

Type of Change

  • ✨ New feature (non-breaking change that adds functionality)
  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • Backend abstraction (plugins/memory/mem0/_backend.py): Mem0Backend ABC with PlatformBackend (cloud API) and OSSBackend (local mem0ai SDK). OSS backend handles PostHog telemetry shutdown to
    prevent Ctrl+C hangs.
  • OSS provider definitions (plugins/memory/mem0/_oss_providers.py): LLM (openai, ollama), embedder (openai, ollama), vector store (qdrant, pgvector) with validation.
  • Setup wizard (plugins/memory/mem0/_setup.py): Interactive (curses pickers) and flag-based (--mode oss --oss-llm openai) setup. Auto-installs optional deps (ollama, psycopg2-binary,
    qdrant-client). Auto-starts pgvector via Docker and Ollama if needed. API key masking for existing keys. Connectivity checks on save.
  • V3 API migration (plugins/memory/mem0/init.py): Updated all tool endpoints from v2 to v3. Added mem0_update and mem0_delete tools. Added None-backend guard with mode-aware error messages.
    Circuit breaker now skips client errors (404, 422).
  • Telemetry (plugins/memory/mem0/telemetry.py): Platform version tracking.
  • Docs: Updated README.md with OSS setup instructions, flags reference, troubleshooting. Updated memory-providers.md with OSS provider tables.
  • Tests: 77 tests across test_mem0_v3.py, test_mem0_setup.py, test_mem0_backend.py, test_mem0_providers.py. Removed obsolete test_mem0_v2.py.

How to Test

  1. hermes memory setup → select "Open Source" → pick providers → verify config saved to ~/.hermes/mem0.json
  2. hermes → ask agent to use mem0_add, mem0_list, mem0_search, mem0_update, mem0_delete
  3. hermes memory setup → select "Platform" → verify cloud mode still works
  4. pytest tests/plugins/memory/ -v → 77 tests pass

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this feature
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes
  • I've tested on my platform: macOS 15 (Apple Silicon M5)

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings)
  • I've considered cross-platform impact
  • I've updated tool descriptions/schemas for new tools

Changed files

  • hermes_cli/memory_setup.py (modified, +11/-2)
  • plugins/memory/mem0/README.md (modified, +118/-5)
  • plugins/memory/mem0/__init__.py (modified, +251/-100)
  • plugins/memory/mem0/_backend.py (added, +193/-0)
  • plugins/memory/mem0/_oss_providers.py (added, +84/-0)
  • plugins/memory/mem0/_setup.py (added, +812/-0)
  • plugins/memory/mem0/plugin.yaml (modified, +1/-1)
  • plugins/memory/mem0/telemetry.py (added, +186/-0)
  • tests/plugins/memory/test_mem0_backend.py (added, +188/-0)
  • tests/plugins/memory/test_mem0_providers.py (added, +107/-0)
  • tests/plugins/memory/test_mem0_setup.py (added, +244/-0)
  • tests/plugins/memory/test_mem0_v2.py (removed, +0/-227)
  • tests/plugins/memory/test_mem0_v3.py (added, +377/-0)
  • website/docs/user-guide/features/memory-providers.md (modified, +32/-8)

Code Example

hermes memory setup mem0 --mode oss \                                                                                                                                                                                                                                                                                                                    
    --oss-llm ollama \                 
    --oss-embedder ollama \                                                                                                                                                                                                                                                                                                                                
    --oss-vector qdrant    
                                                                                                                                                                                                                                                                                                                                                           
  Config stored in $HERMES_HOME/mem0.json with a "mode": "oss" key. Switching between platform and OSS is seamless.
RAW_BUFFERClick to expand / collapse

Problem or Use Case

Currently the Mem0 memory provider plugin only supports the Mem0 Platform (cloud API), requiring an API key and internet connection. Users who want to:

  1. Run locally for privacy — can't use Mem0 without sending data to the cloud
  2. Work offline — no way to use memory features without internet
  3. Avoid API costs — forced to use paid platform even for experimentation
  4. Use their own models — locked to Mem0's hosted LLM/embedder, can't use local Ollama models

Additionally, the plugin is still on v2 API endpoints which are being deprecated by Mem0. There's also no way to update or delete individual memories by ID — users can only add, search, and list. Finally, client errors like 404/422 incorrectly trip the circuit breaker, disabling the entire plugin during normal usage.

Proposed Solution

1. OSS (self-hosted) mode

Add a --mode oss option to hermes memory setup mem0 that configures Mem0 to run entirely locally:

  • LLM providers: openai, ollama
  • Embedder providers: openai, ollama
  • Vector stores: qdrant (local file or server), pgvector (Docker auto-start)

Interactive setup via curses pickers, or flag-based:

hermes memory setup mem0 --mode oss \                                                                                                                                                                                                                                                                                                                    
  --oss-llm ollama \                 
  --oss-embedder ollama \                                                                                                                                                                                                                                                                                                                                
  --oss-vector qdrant    
                                                                                                                                                                                                                                                                                                                                                         
Config stored in $HERMES_HOME/mem0.json with a "mode": "oss" key. Switching between platform and OSS is seamless.
  1. V3 API migration

Update all tool endpoints from v2 to v3 via mem0ai>=2.0.1 SDK. Remove v2-specific response unwrapping.

  1. New tools
  • mem0_update — update a memory's text by ID
  • mem0_delete — delete a memory by ID
  • Rename existing tools for consistency: mem0_list, mem0_add, mem0_search
  1. Circuit breaker fix

Skip client errors (404, 422) in the circuit breaker — only server errors (5xx) should trip it.

Architecture

  • _backend.py — Mem0Backend ABC with PlatformBackend and OSSBackend implementations
  • _oss_providers.py — provider definitions with validation
  • _setup.py — interactive + flag-based setup wizard with auto-install of optional deps
  • telemetry.py — platform version tracking

extent analysis

TL;DR

To address the limitations of the Mem0 memory provider plugin, implement an OSS mode for local usage, migrate to the V3 API, add new tools for memory management, and fix the circuit breaker to ignore client errors.

Guidance

  • Implement the --mode oss option in hermes memory setup mem0 to enable local OSS mode with support for openai, ollama, qdrant, and pgvector.
  • Update the API endpoints to V3 using the mem0ai>=2.0.1 SDK and remove V2-specific response unwrapping.
  • Develop new tools (mem0_update, mem0_delete) for updating and deleting memories by ID, and rename existing tools for consistency.
  • Modify the circuit breaker to only trip on server errors (5xx) and ignore client errors (404, 422).

Example

hermes memory setup mem0 --mode oss \
  --oss-llm ollama \
  --oss-embedder ollama \
  --oss-vector qdrant

Notes

The proposed solution requires significant changes to the existing implementation, including the addition of new tools and the migration to the V3 API. The circuit breaker fix is crucial to prevent unnecessary downtime.

Recommendation

Apply the workaround by implementing the OSS mode and migrating to the V3 API, as this will address the current limitations and provide a more robust solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Feature]: feat(mem0) add OSS mode, v3 API migration, update/delete tools [1 pull requests, 1 comments, 2 participants]