FabricFabricHarness
Building Agents

Artifacts

Publish session-bound files for downstream consumers.

An artifact is a session-bound file. Agents publish artifacts as the durable, reviewable output of their work — Markdown reports, JSON results, CSVs, images.

Publish an artifact

await session.artifacts.publish('/workspace/report.md', {
  name: 'report.md',
  contentType: 'text/markdown',
});

You can also pass an in-memory buffer:

await session.artifacts.publish({
  name: 'summary.json',
  contentType: 'application/json',
  data: JSON.stringify({ ok: true }),
});

Read from the CLI

fh artifacts <session-id>
fh artifact get <session-id> report.md --out ./reports/report.md

What gets persisted

The session store records artifact metadata (id, name, content type, byte size, created time) alongside the session entry that produced it. The bytes are stored separately:

  • File store (default): files under .fabricharness/sessions/<id>/artifacts/.
  • SQLite store: BLOB column.
  • Postgres store: BYTEA column or external blob URL.
  • Cloud stores (designed): Azure Blob / ADLS, S3, R2.

Patterns

  • Reports. A triage agent publishes triage-report.md for reviewers.
  • Generated code. A migration agent publishes the proposed diff as an artifact and asks for approval before applying it.
  • Datasets. A data agent publishes profiled CSVs alongside the prompt that produced them.

See also: fh artifacts, fh artifact get.