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

# Set up the Company Brain

> Brains, collections, live sources, settings, learned facts and the access log in Platform > Agents > Knowledge.

Admins manage the Company Brain in **Platform > Agents > Knowledge**. A **Needs you** strip at the top lists learned facts waiting for approval and sources agents cannot read yet.

![Knowledge page with a Needs you strip (2 learned facts waiting, Review) and the areas Collections, Sources, Brains, Learned facts, Access log and Settings with their statuses](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-knowledge-page.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=0d5ae3923a145ce5431fbb9fa0c71f21)

Platform > Agents > Knowledge: the Needs you strip above the six areas, each with its status. Shown with sample data.

**Who sees the page.** Organization admins manage everything on it. A role with view access to the **Knowledge** area sees every area read-only. The access log, the speed figures and flushing the cache are for organization owners and admins.

## Brains

| | The Company Brain | A specific brain |
| - | - | - |
| Created by | Built in, one per organization | An admin, with **New brain** in the Brains panel |
| Holds | Every connected source, collections shared with everyone, approved facts | The collections and source paths you pick |
| On which agents | Every agent, unless switched off for one | Only the agents it is attached to |
| Whose access it uses | Always each person's own | Each person's own, or shared agent access |
| Can be deleted | No | Yes. Agents it was attached to stop using it. Its collections and sources stay |

### Create a specific brain

**1. Open a new brain**

In **Brains**, select **New brain**.

**2. Describe it**

Fill **Name** and **What it's for**. Agents use the description to decide when to ask this brain, so name its subject, for example "Contracts, matters and legal policy. Use for anything about terms, liability or clients."

**3. Pick an owner**

The **Owner** approves learned facts proposed for this brain and keeps its contents current.

**4. Pick what it holds**

Under **Collections**, pick the collections it searches. Under **Connected sources**, pick sources and, optionally, narrow each one to a path such as `/sites/legal`. A brain can narrow a source, never widen it.

**5. Choose whose access it uses**

Open **Access and sharing**. **Whose access it uses** is **Each person's own** by default. See the next section before choosing **Shared agent access**.

**6. Choose who can attach it**

Under **Who can attach it**, pick the groups that may add this brain to their agents. With none picked, anyone who manages knowledge can attach it. Then select **Create brain**.

![Legal brain card with Name, What it's for, Collections chips, Connected sources with a /sites/legal path for SharePoint, Owner, and Access and sharing with Whose access it uses set to Each person's own and Who can attach it](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-brain-editor.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=e68f967ccee135ec73f533c9582a029b)

A brain opened from Brains: what it is for, the collections and connected sources it searches, its owner, and under Access and sharing whose access it uses and who can attach it. Shown with sample data.

### Whose access it uses

