A filesystem born for agent-scale code

Agent-driven development is stressing the tooling that was designed for human workflows. Repositories are being created, branched and committed at a volume that traditional source control platforms were never built to handle. With agents that operate around the clock and can tackle multiple issues in parallel, the number of generated objects and commits is growing by an order of magnitude.

Artifacts is built as a new primitive in response: a distributed, versioned filesystem that speaks Git. It allows you to create repositories programmatically from any compute context — agent sessions, sandboxes, Workers, or serverless functions — and access them through any standard Git client.

The core requirement is simple: give agents an authenticated HTTPS remote URL that behaves exactly like a Git repository. For environments where a Git client isn’t practical, Artifacts exposes a REST API alongside native Workers bindings for repo creation, credential management, and commits.

# Clone it and use it like any regular git remote
$ git clone https://x:${TOKEN}@123def456abc.artifacts.cloudflare.net/git/repo-13194.git

A bare repository is provisioned on demand. Any Git client can push to it immediately, and existing repositories can be imported to give an agent an isolated starting point for independent work.

interface Env {
  ARTIFACTS: Artifacts
}

export default {
  async fetch(request: Request, env: Env) {
    // Import from GitHub
    const { remote, token } = await env.ARTIFACTS.import({
      source: {
        url: "https://github.com/cloudflare/workers-sdk",
        branch: "main",
      },
      target: {
        name: "workers-sdk",
      },
    })

    // Get a handle to the imported repo
    const repo = await env.ARTIFACTS.get("workers-sdk")

    // Fork to an isolated, read-only copy
    const fork = await repo.fork("workers-sdk-review", {
      readOnly: true,
    })

    return Response.json({ remote: fork.remote, token: fork.token })
  },
}

The case for a Git-native protocol

Git is already deeply embedded in the training data of most AI models. Agents know both its happy paths and its edge cases well, and making Artifacts speak the existing protocol sidesteps the bootstrap problem of teaching models a proprietary interface.

The Git data model itself is broadly useful for tracking state beyond source code. Commits work well as small chunks of any kind of state, and the model provides fork, revert, and history semantics out of the box.

Internally, Cloudflare uses Artifacts to persist both filesystem state and session history for agent sessions. This enables state sharing across machines without provisioning block storage, time-travel through prompt and file history, and session forking — sending a colleague a URL that lets them pick up exactly where another session left off.

The same semantics apply to non-source-control use cases where rollback and diffing matter, such as storing per-customer configuration files in a versioned store.

Built on Durable Objects, powered by Zig

The ability to support millions of repositories per namespace comes directly from Durable Objects, which already power large-scale stateful workloads at Cloudflare. What was missing was a Git server implementation that could run on Workers — so one was written from scratch in Zig.

The protocol engine is pure Zig with no libc dependency, compiled to a roughly 100KB WASM binary. It implements SHA-1, zlib compression, delta encoding and decoding, pack parsing, and the full Git smart HTTP protocol. The choice of Zig gave the team manual control over memory allocation in constrained Durable Object environments, plus the ability to run the same code natively for conformance testing against libgit2.

The WASM module talks to the JavaScript host over a thin callback interface: 11 host-imported functions for storage operations and one for streaming output. The module is testable in isolation.

Architecturally, Artifacts uses:

  • A Worker front-end for authentication, authorization, and repo lookups
  • SQLite-backed Durable Object storage with large Git objects chunked across rows (given the 2MB max row size)
  • Streaming in both fetch and push paths, returning raw WASM output as a ReadableStream<Uint8Array>
  • Persisted deltas with base hashes, so the server can emit the delta when the client has the base object — saving both bandwidth and memory
  • Both protocol v1 and v2, including shallow-clone capabilities and incremental fetch negotiation

Git-notes support is built in natively, letting agents attach metadata like prompts or attribution to objects without mutating the underlying data.

Fast mounts for large repositories

Most repositories clone in seconds, but multi-gigabyte repos with millions of objects are a different story — the total clone time can keep an agent idle for minutes. A well-known web framework at 2.4GB takes nearly two minutes to clone.

ArtifactFS, open-sourced alongside Artifacts, is a filesystem driver that avoids the initial clone bottleneck. Instead of blocking on a full download, it runs a blobless clone: fetching the file tree and refs first, then hydrating file contents in the background. File reads block only if the content isn't yet available.

The hydration daemon prioritizes package manifests, configuration files, and source code over binary blobs. Because the filesystem is mounted against a Git remote, agents commit and push through ordinary Git — no syncing or new APIs required. Notably, ArtifactFS works with any Git remote, including GitHub, GitLab, or self-hosted infrastructure.

On the roadmap

The private beta launches with metrics for operations per namespace and bytes per repo. Near-term additions include event subscriptions for pushes, pulls, clones, and forks; native SDKs for TypeScript, Go, and Python; and repo-level and namespace-wide search (for example, finding every repo with a package.json). An API for Workers Builds is also planned, letting agent-driven workflows trigger CI/CD jobs directly.

Pricing at agent scale

Artifacts is still in its early stages, but the pricing model is being designed around a simple principle: it should be economical to run millions of repositories, including ones that are rarely touched. The service is built for the massively-single-tenant nature of agents, so you won't need to pre-judge whether a repo will be hot or cold, or whether an agent will wake it up.

Charges will be based on two things: the storage you consume and the operations you perform—clones, forks, pushes, and pulls—against each repository.

$/unit

Included

Operations

$0.15 per 1,000 operations

First 10k included (per month)

Storage

$0.50/GB-mo

First 1GB included.

That means a large, frequently-used repo will naturally cost more than a small, dormant one, whether you manage 1,000 repos or 10 million. During the beta, Artifacts will also be added to the Workers Free plan with fair-use limits. Any adjustments to this pricing structure will be announced ahead of time, and you won't be billed until you've been notified.

Getting access

Artifacts is currently in private beta, with a public beta expected in early May 2026. Access will be granted progressively over the coming weeks, and interested users can register directly for the private beta.

BLOG-3269 3

While you wait, there are several ways to familiarize yourself with the service:

To track feature updates and the beta's progress, follow the changelog.