Skip to content

fix(docs): use filters param for search in LiveKit integration#4300

Open
kartik-mem0 wants to merge 1 commit intomainfrom
fix/docs-livekit-search-filters
Open

fix(docs): use filters param for search in LiveKit integration#4300
kartik-mem0 wants to merge 1 commit intomainfrom
fix/docs-livekit-search-filters

Conversation

@kartik-mem0
Copy link
Contributor

@kartik-mem0 kartik-mem0 commented Mar 11, 2026

Description

The LiveKit integration docs use user_id=RAG_USER_ID as a direct kwarg in the search() call. However, the v2 search API (/v2/memories/search/) requires user_id inside the filters object it's a required field per the MemorySearchInputV2 schema in openapi.json.

With the current code, user_id gets placed at the top level of the payload where the API ignores it, so search silently returns empty results. Users following this guide get a voice agent with no memory recall.

Changed to filters={"user_id": RAG_USER_ID} which matches the v2 API contract and the official code samples.

Fixes #3832

Type of change

  • Documentation update

How Has This Been Tested?

  • Verified the MemorySearchInputV2 schema in openapi.json requires filters as a top-level field with user_id nested inside
  • Traced the SDK code path in mem0/client/main.py:252-277 — confirmed user_id= kwarg lands at payload top level, not inside filters
  • Confirmed the add() call using user_id= directly is correct (v1 endpoint accepts it at top level)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue on docs

1 participant