Artifacts

Versioned storage that speaks Git

Give your agents, developers, and automations a home for code and data. Artifacts is Git-compatible storage built for scale: create tens of millions of repos, fork from any remote, and hand off a URL to any Git client.

Git compatible

Agents know git. Every repository can act as a git repo, allowing agents to interact with Artifacts the way they know best: using the git CLI.

Programmable

Create repos, new branches, commit, diff and search. All programmatically, without waiting.

Tens of millions of repos

Create a thousand, a million or ten million repos: one for every agent, for every upstream branch, or every user. No need to plan ahead.

A few lines of code. Millions of repos.

Create, import, fork, and manage access: the full repo lifecycle from a Workers binding.

Background Pattern
import type { Artifacts } from 'cloudflare:workers';
interface Env {  ARTIFACTS: Artifacts;}
export default {  async fetch(request: Request, env: Env) {    // Create a repo — returns the remote URL and an initial write token    const { remote, token, repo } = await env.ARTIFACTS.create('my-project');
    // Issue a scoped read token, valid for 1 hour    const readToken = await repo.createToken('read', 3600);
    return Response.json({ remote, token: readToken.plaintext });  },};
import type { Artifacts } from 'cloudflare:workers';
interface Env {  ARTIFACTS: Artifacts;}
export default {  async fetch(request: Request, env: Env) {    // Import from GitHub    const { repo } = await env.ARTIFACTS.import('workers-sdk', {      url: 'https://github.com/cloudflare/workers-sdk',      branch: 'main',    });
    // Fork to an isolated, read-only copy    const { remote, token } = await repo.fork('workers-sdk-review', {      readOnly: true,    });
    return Response.json({ remote, token });  },};
# Create a repocurl -X POST "https://artifacts.cloudflare.dev/v1/api/namespaces/default/repos" \  -H "Authorization: Bearer $JWT" \  -H "Content-Type: application/json" \  -d '{ "name": "my-project" }'
# Issue a scoped read token, valid for 1 hourcurl -X POST "https://artifacts.cloudflare.dev/v1/api/namespaces/default/tokens" \  -H "Authorization: Bearer $JWT" \  -H "Content-Type: application/json" \  -d '{ "repo": "my-project", "scope": "read", "ttl": 3600 }'
# Fork to an isolated copycurl -X POST "https://artifacts.cloudflare.dev/v1/api/namespaces/default/repos/my-project/fork" \  -H "Authorization: Bearer $JWT" \  -H "Content-Type: application/json" \  -d '{ "name": "my-project-fork" }'

How Artifacts work

Background Pattern

Create a repo in one line of code

Create one. Create one million. One API that scales.

Background Pattern

Fork from anywhere

Fork from another repo: in Artifacts, from GitHub, or any other git-compatible upstream.

Background Pattern

Hand off to any Git client

create() and import() return a remote URL directly. Pass it to your agent, a CLI, an IDE, or another Worker. Standard git clone just works.

Background Pattern

Manage access with scoped tokens

Create short-lived tokens for any repo: read for safe inspection, write for agents that need to commit. Tokens expire automatically.

Background Pattern
Artifacts

One repo per agent. One per user. One per everything.

See real-world examples of Cloudflare Artifacts

View docs

Agent workspaces

Give coding agents isolated, versioned environments. Fork from a shared baseline, let the agent commit its work, then diff against the original.

Config versioning