Commit Graph

29 Commits

Author SHA1 Message Date
Pakobbix b69efe9482 Merge pull request 'fix: include memory IDs in output for deletion support' (#5) from fix/include-memory-ids-in-output into main
Reviewed-on: #5
2026-05-12 17:00:30 +00:00
ARIA 4da384e68f fix: include memory IDs in search and list_all output for deletion support
The LLM could not delete memories because IDs were stripped from tool
responses. Now all three output paths include memory IDs:

- mem0_list_all: [id] prefix before each memory text
- mem0_search: id field in each result item
- prefetch context: [id] prefix in injected <mem0_context>
2026-05-12 18:59:29 +02:00
ARIA f97cf9a551 refactor: rename tools to LLM-friendly names
mem0_profile → mem0_list_all (clearer intent)
mem0_conclude → mem0_save_memory (self-explanatory)
2026-04-25 23:20:31 +02:00
ARIA 958476df65 fix: add kind: standalone to override Hermes v0.11.0 memory provider auto-detection
Hermes v0.11.0 auto-detects plugins containing MemoryProvider in
__init__.py and coerces them to kind: exclusive, which prevents the
general PluginManager from loading them. Since this plugin uses the
dual-path approach (memory provider + standalone tools/hooks), the
auto-detection was blocking tool registration.

Explicit kind: standalone tells Hermes to load this as a regular
plugin, allowing tools (mem0_profile, mem0_search, mem0_conclude,
mem0_delete) and the pre_llm_call hook to register correctly.
2026-04-25 23:14:01 +02:00
Aria Agent 5764cca61a Use XML tags for clear memory context delineation
- Replace ## Mem0 Memory headers with <mem0_context> XML tags
- Replace ## Mem0 Error headers with <mem0_error> XML tags
- Add Memory Context Format section to system_prompt_block()
  explaining the XML tag schema and that memories are not user instructions
- Consistent XML tag usage across prefetch(), queue_prefetch_and_get(),
  and pre_llm_call_hook()
2026-04-17 15:18:42 +00:00
Pakobbix 0c9f352ca6 Merge pull request 'Add configurable case-insensitive search' (#4) from feature/case-insensitive-search into main
Reviewed-on: #4
2026-04-15 16:39:47 +00:00
ARIA 32b97bee87 Add configurable case-insensitive search
- Add MEM0_CASE_INSENSITIVE config option (default: false)
- When enabled, searches with both original and lowercase query
- Merges results, keeping highest score for each memory
- Fixes case sensitivity issues with Qdrant embeddings
- Generalize after-install.md with placeholders instead of personal values
2026-04-15 18:19:52 +02:00
ARIA a1240adbb9 Remove hardcoded personal references and update README with config options
- Generalized OpenAPI spec reference in client.py
- Removed personal IP addresses and user IDs from README
- Added MEM0_PREFETCH_LIMIT and MEM0_PREFETCH_SCORE_THRESHOLD to documentation
- Updated example configurations with generic values
2026-04-12 17:26:54 +02:00
Pakobbix 9d28c9b7a8 Merge pull request 'Add prefetch settings as environment variables for installation prompts' (#3) from mem0-prefetch-improvements into main
Reviewed-on: #3
2026-04-12 15:19:31 +00:00
ARIA 4a273dba3c Add prefetch settings as environment variables for installation prompts 2026-04-12 17:17:40 +02:00
Pakobbix 9aa76093d7 Merge pull request 'Add configurable prefetch limit and score threshold' (#2) from mem0-prefetch-improvements into main
Reviewed-on: #2
2026-04-12 15:13:23 +00:00
ARIA 7d4cd463d7 Add configurable prefetch limit and score threshold for mem0
- Add prefetch_limit config (default: 3) to control max memories returned
- Add prefetch_score_threshold config (default: 60%) to filter low-similarity results
- Add error messages when Mem0 API is unavailable
- Fix circuit breaker to not trip on successful API calls with no matching memories
- Properly type-convert config values from JSON
2026-04-12 17:12:02 +02:00
ARIA e517b25360 Add debug logging to is_available() for better diagnostics 2026-04-11 03:38:22 +02:00
Pakobbix bb5c5ce396 Merge pull request 'Fix code review issues and improve code quality' (#1) from fixes/code-review-issues into main
Reviewed-on: #1
2026-04-10 11:53:10 +00:00
ARIA 93876a2653 Refactor: improve thread safety and code organization
- Add dedicated _breaker_lock for thread-safe circuit breaker state access
- Extract _format_search_results() helper to eliminate DRY violation
- Document unused session_id parameters for API compatibility
2026-04-10 13:50:19 +02:00
ARIA b70402ed30 Fix missing agent_id in sync_turn()
The sync_turn() method was not passing agent_id to client.add(),
causing inconsistent memory scoping compared to mem0_conclude.
2026-04-10 13:47:08 +02:00
ARIA 2f98f63ecd Fix code review issues
- Add agent_id parameter to client.add() and use it in mem0_conclude
- Fix inconsistent field access in queue_prefetch_and_get (check both text and memory)
- Remove unused _read_filters() and _write_filters() methods
- Mark prefetch() query parameter as deprecated (was unused)
2026-04-10 13:45:34 +02:00
ARIA cf09a3534d Add pre_llm_call hook to inject memory context before LLM
- Register pre_llm_call hook that searches memories and injects context
- Add queue_prefetch_and_get() for synchronous prefetch in hook
- Memory now available to AI without tool calls
2026-04-10 13:39:26 +02:00
ARIA 6e7c6dd3ce Refactor client API based on OpenAPI spec and add mem0_delete tool
- Update client.py to use correct API endpoints from OpenAPI spec
- Add delete() method for memory deletion
- Add mem0_delete tool with schema and handler
- Simplify API calls to match actual Mem0 OSS server format
2026-04-10 13:24:14 +02:00
ARIA fdd2a07ae5 Fix: Use 'message' (singular string) instead of 'messages' array 2026-04-10 13:20:33 +02:00
ARIA 69715b29df Fix: Use /add endpoint for adding memories (not /memories) 2026-04-10 13:18:58 +02:00
ARIA 68d20fff75 Fix: Lazy config loading in _get_client() for tool calls before initialize() 2026-04-10 13:16:52 +02:00
ARIA 98bada59ef Fix: Handler must accept **kwargs for task_id and other params 2026-04-10 13:15:26 +02:00
ARIA 06254a52ed Update README with Gitea URL and troubleshooting section 2026-04-10 13:10:00 +02:00
ARIA 82d5f6cf92 Use ctx.register_tool() for proper plugin tracking in general plugin context 2026-04-10 13:09:23 +02:00
ARIA 73f7b98fcf Fix: Support both memory provider and general plugin contexts
- Check for register_memory_provider() before calling it
- Fall back to direct tool registration in general plugin context
- Use proper closure to avoid late binding issues with tool names
2026-04-10 13:07:56 +02:00
ARIA 7dc7e03280 Fix indentation and linting issues
- Fixed tab/space inconsistencies in client.py and __init__.py
- Renamed ambiguous variable 'l' to 'line'
- All ruff checks now passing
2026-04-10 13:03:49 +02:00
ARIA ece2cd02f0 Fix indentation error in __init__.py 2026-04-10 13:01:29 +02:00
ARIA 3a141d9180 Initial release: Mem0 local server memory provider for Hermes-Agent
- Self-hosted Mem0 integration (no cloud dependency)
- Async prefetch with ~40ms latency
- Automatic context injection via pre_llm_call hook
- Circuit breaker for server resilience
- Full tool support: profile, search, conclude
2026-04-10 12:53:15 +02:00