# AI Agent

> Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL.

AI Agent is a QGIS plugin that carries out a GIS task in the project you have open, from one written message. It finds the data, runs the processing, styles the layers and builds the layout, then checks the rendered map before it answers. Every change it makes can be undone.

## Before you start

- QGIS 3.28 or later, on Windows, macOS or Linux, with an internet connection.
- The plugin installed and signed in: see [Install and sign in](https://terra-lab.ai/docs/plugins/install).
- A project open in QGIS. It can be empty: the agent can add the data itself.

## Run a task

1. Open the panel with `Ctrl+Shift+K`, the **AI Agent** button on the TerraLab toolbar, or **Plugins**, **AI Agent**.
2. Type what you want in the message box, for example: "Show the buildings of Sommières that stand in a flood zone, styled by height, and make an A4 layout." Press `Enter` to send.
3. Follow the run. The **Plan** card lists the steps and ticks them off; each step shows the tool it used and its result. When a step needs your approval, a card asks before it runs.
4. Read the answer, then keep the result, ask for a change in the same chat, or undo it from **Map history**.

The agent already sees your layers, their fields, the coordinate system and the map extent, so you can name a layer as it appears in the Layers panel.

You can also start from the map: right-click the canvas and choose **Ask AI Agent about this view** or **Ask AI Agent about the selected feature(s)**.

## What it can do

- **Your data**: any layer QGIS opens (GeoPackage, Shapefile, GeoTIFF, CSV, PostGIS, WMS, WFS and more), and files you attach.
- **Open data**: it finds and downloads datasets for your area, such as OpenStreetMap, Overture, Copernicus, IGN, USGS or NASA, each with its licence.
- **Processing**: the QGIS Processing toolbox and the algorithms of the plugins you have installed, run in sequence on your layers.
- **Map making**: symbology, labels, print layouts in any QGIS paper size, exported to PDF, PNG, JPG, TIF or SVG, and Word or HTML reports.
- **Editing**: features and attributes of editable layers.
- **The other TerraLab plugins**: it can hand imagery to [AI Segmentation](https://terra-lab.ai/docs/plugins/ai-segmentation) or [AI Edit](https://terra-lab.ai/docs/plugins/ai-edit) when they are installed.

It cannot see or use other applications on your computer, and it has no offline mode.

## Attach files, layers and links

Click the paperclip to **Add files from your computer**, **Attach a layer of this project** or pick one of the **Data sources**. Type `@` in the message box to pick a layer or a source by name. Pasted links, coordinates and geometries become cards the agent reads with your message.

Documents are accepted too (PDF, Word, PowerPoint, Excel, text, Markdown, HTML, XML), for example a specification to follow.

## Control what it changes

The permission chip under the message box sets how often the agent asks before it acts:

| Level | Asks before |
| --- | --- |
| Ask first | Every change |
| Balanced (default) | Deleting, overwriting, installing, or reaching an unknown website |
| Autopilot (Pro) | Nothing: it runs the whole task. Turning it on asks you to confirm once |

The effort slider (Low, Medium, High) sets how far the agent goes on a hard task. It starts at Low on each new chat. Medium and High are part of Pro.

## Undo with Map history

Before the first change of a request, AI Agent saves a checkpoint of your project. Open **Map history** (`Ctrl+Shift+X`) to go back to any earlier point, or press `Ctrl+Shift+Backspace` to undo the last request.

> [!NOTE]
> Map history restores the project: layers, styles, layouts and edits. Files the agent wrote to disk stay on disk, and a temporary layer that was not saved may not come back.

## Chats, memory and settings

- **Chat history** (the clock icon) lists your chats per project, with search.
- **Memory**: the agent saves short notes about how you work and reuses them. Turn it off or edit the notes in **Settings**, **Memory**.
- **Settings** (the gear icon): language, response style (Concise, Balanced, Detailed), typing suggestions, notifications and sounds, your name and job, and on Pro, a short text about you and standing instructions.
- **Voice dictation**: press `Ctrl+Shift+D` and speak; the text lands in the message box for you to read before you send it.

## Keyboard shortcuts

| Action | Shortcut |
| --- | --- |
| Open or close the panel | `Ctrl+Shift+K` |
| Send | `Enter` (new line: `Shift+Enter`) |
| Stop the run | `Esc` twice |
| Map history | `Ctrl+Shift+X` |
| Undo the last request | `Ctrl+Shift+Backspace` |
| Voice dictation | `Ctrl+Shift+D` |

`Ctrl+Shift+K` can be changed in **Settings**, **Keyboard Shortcuts** in QGIS. On macOS, `Ctrl` is `Cmd`.

## Tasks, free plan and Pro

A task is one message you send, however many steps the agent takes. A task that fails on our side is given back.

| Plan | Tasks a month | Also included |
| --- | --- | --- |
| Free | 5 | Low effort, Ask first and Balanced. Personal, non-commercial use |
| Pro | 200 | Medium and High effort, Autopilot, history retention choice, commercial use |

Pro starts with a 7-day free trial. The allowance renews on the same day each month; the panel shows the count once 3 tasks are left, and **Settings**, **Usage** shows it at any time. Prices are on the [pricing page](https://terra-lab.ai/pricing). See [Account, plans and billing](https://terra-lab.ai/docs/plugins/account).

## Limits

- One message holds up to 200,000 characters and 24 attachments.
- A run can last up to one hour and 600 tool calls; a run with no answer for 10 minutes stops.
- You can queue up to 5 messages while a run is going: the agent reads them at its next step.

## Privacy

A task sends your request, its attachments, your saved instructions and memory notes, the earlier messages of the chat, the results of the QGIS actions the agent runs, and a description of the open project (file name, extent, coordinate system, and the names, fields and extent of the layers that matter). The agent servers are in the EU. Chats are kept as your history setting says and are never used to train AI. The switch **Help improve AI Agent** in **Settings**, **Privacy** turns off usage statistics. Details: [privacy policy](https://terra-lab.ai/privacy-policy).

## Troubleshooting

- **"Not connected to TerraLab, so nothing was sent"**: check your connection, then send again. Behind a proxy, set it in QGIS **Settings**, **Options**, **Network**.
- **"The AI agent got stuck on the same step"**: rephrase the request or name the layer and field it should use.
- **"This conversation is too long"**: start a **New chat**; the project keeps its state.
- **"You used your last task"**: your tasks reset on the date shown, or move to Pro.
- Anything else: [Plugin troubleshooting](https://terra-lab.ai/docs/plugins/troubleshooting), or **Send feedback** in the panel header.

## Learn more

- [AI Agent for QGIS: the complete guide](https://terra-lab.ai/blog/ai-agent-complete-guide): first request, examples and five real tasks.
- [The AI Agent benchmark](https://terra-lab.ai/blog/ai-agent-qgis-plugin-geospatial-benchmark).
- [Product page](https://terra-lab.ai/ai-agent).

Source: https://terra-lab.ai/docs/plugins/ai-agent · Updated 2026-11-23
