Storage & Versioning for the Mesh
How the Mesh stores, versions, and distributes its canonical content — and whether Cloudflare Artifacts is the right foundation for that layer.
Source
Digest
Cloudflare Artifacts is a Git-compatible versioned filesystem built agent-first, running on Durable Objects with a custom Git server written in Zig and compiled to WebAssembly (~100KB). It speaks native Git protocol — v1 and v2 — meaning any standard Git client can authenticate via HTTPS and treat it like a regular remote. Shallow clones, incremental fetches, and git-notes for agent metadata are all supported.
Storage is layered: Durable Objects + SQLite for file content (chunked at 2MB per row), R2 for larger objects and history snapshots, KV for auth token tracking. The design target is tens of millions of repositories without performance degradation — idle repos impose no overhead.
Fork/diff/merge semantics are first-class, making Artifacts applicable far beyond traditional source control: per-customer config rollback, agent state management, any scenario needing version history on arbitrary data.
Access Surfaces
Four ways to interact with an Artifacts repository.
env.AGENT_REPOS.create(name) creates a repo. Then treat it like any git remote.Relevance to the Mesh
Artifacts maps onto multiple Mesh requirements simultaneously rather than solving a single problem.
It could serve as the purpose-built canonical layer (P3), eliminating the need for a separate GitHub sync (P4). Its fork semantics are the exact primitive for the protected-page review workflow (P8): fork = draft, diff = review, merge = approval. Incremental fetches and file-level access provide the section addressing needed for token-efficient agents (P10) and surgical edits (P12).
The case for Artifacts over a D1/KV-based design is that it is agent-first by design — not a database adapted for agent use. Version history, branching, and merging are structural, not bolt-ons. And because it speaks native Git, human contributors can use standard tooling (VS Code, CLI, any Git client) without needing a custom interface.
Open Questions
What needs to be resolved before committing to Artifacts as the canonical layer.
Artifacts is in public beta as of May 2026. The architecture decision should not be made without hands-on evaluation of the questions below.
File granularity
Does one file per Mesh section work, or is finer granularity (one file per principle, one file per page component) needed for the section-level addressing requirements? The answer determines repo structure and how agents perform surgical edits.
Multi-user auth model
The Mesh has at least three access scopes: org-wide read, team-level edit, individual draft. How does Artifacts handle per-scope auth? Token-per-repo is straightforward; org-wide policies are less clear from the beta docs.
Beta stability
Public beta as of May 2026. What is the upgrade path and API stability guarantee? The canonical layer is the highest-risk dependency in the stack — it should not be chosen without understanding the production commitment timeline.
Cost at scale
Pricing is $0.15 / 1,000 ops and $0.50 / GB-month (first 10k ops and 1GB free). At Mesh scale (small team, low write frequency), cost is negligible — but the ops model needs to be understood before designing agent workflows that might generate high op counts.