Git-backed agent workspaces

Version every agent workspace like a repo.

Driftstone gives your product a Git system for agent work: repositories, branches, file contents, commits, merges, and sync operations behind a clean API.

repos/agent-work
repomainbranchmergesync

agent.json

initial files

environment.json

committed

01

Repo primitives

Create repositories from archives or initial files, then resolve them under the authenticated organization.

02

Branch control

List, inspect, create, replace, and prepare branches around agent-generated work.

03

Commit surface

Read and write file contents through the API while Driftstone turns updates into commits.

Why Driftstone

Agent work should not disappear into one-off folders.

Driftstone turns generated files and workspace updates into named Git operations your product can reason about, review, and publish.

Create repos

Start a repo from base64 archives or structured initial files with a default branch and commit message.

Manage branches

Create branches from another branch or commit hash, then optionally replace their contents from a zip.

Read and write contents

Fetch a path from a branch, update a file, and let Driftstone commit the write with the right message.

Merge and sync

Merge heads into bases, publish branch refs, and sync changes into target branches.

Workflow

Keep agent output on a reviewable path.

Driftstone is built around explicit Git movements: create, branch, write, merge, and sync. That gives teams a stable control plane for work that agents produce across many users.

01

Create a tracked workspace

An agent or product flow starts with /v1/repos/create and gets a real Git repository instead of a loose file bundle.

02

Work on an isolated branch

A branch can be created from main, a release branch, or a commit hash so generated work stays reviewable.

03

Commit file updates

Contents writes target a path and branch, producing a named commit that is easy to inspect later.

04

Merge or sync onward

When the work is ready, Driftstone merges into the base branch or syncs it into selected targets.

API surface

A compact Git API for products and agents.

The endpoints stay narrow on purpose. Callers get the Git operations they need without taking responsibility for repo storage, organization resolution, or commit plumbing.

Bearer keys
Org-scoped repos
Commit metadata
Health checks
repo create
curl -X POST https://api.driftstone.ai/v1/repos/create \
  -H "Authorization: Bearer dk-..." \
  -d '{"name":"agent-work","initialFiles":{"README.md":"# Agent work"}}'

driftstone: repo created
main: 1 commit
branches: ready for review
content write
PUT /v1/repos/agent-work/contents/PLAN.md

{
  "branch": "review/agent-update",
  "message": "Write generated plan",
  "content": "# Plan\n\nShip the workspace changes."
}
Method
POST/v1/repos/createCreate a repo from initial files or an archive.
GET/v1/repos/{repo}/branchesList branches for a repository.
POST/v1/repos/{repo}/branchesCreate a branch or replace its contents.
GET/v1/repos/{repo}/contents/{path}Read a file from a branch.
PUT/v1/repos/{repo}/contents/{path}Write a file and commit the change.
PUT/v1/repos/{repo}/mergesMerge head into base.
POST/v1/repos/{repo}/syncPublish branch refs into target branches.

Frequently asked questions

What is Driftstone?

Driftstone is the Git system inside this folder: a repository API for creating repos, branching work, reading and writing contents, merging changes, and syncing branch state.

Driftstone API

Build agent work on Git primitives from the start.

Repos, branches, contents, merges, and sync operations give the rest of Harnesslayer a stable system of record for agent workspace changes.