---
title: "Cloudflare Artifacts - Versioned Git-compatible storage for agents"
description: "Versioned, Git-compatible storage built for the era of agents. Create millions of repositories, fork from GitHub, and give every agent its own branch."
url: "https://www.cloudflare.com/products/artifacts"
---

# Artifacts

> 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.

## Benefits

### 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.

## Use Cases

### 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

Track configuration changes across deploys with full Git history, branching, and rollback. Every change is attributed and reversible.

### Platform-managed repos

Build Git-backed features for your users: notebooks, IaC, generated content. No Git infrastructure to run.

## Code Examples

### Create a repo and issue tokens

Declare an `artifacts` binding in `wrangler.jsonc`. Call `create()` to return the remote URL and auth token, and issue scoped tokens for any repo.

```typescript
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 from GitHub and fork

Import any GitHub repo by owner/name. Fork to an isolated copy for safe agent workspaces or review environments.

```typescript
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 })
  },
}
```

### Manage repos over HTTP

Every binding operation has a REST equivalent. Use the REST API from any language or environment that can make HTTP requests.

```bash
# Create a repo
curl -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 hour
curl -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 copy
curl -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" }'
```

## Resources

- [Full Documentation](https://developers.cloudflare.com/artifacts): Complete technical documentation
- [Get Started](https://dash.cloudflare.com/sign-up): Sign up and start building
- [Pricing](/plans.md): See pricing details

## Related Products

- [Cache Reserve](/products/cache-reserve.md): Persistent caching for static content
- [D1](/products/d1.md): Serverless SQL
- [Data Platform](/products/data-platform.md): Ingest, Catalog & Query
- [Hyperdrive](/products/hyperdrive.md): Global databases

---

*This is a markdown version of [https://www.cloudflare.com/products/artifacts](https://www.cloudflare.com/products/artifacts) for AI/LLM consumption.*
