> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/build/cross-conversation-search.md).

# Cross-Conversation Search

Let AI assistants search for relevant content in recent conversations with the same contact

Cross-conversation search lets an AI assistant search recent conversations with the same contact in the same inbox when responding. It is useful when service history needs to carry over, but users frequently start new conversations.

{% hint style="info" %}
This feature is disabled by default. Enabling it only expands the AI assistant's search scope. It does not mix content from different contacts or inboxes.
{% endhint %}

## Enable Cross-Conversation Search <a href="#enable-cross-conversation-search" id="enable-cross-conversation-search"></a>

{% stepper %}
{% step %}
In the left menu, click “<mark style="color:blue;">AI Assistant</mark>.”
{% endstep %}

{% step %}
Select the AI assistant you want to configure and open “<mark style="color:blue;">Settings</mark>.”
{% endstep %}

{% step %}
Open “<mark style="color:blue;">Advanced Settings</mark>.”
{% endstep %}

{% step %}
Under the conversation memory settings, enable “<mark style="color:blue;">Cross-Conversation Search</mark>.”
{% endstep %}

{% step %}
Under “<mark style="color:blue;">Lookback Period (Days)</mark>,” enter a value from 1 to 365 days. The default is 90 days.

<figure><img src="https://1360999650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6v6TNkkOQVfRYfcNirHL%2Fuploads%2Fgit-blob-f5bae1184df49572abe5408312af02eb1d596272%2Fcross-conversation-search-settings.png?alt=media" alt="Cross-conversation search toggle and conversation memory settings under Advanced Settings"><figcaption><p>Enable cross-conversation search under Advanced Settings and configure the search range for recent conversations</p></figcaption></figure>
{% endstep %}

{% step %}
Click “<mark style="color:blue;">Save</mark>.”
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
A longer lookback period expands the searchable history. Configure it according to your service requirements and comply with your organization's data use and privacy policies.
{% endhint %}

## Use Case <a href="#use-case" id="use-case"></a>

MaiAgent's customer service assistant tracks after-sales cases. A customer provided their order status in a conversation last week and starts a new conversation today to ask for an update. The administrator enables cross-conversation search for the customer service assistant and sets the lookback period to 30 days. After the settings are saved, the assistant can use the conversation history tool to find relevant content from the same customer's recent conversations and respond based on those records.

## Scope <a href="#scope" id="scope"></a>

Cross-conversation search includes:

* The same contact
* The same inbox
* Regular chat conversations that have not been deleted
* Conversations whose latest message falls within the configured lookback period

For conversations within the lookback period, the entire message history is included, not just messages sent during that period. The system selects up to 200 of the most recently active conversations. The current conversation is always included in the search scope, regardless of the configured lookback period.

When this feature is disabled, the assistant searches only the current conversation. Cross-conversation search and “Vector Memory” are independent settings and can be enabled or disabled separately.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/build/cross-conversation-search.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
