PATTERN Cited by 4 sources
Agent-first storage primitive¶
What this pattern names¶
Build a storage / retrieval service whose API shape, economics, and protocol choices are optimised for the shape of agent workloads first, with human developers as a secondary audience. Four recurring properties across 2026-04 Cloudflare launches:
- Per-agent / per-session / per-customer isolation as the default. One instance per caller-defined scope, not a shared multi-tenant instance that applications partition themselves. Matches one-to-one-agent deployment shape — every agent is one-per-(user, task, conversation); its storage should follow.
- Zero idle cost — concepts/scale-to-zero economics. Agents are "massively single-tenant" — of ten million provisioned instances, 1 % might be active at any moment; the other 99 % must not be a cost drag.
- Protocol / API choice biased toward training-data familiarity. If a protocol is "deep in the training data of most models", agents interact with it through ambient knowledge rather than via custom skills / CLIs / MCP servers. Git for Artifacts is the canonical example; REST + JSON everywhere else.
- Agent-ergonomic APIs beside the protocol. Native bindings + REST + SDKs sit alongside so non-agent callers (Workers, Lambda) have a less-ceremonial path.
This pattern is the pattern-form of the conceptual posture captured at concepts/agent-first-storage-primitive; the concept page describes what the posture is, this page describes how to build a storage service that realises it.
Canonical wiki instances¶
Four 2026-04 Cloudflare launches all self-describe as agent-first realisations of this pattern at different tiers:
| Tier | System | Source |
|---|---|---|
| Compute + state | Durable Objects + Project Think | sources/2026-04-15-cloudflare-project-think-building-the-next-generation-of-ai-agents |
| Versioned filesystem | Artifacts (Git-over-DO) | sources/2026-04-16-cloudflare-artifacts-versioned-storage-that-speaks-git |
| Retrieval / search | AI Search (per-tenant namespace) | sources/2026-04-16-cloudflare-ai-search-the-search-primitive-for-your-agents |
| Memory | Agent Memory (per-profile DO + Vectorize) | sources/2026-04-17-cloudflare-agents-that-remember-introducing-agent-memory |
Artifacts — the load-bearing-post for this pattern¶
"We think there's a need for a new primitive: a distributed, versioned filesystem that's built for agents first and foremost, and that can serve the types of applications that are being built today."
Every Artifacts design choice reads as a concrete answer to "what does agent-first mean here?":
- Per-repo Durable Object → isolation + single-writer ordering per agent-defined scope.
- Pricing keyed to storage + operations with no hot/cold tier → zero idle cost.
- Git as the wire protocol → training-data familiarity (patterns/git-protocol-as-api).
- REST + Workers binding + SDKs → non-Git-client callers.
Agent Memory — the memory-tier instance¶
Agent Memory realises the pattern for a new substrate class (memories derived from sessions, not files):
- Per-profile Durable Object
for raw messages + classified memories.
getByName()addressing means "any request, from anywhere, can reach the right memory profile by name". - Per-profile Vectorize index for memory vectors.
- Zero-idle-cost economics from DO + Vectorize per-profile pricing — Cloudflare explicitly positions this as "each primitive is purpose-built for its workload, we don't need to force everything into a single shape or database."
- Narrow agent-ergonomic API —
getProfile / ingest / remember / recall / forget / list— see patterns/constrained-memory-api for the API-shape half of the pattern.
AI Search — the retrieval-tier instance¶
AI Search makes the same move for hybrid retrieval: "create and delete instances at runtime… one per agent, per customer, or per language without redeployment." See patterns/runtime-provisioned-per-tenant-search-index for the specific shape at the retrieval tier.
Distinguishing from "works for agents"¶
Many storage systems serve agent workloads fine without being agent-first:
- S3 + DynamoDB + Postgres work for agent state, but their pricing, API shapes, and isolation stories were designed around multi-user applications.
- A typical hosted vector DB is usable as memory, but hot-tier pricing + per-cluster minimums break the million-cold-agents model.
An agent-first primitive reverses the bias: one-to-one, bursty- then-dormant, training-data-familiar-protocol is the default; multi-user access is expressible but not optimised.
Trade-offs¶
| Dimension | Impact |
|---|---|
| Platform lock-in | The more agent-specific conveniences (fork / import / runtime-provisioned namespaces / narrow memory APIs), the more load-bearing the platform becomes. |
| Price-point stability | Pricing models keyed to ops + storage are new; beta prices are hedged. |
| Composition vs overlap | Artifacts + AI Search + DO + R2 + KV + Agent Memory overlap in what they can store; boundaries are clearer in marketing than in use. |
| Discovery cost | Agents must learn when to use which primitive (memory vs search vs filesystem vs KV vs vector). |
Seen in¶
- sources/2026-04-16-cloudflare-artifacts-versioned-storage-that-speaks-git — storage-tier canonical wiki instance; explicit "storage primitive built for agents first" design rationale.
- sources/2026-04-16-cloudflare-ai-search-the-search-primitive-for-your-agents — retrieval-tier canonical wiki instance; runtime-provisioned per-agent namespace.
- sources/2026-04-15-cloudflare-project-think-building-the-next-generation-of-ai-agents — compute+state canonical wiki instance; DO as the actor-per-agent substrate, 10k-agents × 1%-active table as the economics argument.
- sources/2026-04-17-cloudflare-agents-that-remember-introducing-agent-memory — memory-tier canonical wiki instance; per-profile DO + per-profile Vectorize + narrow API realises the pattern at the memory substrate.
Related¶
- concepts/agent-first-storage-primitive — the concept form of the same posture.
- concepts/one-to-one-agent-instance — the agent shape the storage primitive is optimised for.
- concepts/scale-to-zero — economics leg of the posture.
- concepts/agent-memory — memory-tier application concept.
- concepts/per-tenant-search-instance — retrieval-tier application concept.
- concepts/repo-per-agent-session — storage-tier application concept.
- patterns/git-protocol-as-api — protocol-choice leg of the posture.
- patterns/constrained-memory-api — the API-shape leg of the posture at the memory tier.
- patterns/runtime-provisioned-per-tenant-search-index — the instance-provisioning leg of the posture at the retrieval tier.
- systems/cloudflare-artifacts / systems/cloudflare-ai-search / systems/cloudflare-durable-objects / systems/cloudflare-agent-memory — named canonical instances.