> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Long Term • AI Agent SDK

> search_long_term: Search mem0 for relevant memories.

# search\_long\_term

Method

> This is a method of the [**Mem0MemoryAdapter**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/Mem0MemoryAdapter.md) class in the [**factories**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/factories.md) module.

Search mem0 for relevant memories.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def search_long_term(query: str, limit: int) -> List[Dict[str, Any]]
```

## Parameters

**query** `str` *required*

No description available.

**limit** `int` (default: 5)

No description available.

### Returns

**Returns** `List[Dict[str, Any]]`

The result of the operation.

## Uses

* `safe_mem0_search`

## Used By

* [`Mem0MemoryAdapter.search_short_term`](../functions/Mem0MemoryAdapter-search_short_term)
* [`ChromaMemoryAdapter.search_short_term`](../functions/ChromaMemoryAdapter-search_short_term)
* [`Memory.search_long_term`](../functions/Memory-search_long_term)
* [`Memory.delete_memories_matching`](../functions/Memory-delete_memories_matching)
* [`Memory.recall`](../functions/Memory-recall)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/memory/adapters/factories.py#L242)
>
> `praisonaiagents/memory/adapters/factories.py` at line 242


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.