Skip to slide
Chapter 9 · Data Modeling for Agents
80 / 191

CHAPTER 09 · Data Modeling for Agents · 3 / 11

Artifacts as versioned, immutable records

Agents that produce or modify artifacts, documents, datasets, code, need versioning, and the right model is immutable versions with a pointer to the current one:

  • An artifact identity record (stable id, name, owner, status) that doesn't hold the content location directly.
  • A versions table: one row per version, each pointing at its stored content, with a version_number, a source (how this version came to be), and timestamps. Versions are never mutated; new states create new rows.
  • The identity record holds a current_version_id pointer to whichever version is live.

This gives you a complete, trustworthy history: you can see how an artifact evolved, diff versions, and roll back. The source field (e.g. upload, generated, agent_edit, user_accept, user_reject) doubles as an audit trail of who or what produced each version.

Separating content location from identity (paths live on versions, not on the artifact) is the key move that makes clean versioning possible: the artifact just knows its current version; the version knows where its bytes are.

← → arrow keys work too