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

# Context Engine

export const AIAgents = () => <>the <strong>AI Agents</strong> icon <span style={{
  whiteSpace: "nowrap"
}}><img src="/images/global-nav/ai-agents.png" width="20" height="20" style={{
  verticalAlign: "text-bottom",
  display: "inline",
  margin: "0 1px"
}} /></span></>;

export const mission_control = "Mission Control";

export const maia_agents = "Maia AI Agents";

export const context_engine = "Context Engine";

export const maia = "Maia";

<Badge color="green" shape="pill" stroke size="lg">Public preview</Badge>

{context_engine} helps you build a living map of your business logic. Use it to add and manage knowledge graphs that capture the structure, relationships, and meaning of your data. You can then tell {maia_agents} to use a specific knowledge graph when working on a task—for more information, read [Knowledge graphs in chats](/docs/guides/maia-sessions-and-tools#knowledge-graphs-in-chats).

{context_engine} ensures that {maia_agents} speak the language of your business and build pipelines relevant to your data landscape. It also enriches the answers {maia_agents} provide with extra knowledge about data, semantics, and processes.

{maia_agents} learn from past conversations with you. Your chat history acts as a feedback loop, automatically updating {context_engine} and amending semantic information. This helps {maia_agents} store memories and persist new insights from each interaction.

You select a knowledge graph when [creating a task in {mission_control}](/docs/guides/mission-control#creating-tasks).

<Tip>
  We recommend you add metadata, such as column descriptions and tags, to your data—that is, your databases, schemas, or datasets. This metadata will help {maia_agents} understand your data landscape and provide better responses to your prompts.
</Tip>

***

## Video example

Watch this video for an overview of {context_engine} and how to use it to build and manage knowledge graphs.

<p>
  <iframe width="560" height="315" src="https://www.youtube.com/embed/rjl6C7YKGfc?si=UOWtmcV7jBC4v75g&enablejsapi=1" title="Context Engine overview video" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />
</p>

***

## Context Engine dashboard

To access {context_engine}, in the left navigation, click <AIAgents />, then **{context_engine}**.

<Note>
  * {context_engine} is only visible in the left navigation if you have the **Admin** [account role](/docs/administration/account-roles) or higher, *and* the [**Enable AI Agents** permission](/docs/administration/manage-accounts#edit-account-details) is enabled for your account.
  * Only users with the **Admin** account role or higher can add and manage knowledge graphs and crawlers. However, all users can use knowledge graphs when chatting with {maia_agents}.
</Note>

The {context_engine} dashboard lists all the knowledge graphs you have access to. Use the **Projects** drop-down to filter the list by project, or use the search field to find a knowledge graph by name or description.

On the {context_engine} dashboard, you can add new knowledge graphs and edit the name, description, and availability of existing knowledge graphs.

### Add a knowledge graph

To add a knowledge graph, you must have either the **Admin** or **Super Admin** account [role](/docs/administration/account-roles).

1. Click **Add knowledge graph**.

2. Select whether the knowledge graph should be **Public** (available in all projects) or **Restricted** (available only in selected projects).

   <Warning>
     All projects can use public knowledge graphs. Make sure that the crawlers you add to public knowledge graphs will not ingest any sensitive data, or data that should not be available to all projects.
   </Warning>

3. In **Name**, enter a name.

4. In **Description**, enter a description.

5. If you selected **Restricted**, in **Projects**, select the projects that can use this knowledge graph.

6. Click **Add**.

After adding a knowledge graph, you can click its name in the {context_engine} dashboard to open three tabs, where you can perform the following actions:

* In the [Crawlers](#crawlers) tab:
  * Add and edit crawlers to ingest data from your connected data warehouses and pipeline execution history.
  * Monitor the status and run history of the crawlers in this knowledge graph.
* In the [Projects](#projects) tab, select which projects have access to this knowledge graph.
* In the [Access](#access) tab, select which users can manage this knowledge graph.

### Edit a knowledge graph

To edit a knowledge graph:

1. Click the name of the knowledge graph on the {context_engine} dashboard.
2. Click the edit icon next to the knowledge graph's name or description to edit this information.
3. Click the edit icon next to the knowledge graph's availability (**Public** or **Restricted**) to change this setting:

   * If the knowledge graph is public, click the edit icon, then click **Yes, restrict access**. You will then need to [add projects to the allowlist](#projects) for this knowledge graph.
   * If the knowledge graph is restricted, click the edit icon, then click **Yes, make public**.

   <Warning>
     All projects can use public knowledge graphs. Making a restricted knowledge graph public may expose sensitive or restricted data to unintended users. Make sure your knowledge graph doesn't contain any sensitive or restricted data before making it public.
   </Warning>

To delete a knowledge graph:

1. Click the name of the knowledge graph on the {context_engine} dashboard.
2. Click **Delete graph** in the top right.
3. In the confirmation dialog, click **Yes, delete**.

<Warning>
  Deleted knowledge graphs cannot be recovered. This action will permanently delete the knowledge graph, including all its crawlers, schedules, and run history.
</Warning>

***

## Crawlers

A crawler is a continuous process that connects, discovers, and maps data structures to populate the knowledge graph and keep them updated.

Click a knowledge graph to open its **Crawlers** tab, where you can view and manage the crawlers that populate the knowledge graph with data from your warehouse and pipelines.

{context_engine} supports the following crawler types:

* **Warehouse data:** Harvests your warehouse and structured sources supported via connectors to populate the graphs. This helps keep an accurate view of the data landscape.
* **Pipeline execution:** Harvests your pipeline executions for your chosen project and environment to build an operational understanding of how data flows through your organization and workflow.

You can add any number of **Warehouse data** and **Pipeline execution** crawlers to a knowledge graph.

### Add a crawler

1. Open the **Crawlers** tab of a knowledge graph.
2. Click **Add crawler**.
3. In the **Add crawler** step:
   1. In **Name**, enter a name.
   2. In **Type**, select **Warehouse data** or **Pipeline execution**.
   3. In **Project**, select the project to crawl. Only projects with access to this knowledge graph are listed.
   4. In **Environment**, select the environment to crawl.
4. Click **Continue**.
5. For **Warehouse data** crawlers only, in the **Select data** step, select the data you want to crawl. The fields in this step depend on your data warehouse:
   * For Snowflake, select your databases and schemas.
   * For Databricks, select your catalog and schemas.
   * For Amazon Redshift, select your schemas.
6. Click **Continue**.
7. In the **Schedule crawler** step:
   1. Select **Standard** or **Advanced** schedule settings.
   2. In **Timezone**, select the timezone for the crawl schedule.
   3. In **Date and Time**, select the start date and time.
   4. For **Standard** settings, use the repeat drop-downs to set how often the crawler runs.
   5. For **Advanced** settings, enter a cron expression to set how often the crawler runs.
8. Click **Add crawler**.

### Run a crawler

After adding a crawler, you must wait for it to run as scheduled. The following prerequisites apply:

* To run a **Warehouse data** crawler, your {maia} project must contain a schema that is populated with data.
* To run a **Pipeline execution** crawler, your {maia} project must contain at least one pipeline.

### Manage crawlers

To edit, reschedule, or monitor a crawler, open the **Crawlers** tab of a knowledge graph and click the crawler you want to manage, then select the corresponding item on the left to perform any of the following actions:

Click **Set up** to:

* Edit a crawler's configuration—its name, project, environment, and the data it crawls. Click **Edit**, make your changes, and then click **Save**.
* Delete a crawler. Click **Delete**. Then, in the confirmation dialog, click **Yes, delete**.

Click **Schedule** to:

* Change a crawler's schedule. Click **Edit**, make your changes, and then click **Save**.
* Pause a scheduled crawler. Click **Pause** in the top right. This crawler will not run until you resume it.
* Resume a crawler. Click **Resume** in the top right. This crawler will run at its next scheduled time.

Click **Last crawl** to see the status, start and end time, and duration of the crawler's most recent crawl.

Click **Crawl history** to see the status, start and end time, and duration of all crawls performed by this crawler.

### Crawler statuses

The table below lists all possible crawler statuses. In the **Crawlers** tab, these indicate the status of the crawler's most recent crawl. In the **Crawl history** section of a selected crawler, you can see the status of all past crawls.

| Status       | Explanation                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| Successful   | The crawler's last crawl was successful. The date of the last crawl is displayed next to the status.                                             |
| Initializing | A crawl has just started.                                                                                                                        |
| Extracting   | A crawl is currently in progress.                                                                                                                |
| Pending      | The crawler has been scheduled but hasn't run its first crawl yet. The date of the crawler's next scheduled run is displayed next to the status. |
| Paused       | The crawler is paused.                                                                                                                           |
| Failed       | The crawler's last run was unsuccessful. The date of the failed run is displayed next to the status.                                             |

***

## Projects

The **Projects** tab lists the projects that can use this knowledge graph. This tab is only relevant for restricted knowledge graphs.

* To add a project to the allowlist, click **Add project**, select one or more projects, then click **Add**.
* To remove a project from the allowlist, click the three dots in the project's row, then click **Remove from allowlist**.

***

## Access

The **Access** tab lists the users who can manage this knowledge graph. By default, only the user who added a knowledge graph can manage it. Users added to a knowledge graph can perform all available actions on the knowledge graph and its crawlers.

To add a user to a knowledge graph, click **Add user**, select one or more users, then click **Add**.
