AI assistance

What the built-in AI assistant can do, how it works, what it sees, and how to configure providers and privacy.

DreamSheets has a built-in AI assistant that can build and edit your document — create tables and charts, fill in data, write formulas and SQL — using the same operations you'd perform by hand. That design has one crucial consequence: everything the AI does is a normal undoable edit. Ctrl+Z reverts an AI change exactly like one of yours, and you watch changes land on the canvas as they happen.

The assistant panel

Open it with AI → AI Assistant… (Ctrl+Shift+A), the ✨ AI toolbar button, or contextually — Ask AI… on a cell, Ask AI about this column…, Ask AI about this table… (the context rides along with your question). The assistant is a docked chat panel; the conversation survives clicking away, and is deliberately session-only — nothing is stored on disk.

Ask for anything from analysis to construction:

  • "Build a project tracker: tasks, owners, status, a chart of tasks per owner."
  • "Add a margin column to Orders" — it writes the calc column formula.
  • "Why is March revenue down?" — it reads the structure and reasons about the data.

The assistant works by calling actions — the same vocabulary available to external AI tools: set cells and ranges, append rows, add tables/columns/calc columns, create whole documents, add tiles, charts, summary rows, tabs, formats, descriptions, custom functions, and query tables. A run is bounded (at most 8 tool rounds / 100 actions), and each batch is applied atomically.

What the AI sees

A request includes the document's structure — tabs, tables, column names and types, row counts, tiles, charts, custom functions — plus, for the tables in context, sample rows (with row ids) and column facts: the full list of values of a text column with a dozen or fewer distinct values (a region or status column), the distinct count otherwise, and the range of a numeric column. That is what lets the assistant build "one row per region" from a 200-row table without seeing every row. It also sees what you currently have selected. It never sees file paths, API keys, or anything outside the open document.

Which tables are "in context" is yours to control, and the panel shows it:

  • The focus — the table, column or cell you opened Ask AI from (or the whole document from the ✨ button). Its × switches the focus off: the AI still sees the document's structure, but only the tables you pin (or name in your request) carry rows, and nothing is filled in from the budget. Click the struck-through chip to switch it back on.
  • Pins — while the panel is open, Ctrl+click a table header, a column header, a cell or a tile to add it as a chip; or pick from the + add context menu. Remove a chip with its ×. Pinned tables travel with their sample rows, which is what lets the AI edit specific values ("change every North to Northeast") from a document-scoped conversation.
  • Tables your request names are added automatically ("in Sales, …").
  • Whatever the model's window still has room for is filled in with the smallest remaining tables.

The budget meter under the chips shows how much of the model's context the document takes. A pin that would push the context past the budget — where the AI would see only table names — is refused with an explanation rather than silently starving the model. If a run ever does hit the limit, the reply says so.

Privacy switch: AI Settings has "Don't send cell data to AI (structure only)". With it on, no cell values ever leave the app — pins, named tables and the budget fill all stop carrying rows, and the set of tools the model is given changes with it: no tool that returns a value is offered at all, and the model is told in so many words that none exists, so it builds structure and writes formulas rather than trying to read data another way. With the switch off, the model sees sample rows for the tables in context and, only if you also enable Allow data queries, a read-only query tool. The same switch also gates data access for connected MCP clients. Find-and-replace edits (replace_values) work in either mode: the app does the matching, and only a count comes back.

It checks its own work. Before a run ends, the app evaluates every formula the assistant created or changed. If one doesn't compute (an unknown name, a reference to a column that isn't there), the assistant is shown what failed and gets one round to fix it before the run is accepted, so a run never leaves a broken formula on your canvas.

Questions vs. changes. Asked a question, the assistant answers in text and makes no edits. If it can't see the rows it needs and data queries are off, it says which table to add to the context instead of guessing.

Providers and configuration

DreamSheets talks to any OpenAI-compatible endpoint. That one shape covers:

ProviderBase URL
Anthropichttps://api.anthropic.com/v1
OpenAIhttps://api.openai.com/v1
OpenRouterhttps://openrouter.ai/api/v1
LM Studio (local)http://localhost:1234/v1
Ollama (local)http://localhost:11434/v1

Set up under AI → AI Settings…: add a provider (name, base URL, API key, model), click Connect — list models to pick from the provider's model list (or type a model name for servers that don't publish one). You can configure several providers and switch the active model from a dropdown right in the assistant panel header. Local servers usually need no key — and with LM Studio or Ollama, AI assistance runs fully offline.

API keys are stored in the operating system's credential store (Windows Credential Manager, macOS Keychain); the rest of the settings live in a local config file. Nothing AI-related is ever stored in your documents. All AI network calls are made by the app's native backend — the document window itself has no network access at all. A debug view (Last request…) shows the exact request and response of the most recent call, so you can verify precisely what was sent.

Translate Imported Formulas

The Translate with AI button on the Excel import report is a specialized pass for imported workbooks. For each column the deterministic importer had to keep static, the AI proposes a live DreamSheets formula (building helper query tables if the logic needs reshaping). Every proposal is verified before it's committed: the formula must recompute the column's imported values row-for-row. A verified column becomes one undo step; a failed one changes nothing and leaves no debris. The AI describes every helper it creates, so the translated workbook documents itself.

This tool never sends your cell data — it works from structure and the original Excel formula text, and verification happens locally.

AI in other editors

  • Query tables: the SQL editor's AI generator turns a plain-language description into a DuckDB query (details).
  • Scripts: Suggest with AI drafts a Python or R script from a description, in whichever language the editor is open on (details).

Hiding AI entirely

Don't want AI in your spreadsheet app? AI → Hide All AI Features removes every AI entry point from the interface — the AI menu, the ✨ toolbar button, the Ask-AI context items, the AI blocks in the query and script editors, and the import report's Translate with AI. View → Show AI Features brings them back. The choice is per machine.

No API key? Use the clipboard loop

AI → Copy Prompt for AI copies a complete prompt — the document-format guide plus your current document — to paste into any chat (Claude, ChatGPT, anything). Copy the JSON it answers with, then AI → Import AI Output… applies it as one undoable step. Slower than the integrated assistant, but it works with a plain chat subscription and no configuration. See Connecting AI tools for the full walkthrough.