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

# Each agent's memory is its own

> Understanding the core isolation rule in Priors

## Example use case

You are designing a product on Priors and need to decide how many agents to create and where memory boundaries sit. The three reference products each map to a distinct layout:

> [accordion] Sales agent (one agent per prospect)
>
> Remembers each prospect's budget, stack, and deal history across weeks of calls and emails. Each prospect gets a dedicated agent with learning enabled so prospect records never mix.

> [accordion] Inbound support line (one shared read-only agent)
>
> Answers external customers from one fixed library of product manuals and policies. Everyone queries one shared agent with conversation learning turned off.

> [accordion] Team assistant (one shared learning agent)
>
> Learns decisions, runbooks, and incident notes from an internal engineering team. Every teammate shares one agent inside a single trust boundary.

## Setup

Create one agent per trust boundary. Inside each agent, use threads to organize individual conversations, tickets, or sessions:

* **One agent per prospect** for the sales agent (learning on).
* **One shared agent** loaded with manuals for the inbound support line (learning off).
* **One shared agent** per internal team for the team assistant (learning on).

Store the mapping from your customer, team, or product record to each `agent_id` in your own database. Every API call targets one `agent_id` in the path.

## Benefit with Priors

* **Cross-thread continuity:** a fact learned in an email thread is immediately available in a later call thread on the same agent.
* **Ingest once, answer everywhere:** a manual uploaded once serves every support thread on that agent.
* **Strict tenant isolation:** two separate agents share no memories, files, or conversation history.

## What goes wrong

> [!WARNING]
>
> Putting two people who should not share facts onto the same agent leaks information between them. Threads and `X-SP-End-User` separate conversation lists, not memory: if Prospect A and Prospect B share one learning agent, Prospect B can receive answers drawn from Prospect A's facts.

## Recommendation

Decide the trust boundary first, then create one agent per boundary. Never rely on threads or headers to isolate private memories between separate customers.

## Calls used

* Guides: [Start here](https://www.sapientpriors.com/docs/introduction.md), [Agents](https://www.sapientpriors.com/docs/concepts/agents.md), [Threads](https://www.sapientpriors.com/docs/concepts/threads.md), [Your data](https://www.sapientpriors.com/docs/data.md)
* API reference: [Create agent](https://www.sapientpriors.com/docs/api-reference/v2/agents/create-agent.md), [Get agent](https://www.sapientpriors.com/docs/api-reference/v2/agents/get-agent.md), [Create thread](https://www.sapientpriors.com/docs/api-reference/v2/threads/create-thread.md)


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