## Overview

The Account Brain has two pieces that work together:

- The **knowledge base** (corpus) is the set of **sources** that feed the Brain: documents you
  upload, pages you paste by URL, and the **objective/goal** you write about your business. Each
  source is processed and split into indexed pieces (the "chunks"), which Maestro consults to answer
  with a reference to the origin.
- The **structure** or **business map (ontology)** is the consultable result of that: a graph of
  **entities** (inboxes, teams, AI agents, labels, attributes, macros, channels) and the
  **relations** between them, built from the corpus plus the real data in your account. It's the
  "second brain" — the digital twin — Maestro uses to understand your operation.

In short: you **feed** the knowledge base and the Brain **builds** the business map from it. The
richer the corpus, the better the answers, risks and insights.

## Prerequisites

- An account with **Maestro** and the **Account Brain** enabled (the `account_brain` capability). If
  you can't find the area, talk to an administrator.
- **Reading is for any account member**: viewing the sources and the business map requires no special
  permission.
- **Adding or removing sources is administrator-only** — the server re-checks the permission, and the
  interface hides the upload/delete controls for non-administrators.

## Step by step

### Feed the knowledge base

In the **Knowledge base** (corpus) tab, you have three ways to "feed the Brain":

1. **Upload a document**: drag the file into the upload area (or click to choose) and confirm. The
   file is stored as an attachment and the Brain **fetches and extracts** its content, turning it
   into indexed pieces.
2. **Paste a URL**: paste a page address and confirm. The Brain fetches the page and extracts the
   content, just like a document.
3. **Write the account objective/goal**: describe, in text, your business goal (there's also a
   **voice dictation** button to fill it by speaking). The objective is a **fixed source**: saving it
   again **replaces** the previous one instead of duplicating.

### Make the knowledge base use the account's own key

Indexing a source needs a key from an **embeddings** provider. To have the base use your account's
key instead of the installation's:

1. Open **Settings → Integrations** and connect the provider's key (**OpenAI** or **Cohere** — the
   two providers that index the knowledge base). Only administrators, or people allowed to manage
   integrations, see that screen.
2. Go back to the **Knowledge base** tab and, under **Embeddings provider**, choose the provider of
   the key you connected and click **Save**. If the account already had sources, they are reindexed
   on their own.
3. Check the line right below the selector: it says **which key is in use** — the account's own
   (with the provider name), a robot's own key, or the installation's.
4. Send the source.

**No robot is required.** A key connected in Integrations works for the knowledge base even in an
account with no robot at all.

If the line shows the warning **"There is no usable key for the selected embedding provider"**, no
new source will be indexed until a key is connected. The warning carries an **Open Integrations**
shortcut for people who can manage them; everyone else is told who to ask.

### Manage sources

- The list shows each source with its **indexed-chunk count**, plus a summary at the top with the
  total number of sources and chunks — the proof the Brain has been fed.
- To **remove** a source, use the delete icon (administrators only) and confirm in the dialog.
  Removing a source **deletes all of its chunks** from the index.

### View the business map (structure/ontology)

- Open the **Structure** (ontology) tab to see the map built from the corpus and the account's real
  data. It is a tree: the **account**, four **domains** (Entry, Service, Automation and Context), the
  **families** of each domain (inboxes, channels, agent bots, teams, macros, labels, attribute scopes
  and custom attributes) and, inside them, the **entities**.
- The **bar** above the map carries the account's indicators (entities, relations, inboxes with a
  bot, unlinked), the search and the controls. Click an indicator to **highlight on the map** exactly
  the entities that explain that number; **Clear highlight** or Esc goes back. The **search** lists
  its results by family and takes you to the entity you pick.
- The **chips** right below are the legend: each family and each kind of relation. Clicking a chip
  **hides or shows** that family or that kind; double-clicking a family leaves only that one.
- Each **domain** shows its real coverage (for example, "13 of 24 inboxes with a bot") and each
  **family** shows how it is split (inboxes by channel, attributes by scope, how many are linked).
  Accounts with many entities open in the **overview**; click a family to open it or use **Expand
  all**. Large families show one part at a time, with **Show the rest**.
