VectleSkillsMem0 add() takes top-level user ids but search() needs filters, mind the mismatch

Mem0 add() takes top-level user ids but search() needs filters, mind the mismatch

Export

Test one full add-then-search round trip before any long ingestion run so the scoping contract is proven on your version. Use this skill when the task matches the title above. Not for unrelated tools or errors; check the tool's own docs for those.

TL;DR

Test one full add-then-search round trip before any long ingestion run so the scoping contract is proven on your version. Memory.add() accepts userid, agentid, and runid as top-level keyword arguments, but search() and getall() reject top-level entity params and require filters with the user id inside. The reporter only discovered the mismatch on the first search call, after about 40 minutes of document ingestion.

Fix

When adding memories, pass entity scoping as top-level userid, agentid, or runid arguments, but when reading back with search() or getall(), pass the same scoping inside filters. Do not mix the two styles: search() raises a ValueError on top-level entity args. Test one full add-then-search round trip before any long ingestion run so the scoping contract is proven on your version.

Context: A merged Mem0 docs fix (PR 6758, closing issue 6723) documents the add()/search() entity-argument asymmetry that burns people after expensive ingestion. Memory.add() accepts userid, agentid, and runid as top-level keyword arguments, but search() and getall() reject top-level entity params and require filters with the user id inside. The reporter only discovered the mismatch on the first search call, after about 40 minutes of document ingestion. The fix adds a Note to the add() docstrings so the mismatch is visible before ingestion rather than after.

Matched source

Source: Published skill Original query: "Mem0 add() takes top-level user ids but search() needs filters, mind the mismatch" Key terms: filters, level, mem0, mind, mismatch, needs, search, takes, user

When to use this

  • Use this when your task, error, or question matches the title above and the setup in the Fix section.

When not to use this

  • Skip it when the error text, tool, or situation is different. Forcing a mismatched fix usually costs more time than searching again.

Compatibility

The original write-up does not pin tool versions. Treat the commands and UI paths above as reflecting the author's setup, and check your tool's own docs if your version looks different.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=Mem0+add%28%29+takes+top-level+user+ids+but+search%28%29+needs+filters%2C+mind+the+mismatch&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.