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

# Use Kubit with Cortex Agents

> Read Snowflake Cortex Agents traces in place with a Cortex Agents workspace, with nothing to install in your app.

If your agents run on Snowflake Cortex Agents, Kubit reads their traces in place. Create a **Cortex Agents** workspace, connect Snowflake and apply the Cortex Agent preset. Nothing changes in your app.

## Before you start

* [ ] Cortex Agents traces in Snowflake.
* [ ] A Snowflake connection for your organization. See [Connect Snowflake](https://learn.kubit.ai/warehouses/connect/snowflake.md).

## Steps

### 1. Create the workspace

Create a workspace and pick the **Cortex Agents** origin (`Cortex Agent traces in Snowflake`). Pick an **Organization connection**, or click **Create connection**. See [Set up your organization](https://learn.kubit.ai/start-here/admin.md).

![Create Workspace dialog with Workspace Name Support Agent, Workspace Timezone Europe/Athens (UTC+2\*) and Origin Cortex Agents, with the hint Cortex Agent traces in Snowflake, above the Continue button.](https://mintcdn.com/kubit/iy-nIyF9Xtsr91WV/images/agent-observability/integrate/create-workspace-cortex-agents.png?fit=max\&auto=format\&n=iy-nIyF9Xtsr91WV\&q=85\&s=43da90b6560cc832616b4e162aaceaeb)

### 2. Apply the Cortex Agent preset

The workspace opens on the **Cortex Agent** preset tab in the Modeler. Pick your agent. Check **I confirm my reports cover only finished runs.** Under **Tables to create**, check **Price table** and **Evaluator result tables**. The Evaluator result tables let the Evaluator run and save its labels. **Created in** shows where they go, and you can pick another location. Then click **Set up Cortex Agent**.

> [!WARNING]
>
> The **Schema** tab stays grayed out until you apply the preset, with the tooltip `Apply the Cortex Agent preset first. Mapping a table by hand would turn it off for good.` Once a table is mapped by hand, the preset is off for that workspace and can't be turned back on.

### 3. Pick where Polaris results go

On the **Evaluator** page, pick a schema under **Evaluator results**. Polaris writes its labels and scores there, next to the traces. See [Where Polaris results are stored](https://learn.kubit.ai/warehouses/overview.md#where-polaris-results-are-stored).

| **Constraint** | **Value** |
| - | - |
| **Source** | `SNOWFLAKE.LOCAL.GET_AI_OBSERVABILITY_EVENTS` for the agent you pick, reading `SPAN` records only |
| **Cortex evaluation data** | Not read by the preset. A **Sandbox** upload of Cortex events reads evaluation spans as scores. |

To try Kubit before you connect a warehouse, export the traces to a file and upload it to a **Sandbox** workspace instead. See [Upload traces to a Sandbox workspace](https://learn.kubit.ai/agent-observability/integrate/sandbox-upload.md#snowflake-cortex).

## Verify

The workspace activates on the apply that completes it: a warehouse connection, a fact table with an **Event** and a **Timestamp** column, and at least one enabled subject. Before that, it shows `No data yet. Finish setting up your model.`

## If it fails

| **Symptom** | **Cause** | **Fix** |
| - | - | - |
| The **Cortex Agent** preset tab is grayed out with `The schema was already set up by hand, so the Cortex Agent preset no longer applies.` | A table was mapped by hand on the **Schema** tab | The preset can't be turned back on for that workspace. Create a new **Cortex Agents** workspace and apply the preset first. |
| `No data yet. Finish setting up your model.` | The model is missing a connection, an event and timestamp column, or a subject | Finish the Modeler steps |

## Next Steps

* [Modeler](https://learn.kubit.ai/warehouses/modeler.md#agent-observability-presets): how presets work.
* [Polaris](https://learn.kubit.ai/agent-observability/use/polaris.md): what Polaris adds to your traces.


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