Artifacts & Spreadsheets
Artifacts are versioned outputs created by the assistant during chat (HTML, code, text, and spreadsheets).
Version Continuity
When a create tool is called with a file name that already exists in the same chat, BoxedAI now continues that artifact as a new version (v2, v3, ...), instead of creating a duplicate artifact row.
This applies consistently across:
- generic artifacts (
create_artifact) - visualizations (
create_visualization) - spreadsheets (
create_spreadsheet)
Why the Artifact Abstractions Exist
BoxedAI now uses two core abstraction layers for artifacts:
Kind Registry
- Classifies artifacts by kind (
text,html,visualization,spreadsheet) - Handles kind resolution from file name, MIME type, and visual metadata
- Classifies artifacts by kind (
Content Adapter Registry
- Applies per-kind content normalization for storage
- Applies per-kind decoding/summarization when content is read back
These layers allow adding new artifact formats without rewriting core create/edit/read flows.
Spreadsheet Generation (.xlsx)
The model does not produce raw XLSX bytes.
Instead, it calls a spreadsheet capability with structured sheet data:
- workbook name
- sheets
- rows/cells
- optional style/layout rules (styles, merges, column widths, row heights, freeze panes)
The backend then:
- Builds a real XLSX workbook programmatically
- Serializes it to base64
- Stores a structured spreadsheet envelope as artifact content
This avoids brittle “raw binary in prompt” behavior and keeps spreadsheet generation deterministic.
Spreadsheet Envelope
Spreadsheet artifact content uses:
format:boxedai.spreadsheet.v1name: workbook filenamesheets: normalized sheet dataxlsx_base64: generated workbook payload
The UI can preview table data and download the generated .xlsx file directly.
Complex Spreadsheet Styling
create_spreadsheet supports advanced formatting through structured metadata per sheet:
styles: apply style objects to A1 ranges (font, fill, border, alignment, number format, etc.)merges: merge ranges likeA1:C1column_widths: set width for one column or a spanrow_heights: set explicit row heightsfreeze_pane: configure frozen/split panes and selection
This keeps styling deterministic and editable while still avoiding raw binary generation in prompts.
Encryption Behavior
If organization encryption is enabled, artifact content (including spreadsheet envelope) is encrypted using the same artifact encryption flow as other artifacts.
Extending Artifact Types
To add another binary-friendly artifact type in the future:
- Add a new kind to the kind registry
- Add a content adapter
- Add a command/tool that produces a structured envelope and generated payload
- Add frontend preview/export behavior