Skip to main content

Artifacts

When the model produces a file — code, an image, a CSV, a Mermaid diagram — Kenaz captures it as an artifact: a first-class object you can preview, download, and reference from later turns.

What becomes an artifact

Artifacts are captured from three sources:

  • Code blocks — fenced code blocks with a filename hint in assistant text are automatically captured (source = code_block).
  • Tool outputs — file-shaped tool results (image, resource, or content-array shapes from MCP tools) are captured as tool_output artifacts.
  • User pins — you can pin any content explicitly (source = user_pin).

The model also has a kenaz__save_artifact built-in tool. It calls it when asked to save, export, or produce a named deliverable — this is the primary way to save structured output (JSON, CSV, YAML, Markdown, code files, images from image-generation tools, etc.).

The model can call kenaz__update_artifact to revise a saved artifact; Kenaz versions them automatically.

Where they live

Artifact bytes are stored in a content-addressed store (keyed by SHA-256) at:

~/.kenaz/harness/<env>/media/<sha256>

Metadata (title, MIME type, session/project association, source, version history) lives in the harness SQLite database. The Artifacts view in the Kenaz UI reads from this database. Versions are tracked in metadata — the same content hash is reused when the bytes haven't changed.

Operations

  • Preview — click an artifact to render. Code is syntax-highlighted, images preview inline; other types render based on MIME type.
  • Download — save to your filesystem.
  • Promote scope — promote an artifact from session scope to project scope so it's visible across sessions in a project.
  • Delete — removes the artifact row. The content bytes are garbage-collected when no other artifact or attachment references the same hash.

Filtering

The Artifacts view supports filter pills for scope (all / session / project), source (all / code_block / tool_output / user_pin), and MIME type prefix (text/, image/, application/, etc.).

Audit

Artifact writes are recorded in the event log. The audit entry carries the session ID, artifact ID, title, content hash, and source — not the full content bytes. The content hash ties the audit record to the on-disk CAS file so you can verify integrity later.