* **Each person's own**: each person gets only what they can open themselves. Stored documents are filtered by their access, and live sources are read with their own account. Use it for any agent your own people sign in to.
* **Shared agent access**: anyone using an agent this brain is attached to can read its collections, signed in or not. Use it for public, embedded and community agents. Connected sources are left out, because they need each person's own sign-in. To include a folder's files, [keep a copy](#keep-a-copy-of-a-folder) of it.

## Collections

A collection is a set of documents stored in xpander, with an owner and an audience. Documents are split into sections with their heading path and page number, so agents cite them down to the page.

![Collections panel on the Legal playbooks tab with Add documents and four documents showing Ready, Review overdue and Processing statuses](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-collections.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=31a69c72e78e8efb10a26f19a4f2e1f8)

The Collections panel: one tab per collection, who can read it, and each document with its owner, access, version and status. Shown with sample data.

### Create a collection

1. Select **New collection** in the page header.
2. Fill **Name** and **What it holds**.
3. Under **Who can read it**, choose **Everyone in the organization**, or pick people and groups. Each document can narrow this further.
4. Turn on **Let others who can read it add files** to let anyone in the audience add documents. Off, only the owner and admins add files.
5. Select **Create collection**. The **Add documents** card opens next.

### Add documents

**Add documents** takes three kinds of content:

* **Upload**: drop files or choose them. PDF, Word, PowerPoint, Excel, Markdown, HTML or images, up to 25 MB each. Scans are read with OCR.
* **Paste**: a **Title** and the **Text**.
* **From a URL**: the **Address** of a public page, and an optional **Title** (the address is used when it is empty). Addresses inside your network are refused.

![Add documents card for Legal playbooks with the Upload, Paste and From a URL tabs and a Choose files button](https://mintcdn.com/xpanderai-099931d1/PE_rYtMHQe3CXVP1/images/use/company-brain/company-brain-add-documents.png?fit=max\&auto=format\&n=PE_rYtMHQe3CXVP1\&q=85\&s=acffb83db98ccb5b3bbd8feb8144cfe7)

Add documents on a collection: Upload, Paste or From a URL. Shown with sample data.

Each document goes **Waiting**, **Processing**, then **Ready**, usually within a minute or two. **Failed** shows the reason.

### The document card

A document past its **Review by** date shows **Review overdue**. The chunk preview shows how the document was split, with the heading path and page each answer cites.

**Only some people**, under **Who can read it**, limits one document to named people and groups inside the collection's audience. An access change applies on the next question, with nothing parsed again.

### Versions

**New version** adds an upload, paste or URL as the next version. Only the current version is searched, and the previous one keeps answering until the new one is ready. **Make current** (for example **Make v3 current**) rolls back to an older version. If it needs re-indexing first, the current version keeps answering until it is ready.

### Share and delete

**Edit collection** changes its name, description and **Who can read it**. **Delete collection** removes every document and version, and brains that hold it stop finding them.

## Sources

A ready source shows **Ready** and how many people signed in, for example `188 of 240 people signed in`. **Needs connection** means it has no connection yet. **Needs scope** means it reads only what you pick and nothing is picked.

![Sources panel with Add source and rows for Collections (built in), Google Drive, SharePoint, Confluence and Jira marked Ready with signed-in counts](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-sources.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=bda79aeddb536fa3f1020877feff5bc1)

The Sources panel: the built-in collections, then each live source with its status, how many people signed in, and who can read it. Shown with sample data.

### Add a source

**1. Pick the type**

In **Sources**, select **Add source** and pick Google Drive, SharePoint, OneDrive, Confluence, Jira or Notion under **Type**. To connect your own system instead, pick **Custom**; see [Custom sources](https://docs.xpander.ai/use/company-brain/custom-sources.md).

**2. Pick the connection**

Under **Connection**, choose the connection people sign in through. It is used only to send each person to their own sign-in.

**3. Name it**

Under **Name**, enter a name people recognize, such as "Legal SharePoint". It appears in citations, the access log and each person's sources. Select **Add source** to open the source's card.

**4. Set its scope**

On the card's **Scope** tab, choose what the brain may read from it, as described below, and select **Save scope**.

![Add source dialog with Type SharePoint, Connection SharePoint (each user signs in), Name Legal SharePoint, and the Add source button](https://mintcdn.com/xpanderai-099931d1/PE_rYtMHQe3CXVP1/images/use/company-brain/company-brain-add-source.png?fit=max\&auto=format\&n=PE_rYtMHQe3CXVP1\&q=85\&s=1bdfc03086f841df0f31530283029613)

Add source: the type, the connection each person signs in through, and the name people see. Shown with sample data.

### Each person signs in once

There is no shared or service account. Each person connects once, from **Settings > Knowledge** in xpander Chat, from the source's **Scope** tab, or from **Connect** under an answer that skipped the source. Until then, the brain skips that source for them. The **Connection** tab shows how many people are connected, the timeout, and whether any content is stored in xpander.

> [!NOTE]
>
> On an air-gapped installation, Google Drive, SharePoint, OneDrive, Confluence, Jira and Notion are not available, because they need each person to sign in to Google, Microsoft, Atlassian or Notion. A [custom source](https://docs.xpander.ai/use/company-brain/custom-sources.md) inside your network works there, and so do collections.

> [!NOTE]
>
> SharePoint and OneDrive need your Microsoft tenant admin to consent to the delegated `Files.Read.All` and `Sites.Read.All` permissions before anyone can sign in.

### Scope

The **Scope** tab sets what the brain may read. It still reads only what each person can open.

* **All the user can see**: everything the person can open. Best for wikis and ticket systems.
* **Only what you pick**: only the shared drives, sites, libraries, folders, spaces, projects or files under **Include**. Best for file drives, where personal drives add noise.

**Include** opens a picker that browses the source with your own account (for example **Choose shared drives and folders** or **Choose spaces**). Tick what agents search, or use **Add by path**. **Leave out places** under **Exclude** ticks what to leave out.

![Scope tab with the modes All the user can see and Only what you pick, an Include section with the Choose shared drives and folders button, Exclude with Leave out places and Add rule, Let users add their own files, and Save scope](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-scope.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=83c2feb13d89a290df47f7f15dbd5543)

The Scope tab of a Google Drive source with Only what you pick and nothing picked yet. Shown with sample data.

![Choose what Google Drive reads dialog with Include and Exclude tabs, a search box, two ticked shared drives, My Drive, Add by path, and Cancel and Done](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-scope-picker.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=4576c276a460b7bd5f59495f0bc6c69a)

The picker: shared drives come first; tick what agents search, or switch to Exclude to tick what they leave out. Shown with sample data.

**Exclude** rules apply in both modes: **Path**, **Label** (for example Confidential), **File type** (for example `xlsx`) or **Modified date** (older than a number of months).

**Let users add their own files** (Google Drive, SharePoint and OneDrive) lets each person share single files with the brain through the Google or OneDrive picker. Only the picked files are shared, and exclude rules still apply to them.

The scope is applied to the query and checked again on every result and read, so an item outside it is never returned, even to someone who can open it.

> [!TIP]
>
> **Test as a user** runs a **Question** as a **Person** you pick, with the saved scope, and lists what the brain **Would read** and what was **Left out by the scope**, with reasons.

![Test Google Drive as a user dialog with Person, Question, a Would read list of two files and a Left out by the scope list naming an excluded path and a Confidential label, and Run again](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-test-as-user.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=c1a88047f0e40eb769f175f7aa2e8c1b)

Test as a user on a Google Drive source: two items would be read, two were left out by the scope with the reason. Shown with sample data.

### Sensitive sources and cache

The source's **Speed** tab holds two settings:

* **Sensitive**: results are never cached, so every answer reads the source fresh. Use it for HR, legal and other restricted material. The Sources table marks it with a **Sensitive** badge.
* **Cache results for**: seconds results are kept for the same person (0 to 3600, default 60, 0 turns it off). Cached results are never shared, so a permission removed in the source can take up to this long to apply.

**Flush cache** on the Speed tab clears one source. **Flush cache** under **Speed** at the bottom of the Sources panel clears the organization's whole brain cache.

### Keep a copy of a folder

For a Google Drive folder, or a SharePoint or OneDrive library folder, the **Keep a copy** tab copies the folder into a collection. Use it to make those files available to a brain with shared agent access.

1. Enter the **Folder**: a Google Drive folder link or id, or for SharePoint and OneDrive the library's **Drive id** and **Folder item id**.
2. Under **Copy into**, pick a collection or **A new collection**.
3. Set **Who can read the copy**. It does not follow who can open the folder: everyone in this audience sees every copied file. Confirm that, then select **Keep a copy**.

The folder is read with your own sign-in, and the source's exclude rules apply to every file. It syncs on a schedule, and **Sync now** syncs at once. If your sign-in stops working, the copy shows **Needs reconnect** until you reconnect or another admin turns it on with their own account. **Stop syncing** keeps the copy readable by its audience, or deletes it if you choose **Delete the copy**.

### Notion

Notion is read live through Notion's own hosted service, with each person's own Notion account. Notion decides what each person can find and open, so answers follow their real Notion access. Nothing is copied into xpander and nobody has to share pages with xpander.

**1. Set up Notion (once)**

In **Sources**, select **Add source** and pick **Notion** under **Type**. Under **Sign-in**, select **Set up Notion**. This adds Notion to your organization's **Skills registry**, with each person signing in on their own. It is not added to any agent. Setting up Notion takes an admin, or a member of a group your admins allow to manage organization skills. Once it is done, **Sign-in** reads **Notion is set up**.

**2. Add it**

Select **Add source**. The source reads everything each person can open in their own Notion.

**3. Narrow it (optional)**

On the card's **Scope** tab, choose **Only what you pick** and **Add places** to limit it to pages and databases: a picked page covers every page under it. **Leave out places** and **Path** rules drop pages anywhere, by their place in Notion (for example `/Engineering/Interviews`). The places picker searches Notion by name with your own account.

![Add source dialog with Type Notion, the Sign-in section titled Set up Notion for your organization with a Set up Notion button, and Add source disabled](https://mintcdn.com/xpanderai-099931d1/eg4qa4fuajQHtfMy/images/use/company-brain/company-brain-notion-set-up.png?fit=max\&auto=format\&n=eg4qa4fuajQHtfMy\&q=85\&s=f7d94bb7f51be4e97c4e9f109ea2f994)

Add source with Notion before it is set up: Set up Notion adds Notion for the whole organization. Shown with sample data.

![Add source dialog with Type Notion, Sign-in reading Notion is set up, Name Notion, and the Add source button](https://mintcdn.com/xpanderai-099931d1/eg4qa4fuajQHtfMy/images/use/company-brain/company-brain-notion-add-source.png?fit=max\&auto=format\&n=eg4qa4fuajQHtfMy\&q=85\&s=09142201bde55fdf96e15d0145e5b32c)

Notion set up: add the source, and each person connects their own Notion account. Shown with sample data.

![Notion source card on the Scope tab with Only what you pick selected, Include listing Company Handbook and Product Roadmap, and Board notes under Exclude](https://mintcdn.com/xpanderai-099931d1/eg4qa4fuajQHtfMy/images/use/company-brain/company-brain-notion-source.png?fit=max\&auto=format\&n=eg4qa4fuajQHtfMy\&q=85\&s=9adc9455ff24e4641327cba671bd8e4e)

A Notion source's Scope tab, narrowed to a page and a database with one page left out. Shown with sample data.

* **Each person connects.** Someone who has not connected Notion gets nothing from it and is offered **Connect**, as for any source. They connect once from **Settings > Knowledge > My sources** with their own Notion account.
* **Citations** name the page and link straight to it in Notion.
* **Search quality** follows each person's Notion plan: with Notion AI, Notion's search understands questions, not just keywords.
* **Rate limits.** Notion limits how often each person can search (about 30 searches a minute). A person who hits it gets nothing from Notion for a short while; other sources still answer.
* **Removing** the source changes nothing in Notion and leaves Notion in your organization's **Skills registry**.
* **Air-gapped installations** can't use Notion: it needs Notion's cloud service.

## Settings

| Setting | Default | What it does |
| - | - | - |
| **Members can create their own collections** | Off | Members create, share and delete collections they own from **Settings > Knowledge**. Off, only admins create collections. |
| **Members can share with everyone** | Off | Members may share their collections with the whole organization. Off, they share only with themselves, groups they are in, or people they pick. Needs the first setting on. |
| **Agents can propose facts** | On | Agents may suggest facts they learned in a conversation. A person approves each one before any agent uses it. |

Whether others may add files to a collection is set per collection, with **Let others who can read it add files**.

## Learned facts

An agent can propose a fact, decision or procedure that a conversation established. A proposal is never used in an answer until its owner approves it, and then only for its audience. Learned facts are separate from agent memories, which hold short notes with no approval step.

Each proposal can be approved, edited first (**Save and approve**), or rejected. A rejected fact is never returned.

**Who reviews.** In order: the owner of the collection the fact goes to, the owner of the agent's first attached brain that has one, the Company Brain's owner, then an organization admin. The reviewer gets a notification and also sees the fact under **Settings > Knowledge > Waiting for your approval**.

**Conflicts.** When a proposal contradicts a stored document, the card says **This disagrees with** that document and the button reads **Approve and flag document**. Approving asks the document's owner to update it. Only documents the reviewer can open are named.

![Learned facts panel with Waiting for your approval (2), the Mine to review and Everyone filters, a fact with Approve, Edit and Reject, and an update shown as a diff with a warning and Approve and flag document](https://mintcdn.com/xpanderai-099931d1/k9UOsTNQoJ3cIiJ7/images/use/company-brain/company-brain-learned.png?fit=max\&auto=format\&n=k9UOsTNQoJ3cIiJ7\&q=85\&s=72bc6eab6688131e225f7c4f92b859b0)

Learned facts waiting for approval. The second proposal updates a stored fact and disagrees with a document, so approving it flags that document. Shown with sample data.

Every decision is recorded in the audit log with the fact before and after.

## Access log and speed

**Access log** lists every brain read: who, through which agent, which document (with version and page), and the result.

| Result | Meaning |
| - | - |
| `read` | The item was opened in full |
| `cited in answer` | The item was returned as a cited passage |
| `read from cache` | Served from the cache, still logged |
| `blocked by a wall` | Blocked by access. The row never says what exists there |
| `filtered out` | Left out by the source's scope, with the reason |
| `failed` | The read errored, for example the source timed out or the person is not connected |

![Access log panel with a search box, an All results filter, and rows with results read, blocked, cited in answer, read from cache and filtered out](https://mintcdn.com/xpanderai-099931d1/PE_rYtMHQe3CXVP1/images/use/company-brain/company-brain-access-log.png?fit=max\&auto=format\&n=PE_rYtMHQe3CXVP1\&q=85\&s=fda935e7da820e54d79095271396c447)

The access log: who asked, through which agent, what was read, and the result of each lookup. Shown with sample data.

**Speed**, at the bottom of the **Sources** panel, opens **Brain speed, last 7 days**: ask time at p50 and p95, the cache hit rate, and the model calls the cache saved.


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