Skip to main content

search

Method
This is a method of the Memory class in the memory module.
Generic search method that delegates to appropriate specific search methods. Provides compatibility with mem0.Memory interface.

Signature

Parameters

str
required
The search query string
Optional[str]
Optional user ID for user-specific search
Optional[str]
Optional agent ID for agent-specific search
Optional[str]
Optional run ID for run-specific search
int
default:"5"
Maximum number of results to return
bool
default:"False"
Whether to use advanced reranking **kwargs: Additional search parameters

Returns

List[Dict[str, Any]]
List of search results

Uses

  • search_user_memory
  • search_long_term

Used By

Source

View on GitHub

praisonaiagents/memory/memory.py at line 1626