# What an automation is, and why it runs in your browser

> An AI-written report that re-runs on your tables every time you run it. The design, the trade-offs, and what it cannot do yet.

Canonical: https://memtomo.com/en/blog/what-an-automation-is/

“Make me a weekly spend report by category” is a request for a program. Not a big one — a query, a group-by, a chart — but a program that should run again next week without anyone rewriting it. That is what an automation is.

## The shape

An automation is a short program made of steps. Each step can query your tables, do the maths and display a headline number, a paragraph, a table or a chart. The assistant writes it from your description, after checking the real table and column names, and validates it — that it parses, that it is well-formed, that every name it uses is defined — before it is allowed to save. A broken automation never lands.

## Why the browser

The obvious design is a server that runs automations. We did not build that, for three reasons.

**Isolation.** Code that runs on your data should run where you are. The automation executes in a sandbox inside your tab. It reads tables through your own signed-in session, with your permissions, and nothing else. There is no shared executor to escape from.

**Cost.** Running every user's every report on our servers would be the single largest line in the bill, and you would pay for it. Your laptop is already on.

**Latency.** A report over a few thousand rows runs in well under a second locally. There is no queue.

## What it costs you

The first run starts the sandbox — a few seconds and some megabytes, cached afterwards. Very large tables are aggregated by the query engine before they reach the browser; the automation sees the result, not the raw rows. And an automation cannot run while your browser is closed, which is why scheduled reports — “send me this every Monday” — are the next thing we are building: the same automation executed in the same kind of sandbox on a server, with a per-run token that can only read one project.

## Embedding

An automation is referenced by a wiki link, `[[automation:…]]`, so it can live inside a note. Open the note and you see the last run; open the automation and it runs again. Re-running on open is next. That is the whole dashboard feature: notes with live pieces in them.
