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

# Tables in Agents

> Let an agent query, and optionally edit, the tables you attach

Attach tables to an agent so it can answer questions from them with SQL. By default the agent can only read them; turn on **Allow edits** to let it change rows.

<Frame>
  <video autoPlay muted loop playsInline controls preload="auto" width="3686" height="2160" style={{ width: "100%", height: "auto" }}>
    <source src="https://storage.googleapis.com/noxus-docs-videos/tables/tables-agents-v3.mp4" type="video/mp4" />
  </video>
</Frame>

## Attach a table

<Steps>
  <Step title="Open the agent's Knowledge tab">
    Open the agent and go to the **Knowledge** tab.
  </Step>

  <Step title="Add a table">
    Under **Tables**, click **Add table**, search for the table and pick it. Only your own tables can be attached, not platform tables.
  </Step>

  <Step title="Configure it">
    Fill in the settings below and click **Add table**.
  </Step>
</Steps>

## Settings

| Setting | Default | Notes |
| :- | :- | :- |
| **Table context** | Empty | What the table holds and when the agent should query it. You can also edit it on the row. |
| **Allow edits** | Off | Lets the agent insert, update and delete rows. Off keeps the table read-only. |
| **Max rows** | 100 | The most rows the agent can fetch per query, from 1 to 10,000. |
| **Query timeout (s)** | 30 | Seconds before a query is cancelled, from 1 to 300. |
| **Switch on the row** | On | Turns the table on or off for the agent. |

## How the agent uses tables

* The agent only sees the tables you attached and turned on. A query that touches any other table is rejected.
* When a query touches several tables, the strictest **Max rows** and **Query timeout** among them apply.
* With **Allow edits** on, `UPDATE` and `DELETE` must include a `WHERE` clause. DDL and `TRUNCATE` are never allowed.

<Warning>
  With **Allow edits** on, the agent changes rows directly, so turn it on only for tables the agent needs to update.
</Warning>

<Tip>
  Good table context tells the agent what a row is, what the key columns mean, and when to use the table. For example:

  > One row per customer order. `status` is one of `open`, `shipped` or `cancelled`. `customer_email` matches `customers.email`. Use this table for questions about order history or delivery status.
</Tip>


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