01
Repo primitives
Create repositories from archives or initial files, then resolve them under the authenticated organization.
Driftstone gives your product a Git system for agent work: repositories, branches, file contents, commits, merges, and sync operations behind a clean API.
agent.json
initial files
environment.json
committed
01
Create repositories from archives or initial files, then resolve them under the authenticated organization.
02
List, inspect, create, replace, and prepare branches around agent-generated work.
03
Read and write file contents through the API while Driftstone turns updates into commits.
Driftstone turns generated files and workspace updates into named Git operations your product can reason about, review, and publish.
Start a repo from base64 archives or structured initial files with a default branch and commit message.
Create branches from another branch or commit hash, then optionally replace their contents from a zip.
Fetch a path from a branch, update a file, and let Driftstone commit the write with the right message.
Merge heads into bases, publish branch refs, and sync changes into target branches.
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.
An agent or product flow starts with /v1/repos/create and gets a real Git repository instead of a loose file bundle.
A branch can be created from main, a release branch, or a commit hash so generated work stays reviewable.
Contents writes target a path and branch, producing a named commit that is easy to inspect later.
When the work is ready, Driftstone merges into the base branch or syncs it into selected targets.
The endpoints stay narrow on purpose. Callers get the Git operations they need without taking responsibility for repo storage, organization resolution, or commit plumbing.
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 reviewPUT /v1/repos/agent-work/contents/PLAN.md
{
"branch": "review/agent-update",
"message": "Write generated plan",
"content": "# Plan\n\nShip the workspace changes."
}/v1/repos/createCreate a repo from initial files or an archive./v1/repos/{repo}/branchesList branches for a repository./v1/repos/{repo}/branchesCreate a branch or replace its contents./v1/repos/{repo}/contents/{path}Read a file from a branch./v1/repos/{repo}/contents/{path}Write a file and commit the change./v1/repos/{repo}/mergesMerge head into base./v1/repos/{repo}/syncPublish branch refs into target branches.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
Repos, branches, contents, merges, and sync operations give the rest of Harnesslayer a stable system of record for agent workspace changes.