The Spreadsheet Agent
The Spreadsheet Agent is an AI assistant built into the spreadsheet editor. It appears as a chat panel next to the sheet and builds working spreadsheets on live Business Central data — you describe the report or dashboard you want, and you watch the sheet update in real time while the agent works.
Setting It Up
The agent needs an AI provider:
- Open AI Provider from the Spreadsheets list (or the ALAI Providers page directly).
- Configure a provider — the endpoint, access key and model.
- Turn on the Spreadsheet Agent toggle on the provider.
When a provider with the toggle is active, the editor shows the agent chat panel ("Ask me to build your reports!") beside the sheet. Without one, the editor works exactly the same, just without the panel.
What the Agent Can Do
The agent works through the same engine you use — everything it builds is a normal spreadsheet you can edit afterwards. Its tools cover:
- Reading and understanding: read the sheet's cells and structure, recalculate, list sheets, find Business Central objects, inspect a table's fields and keys, and read table rows — so it works with your real data model instead of guessing. Recalculate reports formula errors and data regions whose source failed (the red region badge you see), so the agent can fix a broken SQL statement or filter without being told.
- Cells and styling: set cell values, formulas and slicers; apply styles, number formats and column/row sizes; insert and delete rows and columns; clear ranges.
- Regions: create and configure every region type — table, chart, KPI card, page, financial report, budget matrix, query, report (including request-page filters), SQL, pivot, date range, FlowField and image — plus region field lists and virtual columns, and delete or refresh regions. Table, Pivot, FlowField, Image, SQL, Budget and Financial Report tools take a
companyparameter. Query and Report run in the session's company; Date Range does not read company data. See Reading Another Company. - Sheet tooling: conditional formats, init code, the sheet colour scheme, opening and saving sheets, and applying templates from the gallery.
Changes the agent makes appear on the sheet within moments (the editor synchronizes with the agent about every 1.5 seconds while it works). Agent edits mark the sheet as having unsaved changes, exactly like your own edits — the agent saves only when you ask it to.
The Skill Library
The agent ships with a library of proven dashboard patterns, distilled from production dashboards. Before designing a dashboard it consults the closest pattern — data sources, layout conventions, feeder-region tricks, verification steps.
You can inspect and manage the library on the Spreadsheet Agent Skills page:
| Field / Action | Meaning |
|---|---|
| Code, Title, Description | The description is what the agent sees in its instructions — it decides when the skill applies. |
| Enabled | Only enabled skills are offered to the agent. |
| Bundled | Imported from the app's built-in pattern documents. An app upgrade rewrites these rows with the installed version's patterns and leaves custom skills alone. Import Bundled Skills goes further: it replaces every skill with a matching bundled code, including custom skills that use those codes. Custom skills with other codes are always kept. |
| Edit Content | Opens the skill's full Markdown body for editing. |
The library seeds itself when the agent starts with an empty skill library. Upgrading the app refreshes the rows marked Bundled with the new version's patterns; a custom skill that reuses a bundled code is not touched by an upgrade. Use Import Bundled Skills to reload the patterns without an upgrade, for example after a same-version redeploy. Before importing, copy any customized bundled content you want to retain into a skill with a distinct code, such as a code starting with CUSTOM- that does not match a bundled code. Import matches by code even if the existing skill's Bundled field is off.
The agent can also save new skills — conventions you teach it in a conversation ("we always show amounts in thousands") can be captured and reused in future sessions. Use distinct custom codes for these too.
Working with the Agent — Tips
- Be specific about the data: "top 10 customers by balance with a chart" beats "make a sales report".
- The agent follows a colour-scheme discipline (one base colour per sheet, semantic red/green only) — tell it your brand colour if you have one.
- Ask it to explain what the slicers drive; a good dashboard is interactive.
- The agent will ask before opening another sheet or clearing content, since unsaved work would be lost.
Prompts to try
| You type | What you get |
|---|---|
| "Build a sales dashboard for this year: revenue, margin and margin % as KPI cards, monthly revenue as a column chart, and the top items in a table. Add an item and a period slicer." | A full dashboard with slicers wired into every region, built bottom-up while you watch. |
| "Show open customer invoices grouped into aging buckets: current, 1–30, 31–60, over 60 days." | Feeder regions per bucket plus a summary block — the classic aging report, live. |
| "Make an editable price list for item category FURNITURE — I want to raise unit prices in the sheet." | A table region over Item with Allow Table Editing on, so price edits validate straight into the records. |
| "Add a pivot of purchase amounts by vendor by quarter under the table." | A pivot region with a date-bucketed column field, drill-down included. |
| "Use our brand colour #1E4FA0 for everything." | The sheet's colour scheme is set and every region restyled to match. |
| "From now on, always show amounts in thousands with no decimals." | The agent applies it — and can save the convention as a skill so future sessions remember. |
Related Topics
- Spreadsheets Overview
- Templates
- Regions Overview
- Common Use Cases
- AI Reports — finished reports written by an AI agent, using the same provider setup