Skip to content

fix(memory): support Mem0 OSS mode in doctor + setup wizard - #57932

Closed
lunalunaa wants to merge 2 commits into
NousResearch:mainfrom
lunalunaa:fix/mem0-doctor-oss-mode
Closed

fix(memory): support Mem0 OSS mode in doctor + setup wizard#57932
lunalunaa wants to merge 2 commits into
NousResearch:mainfrom
lunalunaa:fix/mem0-doctor-oss-mode

Conversation

@lunalunaa

Copy link
Copy Markdown

Summary

Fixes #57931

Two bugs in the Mem0 memory provider integration:

1. hermes doctor — Mem0 OSS mode falsely reports "API key not set"

doctor.py:2308 only looked for a top-level api_key from _load_config(). In OSS mode there is no top-level api_key — credentials are nested in oss.llm.config.api_key and oss.embedder.config.api_key in mem0.json. The check now branches on mode:

  • OSS mode: validates oss.llm.config.api_key, oss.embedder.config.api_key, and oss.vector_store.provider are present. Reports mode, user_id, agent_id, llm model, embedder model, and vector store.
  • Platform mode: unchanged — checks top-level api_key.

2. hermes memory setup — picker defaults to "Built-in only" even when a provider is active

memory_setup.py:271 hardcoded the picker default to builtin_idx (the last item, "Built-in only"). If the user pressed Enter without moving the cursor, it silently overwrote memory.provider: mem0"". The fix reads the current config and defaults the cursor to the active provider.

Changes

File Change
hermes_cli/doctor.py Branch Mem0 check on mode — OSS path validates nested config fields
hermes_cli/memory_setup.py Default picker cursor to currently active provider

Testing

$ hermes doctor
◆ Memory Provider
  ✓ Mem0 OSS configured
    → mode=oss  user_id=luna  agent_id=hermes  llm=z-ai/glm-5.2  embedder=openai/text-embedding-3-small  vector_store=qdrant

All checks passed! 🎉

Platform mode behavior is unchanged (same code path, just wrapped in else).

doctor.py: The Mem0 health check only looked for a top-level api_key,
which doesn't exist in OSS mode — credentials are nested in
oss.llm.config.api_key and oss.embedder.config.api_key. Branch on mode
to validate the correct fields per mode.

memory_setup.py: The provider picker hardcoded its default cursor to
'Built-in only' even when a provider was already active. Read the
current config and default to the active provider instead.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard tool/memory Memory tool and memory providers P3 Low — cosmetic, nice to have labels Jul 3, 2026
@lunalunaa

Copy link
Copy Markdown
Author

Closing because an accidental merge. See the new PR #59865.

lunalunaa added a commit to lunalunaa/hermes-agent that referenced this pull request Jul 8, 2026
- doctor.py: branch Mem0 health check on mode — OSS validates
  oss.llm.config.api_key, oss.embedder.config.api_key, and
  oss.vector_store.provider; Platform mode unchanged (checks
  top-level api_key). Reports full config for both modes.
- memory_setup.py: pass provider instance to status display so
  is_available() reflects OSS mode correctly.
- _setup.py: default mode picker cursor to the currently
  configured mode (from mem0.json) instead of always defaulting
  to Platform. Adds '← current' label to the active mode option
  so users can see their existing setup at a glance.

Closes NousResearch#57931
Supersedes NousResearch#57932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes doctor: Mem0 OSS mode falsely reports "API key not set" + setup wizard defaults to built-in

2 participants