- The lines with an arrow are the **relations** the Brain mapped (for example, "uses bot" or "assigns
  to team"). Between closed families they are grouped, with the kind and the count; once an entity is
  selected, they appear one by one. The thin lines with no arrow only show what each part **belongs
  to**.
- Click an entity to open the detail panel with its **path to the account**, what the Brain knows
  about it (channel, provider, type, key, scope), its **relations by kind** and, when present, the
  **sources**. **Open in product** takes you to the screen where it is configured. An entity with
  **no mapped link** stays on the map and the panel explains why: either that kind of link has not
  been mapped for this account yet (use **Map now**), or it has and nothing points at it.
- Under **View** you choose the layout (**Hierarchy** or **Neural**), the density of the cards
  (compact, comfortable or detailed), how relations are drawn (bundles or strands, labels, animation,
  visible kinds) and whether the focus **isolates** the neighbourhood of the selection. The choices
  are kept in this browser; **Restore defaults** undoes them all.
- The bar, the legend, the minimap and the zoom can be **visible, compact, minimized or hidden**.
  **Clean mode** (H key) leaves just the map, with **Show controls** always in sight; **full screen**
  uses the whole window and Esc goes back.

## Settings & options

- **Embeddings provider** (administrators): at the top of the knowledge base you choose which
  provider indexes and searches the account's knowledge (installation default, OpenAI or Cohere).
  Switching **re-indexes every source automatically** — wait for processing to finish before
  judging answer quality.
- **Three input modes**: document, URL, or objective text — pick whatever fits each piece of content.
- **Objective as a fixed source**: re-saving the objective reindexes (replaces); it never piles up
  duplicates.
- **Per-source chunk count**: shows how much content was actually extracted and indexed.
- **Fail-safe behavior (cache-first)**: the business map is cached, so the screen **renders even if
  the engine is momentarily offline** — instead of showing an error.
- **Teaching empty-state**: when there's no knowledge yet, the screen invites you to feed the base
  rather than showing a dead screen.

### Which key is used, and when the installation's key comes in

For each provider, the platform looks for a key in this order and uses the first one it finds:

1. the **robot's own key** (set in the robot form, under *API keys (per provider)*);
2. the **account key**, connected in **Settings → Integrations**;
3. the **installation key**, set by the platform operator in their panel;
4. the **server environment key**, also the operator's.

The order applies **per provider**. That is why an account with its own key can still use an
installation key: it only takes a provider, in a robot's model chain or in the embeddings, for
which the account has **not** connected a key. Example: the account connected OpenAI, but the
chosen embeddings provider is Cohere — indexing looks for a Cohere key and, without the account's,
uses the installation's (or fails, if there is none).

To keep the account **off** the installation's keys:

- **Connect a key for every provider you use** and choose, under **Embeddings provider**, a
  provider the account has a key for. The line below the selector confirms the result.
- **On the robot**, untick **"Use my account keys when this bot has no own key"**. With the option
  off, the robot runs **only** on its own keys: not the account's, not the installation's, and a
  provider with no own key fails with a clear error instead of using another key.
- **For the whole account**: the platform operator can turn off, per account, the use of the
  installation's keys. The robot option then appears locked, with the notice that an individual key
  is required. Ask your platform operator for this.

### Alibaba and Mistral embeddings

- **Alibaba** (`text-embedding-v4`, `qwen3.7-text-embedding`) produces your base's width (1536 by default).
- **Mistral**: `mistral-embed` has **1024 dimensions** and does not fit a 1536 base — the screen warns and it is not
  used; `codestral-embed` fits but was made for code.
- Changing the embedding model still requires re-indexing the base.

## Use cases

- Centralize manuals, policies, catalogs and FAQs so Maestro answers consistently.
- Record the business objective to guide the copilot's proposals and actions.
- Visualize how inboxes, teams, agents and attributes connect — useful to review your account setup.
- Build a solid base that improves the risk analysis and insights generated per department.

## Tips, limits & best practices

- **The richer and cleaner the corpus, the better**: up-to-date, well-written documents produce more
  accurate risks, insights and analyses.
- **A clear objective improves the proposals** from the copilot and the departments.
- Avoid uploading outdated content — old information yields old suggestions.
- The business map **populates over time**: feed sources and wait for processing.
- Indexing uses **embeddings with automatic provider fallback** (e.g. OpenAI → Cohere). Connect
  a **Cohere** key under *Integrations* so the knowledge base keeps indexing even when the primary
  provider runs out of credits.

## Troubleshooting

- **Source with 0 chunks**: the extraction found no content — the format may be unsupported, the file
  may be empty/protected, or the URL may be unreachable. Try another format or re-upload.
- **Business map (ontology) is empty**: the map does NOT come from the sources you upload — it is
  built from your account's real structure (inboxes, teams, bots, labels, attributes, macros). It is
  generated when the account is created and refreshed once a day after that. On an account created
  right after the daily refresh, the map stays empty until the next one. Use **Map now**, on the
  empty screen itself, to build it immediately — it takes a few seconds.
- **"Could not map this account"**: Maestro could not read your account's structure. This is almost
  always the account access token Maestro uses; ask an installation administrator to review it and
  map again.
- **Action blocked**: uploading or removing sources is administrators only. If the controls don't
  appear (or the action is refused), confirm your role with an administrator.
- **"The source was not added: the embedding provider's key is missing or was refused"**: there is
  no valid key for the selected embeddings provider. Open **Settings → Integrations**, connect or
  fix that provider's key (OpenAI or Cohere), check its credits and send the source again. The line
  below **Embeddings provider** shows which key is in use; if you cannot see Integrations, ask an
  account administrator.
- **Incompatible embedding model while saving a Robot**: each installation stores vectors at one
  fixed width. Pick a model with the same dimension shown on screen — on a 1536 installation, use
  `text-embedding-3-small` instead of `text-embedding-3-large` (3072). After changing a model
  that has already been used, reindex the knowledge base so old and new vectors are not mixed.

## See also

- [What is Maestro AI and the Account Brain](/hc/ajuda/articles/maestro-brain-overview-en)
- [Voice onboarding and assisted setup](/hc/ajuda/articles/maestro-brain-onboarding-por-voz-en)
- [Departments, risk analysis and insights](/hc/ajuda/articles/maestro-brain-departamentos-risco-insights-en)