The schema builder is a three-column page at /structs/<slug>/.
Create a schema
- Open Schemas in the sidebar.
- Click New schema (or the equivalent create control on Output Schemas).
- Give it a name. A slug is generated for URLs and the API.
- Upload a sample document — a typical file this schema should handle.
- Add fields yourself, or describe the document in the chat and let the agent propose them.
Field ids must match the mode rules. Document mode uses snake_case (invoice_number). Form mode allows hyphens and mixed case, but not reserved type words.
Adding fields from the sample
Select text on the sample to create an annotation. The builder can infer a location hint (page, nearby labels, typical format) from that highlight. You can also add a field by hand and type the description.
Table fields need at least one column. A table with no columns cannot be published.
Auto-improve
Auto-improve runs the agent against the sample and proposes field additions, removals, and hint edits. You accept, reject, or edit each proposal. Nothing is published until you click Publish.
Keep field descriptions short and concrete — what the value looks like, not how the engine should behave. Form-mode descriptions in particular should be label-anchored (one or two sentences).
Test before you publish
- Full Test runs the draft schema against the sample (and, if you have added them, the schema’s test-set documents).
- Batch Full Test runs the draft against the whole test set as a hidden batch. It does not overwrite your real documents.
Results stay on the builder. Publish only when the fields look right. See Publish, versions, and the test set.