The .AGL project file
An Aglaïa project is a single file: <slug>.agl. It is an ordinary
SQLite database — no sidecar files, no proprietary format. Everything a
project knows lives in it: the raw scans, every pipeline step, the branch
choices, the OCR text, the corrections you made by hand on a page, the raw
answer of a paid cloud OCR, and the calibration + pipeline snapshots used to
produce them.
What it contains
| Table | Holds |
|---|---|
project | name, slug, schema version, notes (one row) |
pipeline_versions | frozen pipeline-YAML snapshots; the active row is current |
calibrations | frozen camera-calibration snapshots; the active row is current |
images | encoded JPG/PNG blobs (width/height/dpi/type), de-duplicated by sha256 |
thumbs | per-image thumbnails for the gallery |
scans | one row per imported page / captured frame (soft-deleted via deleted_at) |
nodes | one row per pipeline-step output; a self-referencing tree per scan |
branches | per-branch chosen output (e.g. the A / B halves of a spread) |
ocr_runs | OCR results attached to a node |
debug_artifacts | optional debug overlays attached to a node |
step_overrides | per page layout: skip this pipeline step for this page |
manual_overrides | per page layout: the value you set by hand where the pipeline estimated one (rotation, crop, page corners, dewarp) |
mistral_batch_jobs | submitted cloud batch jobs and the pages each covers |
mistral_batch_outputs | each job’s answer, byte for byte, so the text can be rebuilt without paying for the OCR again |
Because images are content-hashed in images, the same pixels are stored
once however many nodes point at them, and re-importing a file does not
duplicate it.
The slimmed version
A full project keeps every intermediate step (so you can branch, step back, and replay) — which makes it large. A slim copy keeps only what a delivery needs:
- every active scan’s raw root image, and
- every branch’s chosen output (the image an export would use) and its OCR.
All other images, thumbnails, intermediate nodes, debug artifacts, and
orphaned OCR runs are dropped, then the file is VACUUMed so its on-disk
size reflects the reduced content. The stored raw answers of a cloud OCR are
kept: they are what lets the text be rebuilt without paying again. The stored raw answers of a cloud OCR are
kept: they are what lets the text be rebuilt without paying again.
Two ways to produce one (GUI Export tab / project menu):
- Export slimmed project — writes a separate slim copy, leaving the working file intact;
- Slim-down current project — rewrites the live file in place (after the project window closes), then reopens it.
A slim project opens normally; it simply has no intermediate stages to step back to.
How to inspect it
It is plain SQLite, so any SQLite tool works — no Aglaïa needed:
sqlite3 my-book.agl '.tables'sqlite3 my-book.agl 'SELECT id, idx, deleted_at FROM scans;'sqlite3 my-book.agl 'SELECT id, step_idx, step_name FROM nodes ORDER BY id;'
# pull one stored image out to a filesqlite3 my-book.agl \ "SELECT writefile('page.jpg', data) FROM images WHERE id = 1;"For a GUI, DB Browser for SQLite opens it
directly. The images.data column is the raw JPG/PNG bytes.
Related resources
- How Aglaïa works — the file ties all four stages together
- Storage layer — the full schema reference
- Export — including slim-project export