SYSTEM Cited by 6 sources
Cloudflare R2¶
R2 is Cloudflare's object-storage tier on the Developer Platform — S3-compatible, with zero egress fees, a generous free tier, and first-class integration with Workers and Sandbox SDK.
Filesystem-mount integration¶
From Sandbox SDK, sandbox.mountBucket()
presents an R2 bucket as a filesystem partition inside a Cloudflare
Container. This is the platform's standard answer to the problem that
Containers are
ephemeral by design
(concepts/container-ephemerality) — application code sees a local
directory that survives container replacement, with zero application
changes (patterns/mountable-persistent-storage).
Seen in¶
- sources/2026-01-29-cloudflare-moltworker-self-hosted-ai-agent — canonical wiki instance. Moltworker mounts an R2 bucket into the Moltbot Sandbox container to host session memory files, conversations, and other agent state that needs to outlive the container lifecycle.
- sources/2026-04-15-cloudflare-project-think-building-the-next-generation-of-ai-agents
— R2 pairs with DO
SQLite as the Tier 0 substrate of Project Think's
execution ladder — the "durable
virtual filesystem" an agent sees as its workspace: read, write,
edit, search, grep, diff. Powered by
@cloudflare/shell. Tier 0 is the "useful at the bottom" rung — the agent is useful with just the workspace, and every higher tier shares its state with Tier 0. - sources/2026-04-16-cloudflare-ai-search-the-search-primitive-for-your-agents
— R2 as managed storage substrate inside every
AI Search instance. "Each
instance gets its own built-in storage and vector index — powered
by R2 and Vectorize." An R2
bucket can also be attached as an external data source on an
AI Search instance (sync-on-schedule), which is how the
canonical support-agent example backs the shared
product-knowledgeinstance with a customer's product-docs bucket. Same primitive used two ways: bundled-and-invisible (built-in storage) + customer-facing-and-crawled (external source). - sources/2026-04-16-cloudflare-artifacts-versioned-storage-that-speaks-git — R2 as the pack-file snapshot store behind every Artifacts repo. Each repo's hot Git objects live in its Durable Object's embedded SQLite (chunked across rows — 2 MB row limit); R2 holds durable pack-file snapshots for longer-tail blob storage and efficient multi-GB retrieval. Third substrate role on R2 (Tier 0 workspace for Project Think → managed-storage for AI Search instances → pack-file snapshots for Artifacts repos). Part of patterns/do-backed-git-server.
- sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents — R2 as the attachment store for Agentic Inbox. The open-source reference app stitches Email Routing + Email Sending + Workers AI classification + R2 attachments + Agents SDK. Fourth substrate role on R2 (Tier 0 workspace → AI Search managed-storage → Artifacts pack-files → email attachments).
Related¶
- systems/cloudflare-sandbox-sdk — the interface that mounts R2 into containers.
- systems/cloudflare-containers — the ephemeral-by-design compute tier R2 complements.
- systems/cloudflare-workers — the native object-store client tier.
- patterns/mountable-persistent-storage — the pattern R2 + Sandbox SDK realise together.
- concepts/container-ephemerality — the problem shape.
- systems/cloudflare-artifacts — uses R2 as the pack-file snapshot store behind each per-repo DO.
- patterns/do-backed-git-server — the Artifacts substrate pattern.
- companies/cloudflare — operator.
Local-dev parity¶
R2 is one of the binding types exposed through the
Local Explorer local
mirror of the Cloudflare API at /cdn-cgi/explorer/api,
backed by Miniflare's on-disk object
store. Same API shape local and remote — differs only by the
--local flag on cf /
Wrangler (Source:
sources/2026-04-13-cloudflare-building-a-cli-for-all-of-cloudflare).