Context
What the agent knows about your data
Each data source has its own context, in the Context section of the console at app.bonnard.ai. The agent uses it to
write correct SQL against that data source.
What context holds
| Item | What it tells the agent |
|---|---|
| Description | What a table or column holds |
| Key | The columns that identify one row, so it knows what it can count |
| Time column | Which date to filter and group by |
| Join | How two tables connect, so it joins on the right columns |
| Metric | A named calculation with instructions. Bonnard does not apply it to the agent’s SQL |
| Visibility | If it can find a table. Hiding does not stop a query that names the table |
Where a value comes from
The console marks a value with a badge that names its origin.
| Origin | Badge | What it supplies |
|---|---|---|
| Your team, in the console or an AI client | edited | Any item. A description your team writes overrides the database’s |
| The database | database | Descriptions, primary keys, and foreign keys. Bonnard does not read foreign keys from MySQL / MariaDB |
Drafts and versions
Each change goes into the draft. A data source has one draft, and everyone who changes its context works in it. A later change to the same field replaces the earlier one. AI clients and the customer portal use the live version until someone publishes the draft as the next version.
Each change records who made it and if it came through an AI client. To review, undo, or roll back, read Publish context changes.
Who can change context
The workspace role decides what each person can do.
| Action | In the console | In an AI client |
|---|---|---|
| Change the draft | Editor or higher | Editor or higher |
| Publish the draft | Editor or higher | Editor or higher, after an admin lets AI clients publish |
| Discard the draft or roll back | Editor or higher | No |
To let AI clients publish the draft, an admin sets Allow AI clients to publish context changes to on in Settings, AI tools. It is off by default and covers all data sources in the workspace.
A Viewer can read the context of the data sources they can use, including the open draft. Customers read the live context in the customer portal and cannot change it.
On a data source with tenancy, the agent can change context. It cannot do a check against the data until you select a customer in Preview as.
Related
- Hide tables from AI clients: keep staging copies and backups out of what agents find.
- Describe your data: write what agents cannot work out from column names.
- Connect tables with joins: add the joins your database does not declare.
- Define metrics: give each number one calculation.
- Publish context changes: take a draft live.