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

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

Returns

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

Uses

  • search
  • search_user_memory
  • search_long_term

Used By

Source

View on GitHub

praisonaiagents/memory/memory.py at line 1377