Cells
Every workflow becomes a scene: its data, its tools, the agent that runs it, and the history of everything it did. Everything in a scene is a cell: a value, and a view that shows it. A total the agent worked out is a cell, and so are a table of orders, a note, a GitHub repository, a mailbox search and a dashboard drawn over all of them. Each has a name, a handle other cells read it by, a value and a view.
This page goes through the kinds of value a cell holds, how a view draws one, and what it means for one cell to live in several scenes.
A value is a literal or a formula
A cell holds one or the other, the way a spreadsheet cell holds 5 or =SUM(A1:A3). daslab_write_script writes both: value for data you already have, which the cell shows until something writes again, and fn for a formula.
A formula is a short program in the same ops scripts use: call a tool, reshape the result, branch. The last op's value becomes the cell's value. This one keeps a week's forecast:
daslab_write_script({
cell_id: "<the forecast cell>",
ttl_seconds: 3600,
fn: [
{ "id": "fetch", "op": "http_request",
"params": { "url": "https://api.open-meteo.com/v1/forecast?latitude=9.51&longitude=100.01&daily=temperature_2m_max&timezone=Asia/Bangkok" } },
{ "op": "core.transform",
"params": { "over": "$fetch.json", "jq": "{ days: .daily.time, max: .daily.temperature_2m_max }" } }
]
})The formula runs when it is written, and the call returns the value it computed. After that it runs again when someone reads the scene and the value is older than ttl_seconds, which is 900 seconds unless you set it. Every run is a real call to the source, so data that moves slowly gets a longer TTL.
A formula reads other cells in the scene by handle: $cells.invoices, or $cells.invoices.rows for part of one. Nobody declares the dependencies. They are read from the formula itself, so when a cell changes, the cells that read it recompute. A cell in another scene is read by its address, named under refs:
refs: { "bookings": "acme/front-desk:bookings" }The body then reads $cells.bookings and follows that cell as it changes. Add ?at= with a tag, a commit or a time ago (-24h) to read one version and stop following. The address resolves as the formula's author, so someone who sees the result does not see the other scene.
A formula that fails keeps the cell's last good value. daslab_read_cell shows what a cell holds, when it was computed, and the error from the last run that failed.
Records people type go in a table
Each record is a row with typed columns, so two people editing different rows at the same time never overwrite each other's work, which a list kept inside one value cannot promise. The agent adds and changes rows with daslab_table_insert, daslab_table_update and daslab_table_upsert.
A scene's tables are its database. daslab_table_query runs read-only SQL across all of them, and a table in another scene joins in by its address:
SELECT i.customer, sum(i.amount) AS overdue, count(b.row_id) AS visits
FROM invoices i
LEFT JOIN "acme/front-desk:bookings" b ON b.customer = i.customer
WHERE i.paid_at IS NULL AND i.due < current_date - INTERVAL 30 DAY
GROUP BY 1daslab_table_export writes a table, or the result of a query, as an Excel or CSV file.
A view draws the value
The agent writes a view as HTML with daslab_write_view, and the page reads its cell's value from window.__DASLAB_WIDGET_DATA__:
<h2>Next seven days</h2>
<ol id="days"></ol>
<script>
const { days, max } = window.__DASLAB_WIDGET_DATA__;
document.getElementById("days").innerHTML =
days.map((d, i) => `<li>${d}: ${max[i]} °C</li>`).join("");
</script>The work happens in the formula, and the view only draws. Something that changes, a forecast or a price or a status, is a view whose value is a formula that fetches it. Numbers typed into the HTML stay as they were on the day they were typed.
Keeping the two apart also keeps automation small. A job that changes what a cell says writes its value, a few numbers anyone can read in an approval, and leaves the markup alone. When the design is wrong, the agent fixes the view once and every later value is drawn the new way.
A view can also call tools as the person looking at it, through callTool in the widget SDK, so it can read that person's mailbox or write back with no job behind it. Views come in the house style; Design shows what that looks like and how a workspace sets its brand.
Maps, charts and figures come from shared blocks
When a view needs a map, a chart or a single figure, the agent places Daslab's own and names the cell it reads:
<h1>Herzogstand from Walchensee</h1>
<p><dl-value cell="Route" path="features.0.properties.distance_m" scale="0.001" digits="1" unit="km"></dl-value></p>
<dl-map cell="Route" terrain></dl-map>
<dl-chart cell="Climb" field="rows"></dl-chart><dl-map> draws a cell that holds GeoJSON, with trails and relief, in 3D when asked. <dl-chart> draws a cell's rows through a Vega-Lite spec the agent writes. <dl-value> prints one number from a cell, formatted, and <dl-spark> draws its history in one line under it. Each takes its styling in its own standard's terms, MapLibre paint for the map and Vega-Lite config for the chart, and everything around them is the view's own HTML.
The blocks are Daslab's code, so when the map or the chart gets better, every view that uses them shows it the next time it opens. A figure reads its cell when the view opens, so a new route shows its new distance. Agents are told to use the blocks for maps, charts and figures and to write by hand whatever they don't cover. On a public share link there is no signed-in viewer, so a block shows only its own cell's value (cell="self").
A connected cell stays live by itself
Give daslab_add_cell a type written provider/type instead of a native one, and the cell reads its source instead of waiting for something to write it:
daslab_add_cell({ type: "github/repository", name: "API", ref: "acme/api" })
daslab_add_cell({ type: "gmail/search", name: "Invoices in", config: { query: "subject:invoice newer_than:30d" } })daslab_list_asset_types lists what a scene can connect, and daslab_browse_assets finds the thing itself. The ref it returns goes straight into daslab_add_cell.
The type decides what the cell can do: its fields, the tools that act on it, and the views it offers. A github/repository offers four, pull_requests, actions, commits and issues, each a different slice of the one repository with nothing extra to sync. Some views exist only once the source is read: a spreadsheet's tabs are views of the spreadsheet. A connected cell draws itself in one of eighteen native shapes, among them list, table, record, kanban, chart, metric, map, calendar and document.
The agent reads through a connected cell whenever it needs to. A tool that writes to the source stops at an approval first.
Accounts are cells the tools use
A Gmail account, a GitHub account and an S/4HANA connection live at the top of the workspace, in its root scene (the world), so you connect one once and any scene in the workspace can add it and use it. Tools find their credentials by walking up: a pull request belongs to a repository, the repository to a GitHub account, and a tool on the pull request signs in as that account.
Everything else lives in the scene it was made in: a note, a table, a mailbox search. When a scene drops an account, the account stays in the workspace; disconnecting one is something a person does in the app.
Size decides what a tile shows and fetches
A cell sits on the scene's grid at one of six sizes:
| Size | Columns × rows | What it shows |
|---|---|---|
icon | 1 × 1 | name and icon, nothing fetched |
row | 4 × 1 | a one-line summary |
small | 2 × 2 | one figure, or a few items |
medium | 4 × 2 | the top items |
large | 4 × 4 | the full view |
xlarge | 8 × 4 | the full view and a second panel, on iPad and desktop |
A connected cell at icon is in the scene and fetches nothing, so thirty repositories as icons cost no API calls, and making one bigger asks for it to be kept fresh. Accounts are the exception: their tile shows whether the connection is healthy.
The agent reads a tile the way a person sees it. What it reads of the scene holds only what fits at each cell's size, with a note saying how much more there is:
| Shape | row | small | medium | large | xlarge |
|---|---|---|---|---|---|
list items | 2 | 4 | 8 | 15 | 30 |
table rows | name | 3 | 6 | 12 | 25 |
kanban items per column | name | name | 3 | 6 | 12 |
record highlights | 2 | 2 | 3 | 5 | 8 |
record items | name | name | 3 | 8 | 15 |
document characters | 280 | 512 | 2,048 | 8,192 | 32,768 |
gallery images | name | name | 4 | 9 | 24 |
map pins | name | name | 5 | 15 | 50 |
"name" means the agent sees the cell's name and nothing else, which is also all it sees of any cell at icon. A metric, a status, a chart or a key-value card is read whole at every other size.
One cell can live in several scenes
Give daslab_add_cell the id of a cell in another scene of the workspace as its ref, and that very cell is linked in. Nothing is copied: a change made in one scene shows in all of them, and each scene places the cell at its own size and position.
Removing the cell from a scene takes it out of that scene only. The cell itself is deleted when no scene has it any more.
Layers give one scene several audiences
A new cell lands in Team, where the whole team sees it. A cell in your Private layer is yours alone, and one moved into Public is on the scene's share link. A single cell can also have a link of its own, off until someone turns it on. Layers covers who sees what.
Every change is a version
daslab_history lists a cell's versions, each with who made it and why, daslab_read_cell with at reads the cell as it was (a commit, HEAD~2, -24h), and daslab_tag names the scene's current state, so a tag like submission-v1 reads back exactly as it was sent. Restoring writes the old value again as a new version. The commit chain is the history underneath.
What's next
- Scripts: the ops a formula is written in.
- Design: how views look.
- Scenes: where cells live, and the workspace above them.
- Layers: who sees which cells.
Updated 2026-11-14