Technique / one artifact, two audiences

A page you can see.
Data an agent can read.

Some things want to be a picture on a screen and a fact sheet for an agent at the same time. The app.html pattern packs both into one file: a single self-contained HTML page that renders in Chrome and carries its own data — optionally a real SQLite database — as plain text underneath.

Preferred for hand-off artifactsRecorded 2026-11-07
The idea

One file, no server, two readers.

An app.html is an ordinary HTML file with two lives. To a human it is a page — a table, a dashboard, a screenshot — opened straight in Chrome with a file:// path. To an agent it is text: the data is embedded in a <script type="application/json"> block, or a whole SQLite database encoded as base64 and mounted in-page with sql.js, so it can be parsed, diffed and queried without any backend.

Nothing to host, nothing to keep in sync. Copy the file anywhere and both readers still work.

Why it earns its place

A visual on Chrome

A real page a person can look at — same language as the rest of the projects.

Valuable information for agents

The same file is a document an agent reads from disk: grep, parse, or run SQL over it.

Portable and durable

One artifact survives email, git, a USB stick and a decade of tooling changes.

The options, honestly

One file is the point; a live API is the other extreme. Pick by whether data changes and who writes it.

OptionFilesImageAgent readAgent writeQuery APIHuman viewOffline
B. app.html — single file + base64 SQLite (sql.js)1yesparse + decoderewrite whole filein-page SQLyesyes
A. SQLite file + HTML viewer2BLOB / linkfastfastSQL onlyyesyes
C. Zipped bundle, EPUB-style1yesfastrezipnoneyesyes
D. HTML + live backend over a DB3+servedfastfastHTTP / RESTyesserver
E. SQLite + MCP server2BLOBfastfastMCP toolsagent-firstyes

Choose B for one portable artifact with the data baked in. Choose A or E when agents must read and write often. Choose D when it must be live and multi-user. There is no official format name for B — it is just a self-contained HTML file, conventionally app.html or index.html.

What is inside an app.html

1 · the picture

Rendered HTML

The markup and CSS a person sees in Chrome — table, chart, screenshot, dashboard.

2 · the data

A JSON block

<script type="application/json" id="data">…</script> — plain text an agent greps and parses directly.

3 · the database

Optional base64 SQLite

A .sqlite file encoded to a string, decoded in-page and queried with sql.js — a real schema, real SQL.

This page is itself an example: the same options above are embedded as JSON at the bottom of the file, so an agent reading app-bundle.html gets the data, not just the prose.

Building and using one

# 1. Build the database (indexes and FTS5 live inside the file — build them before embedding)
sqlite3 data.sqlite "CREATE TABLE item(name TEXT, note TEXT);
                      CREATE INDEX idx_item_name ON item(name);
                      INSERT INTO item VALUES ('windows-pil','read-only dashboards');
                      CREATE VIRTUAL TABLE search USING fts5(name, note);"

# 2. Inline it into the page as base64
python3 - <<'PY'
import base64, pathlib
b64 = base64.b64encode(pathlib.Path('data.sqlite').read_bytes()).decode()
pathlib.Path('app.html').write_text(
    pathlib.Path('app.template.html').read_text().replace('__SQLITE_B64__', b64))
PY

# 3. Look at it, and read it
open app.html                       # human: Chrome renders it
grep -o '<script id="data"[^<]*' app.html   # agent: pull the JSON block