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

# Agent mode

> Give one AI session the whole connection window: its sessions, its conversation, and the SQL it proposed

The chat in the [inspector](/features/ai-assistant#chat) is for a question. Agent mode is for a job. Press `Cmd+Option+Shift+A`, pick **Agent** under **View > Mode**, or click it in the toolbar, and the window's three columns become the sessions on this connection, the conversation, and what that session proposed and ran.

Nothing closes. The object browser and the editor tabs are where you left them, and **Browse** in the same place puts them back.

## The three columns

| Column       | Holds                                                                |
| ------------ | -------------------------------------------------------------------- |
| Sessions     | One row per session on this connection, each naming what it is doing |
| Conversation | The same chat as the inspector's, at the width of the window         |
| Result       | What this session proposed, ran and changed                          |

The choice is per connection, so one connection sits in Agent mode while another in the same window stays on a table. Drag either divider to resize; the widths are the ones the window already had.

## Writes wait for you

Agent mode holds the connection at [Safe Mode](/features/safe-mode) **Alert** for as long as the mode is on, whatever level the connection itself is set to. Every `INSERT`, `UPDATE` and `DELETE` the assistant proposes waits on its card for **Run** or **Reject**.

A connection already at Alert or stricter keeps its own level, and **Read-Only** stays read-only. Leaving Agent mode hands back the level you set, and nothing is written to the connection.

Each card names the statement and the connection it will run against, and shows the database when the assistant named one. The full request is one click away under the tool name.

<Warning>
  The floor is a habit, not a lock. It is one keystroke from off, so treat it as a reminder that a write is about to happen rather than as protection against one. What actually holds the assistant is the connection's AI Policy and Safe Mode, which apply in both modes.
</Warning>

`DROP`, `TRUNCATE` and `ALTER…DROP` are unchanged: each one is confirmed on its own every time, and no standing grant covers the next.

## Sessions

A session belongs to one connection and holds one conversation. Switching to Agent mode opens the first. Click **+** at the foot of the sessions column to start another on the same connection.

| State              | Meaning                                                   |
| ------------------ | --------------------------------------------------------- |
| **Working**        | Streaming a reply, or running a tool call                 |
| **Waiting on you** | Holding a statement that needs an answer                  |
| **Queued**         | Another session is streaming on the same provider         |
| **Ready**          | Waiting for your next message                             |
| **Stopped**        | Its window closed. The transcript is intact               |
| **Failed**         | The provider returned an error, or the app quit mid-reply |

Clicking a row selects it; double-click or **Open Session** in its context menu switches the two columns to its right. **Close Session** ends one and keeps its transcript.

Closing a window stops that connection's sessions and keeps what they said. Open one again and it continues. Nothing is replayed: a statement that was waiting for an answer when the window closed was rejected by the stop, so the assistant is asked again rather than the call being re-issued.

Sessions stay on this Mac. They are not part of [iCloud sync](/features/icloud-sync).

## The result pane

Four views of one session, and a view with nothing in it says what would appear there.

| View        | Shows                                                                      |
| ----------- | -------------------------------------------------------------------------- |
| **SQL**     | Every statement the session proposed, in order, with what became of it     |
| **Plan**    | The steps it has taken and what waits on you                               |
| **Results** | The rows it read, in the [data grid](/features/data-grid)                  |
| **Schema**  | Columns, indexes and constraints a `CREATE` or `ALTER` would add or remove |

**Results** is the data grid, so sorting, column widths, selection and `Cmd+C` work the way they do in a query tab, and values use the Data Grid font. A query the session ran more than once has a picker above the rows.

## Starting from the welcome window

Right-click a connection in the welcome window and choose **Open in Agent Mode**. The connection opens with its window already in Agent mode, and a connection that is already open switches where it stands rather than opening a second time.

The composer stays live while a connection is still being made, so a question typed during the connect is sent once the session can take it.

## Related

* [AI Assistant](/features/ai-assistant) for providers, tool calling and the inspector chat
* [Safe Mode](/features/safe-mode) for the levels and what each one gates
* [Keyboard shortcuts](/features/keyboard-shortcuts)
