# gitd > Run ten or a hundred AI agents on the same repository. gitd gives each one its own writable copy in milliseconds, and turns their commits into branches; your token never enters a sandbox. Open source, Apache-2.0. ## How it works - Pool: One bare repository per repository you use, fetched once and kept in sync. The only copy that talks to the network. - Template: One checkout per commit, written once and shared, read only, by every workspace of that commit. - Workspace: A copy-on-write layer on the template, mounted where the agent works. Plain git; only what the agent changes takes disk. - Publish: The agent commits; gitd pushes the commits to a new branch from the pool, with the token it keeps. Never forced. ## Benchmark - 100 agents on kubernetes/kubernetes (GitHub runner, 4 CPUs), 100 × git clone against 100 × gitd prepare: - Time for all 100: 980 s against 14.5 s - Each workspace: 9.8 s against 23 ms - Disk: 41,870 MB against 850 MB - Network: 100 fetches against 1 fetch ## Questions - How is it different from git worktree? Worktrees share one repository’s refs and configuration, cannot check out the same branch twice, and break when mounted into a container. A gitd workspace is a repository of its own that borrows objects from a pool and files from a template. - Does gitd need root? No. gitd runs unprivileged; copy-on-write workspaces are mounted by gitd-mount, a small helper that holds only the capabilities mounting an overlay takes. Without it, gitd writes each workspace’s files and still fetches once. - Which git hosts does it work with? Any host over HTTPS or SSH, on any port: GitHub, GitLab with nested groups, Bitbucket, Gitea, Forgejo, Codeberg or your own. Submodules included. - What does an agent get? A normal git checkout: it can edit, run, diff, stash and commit with plain git. When it is done, gitd publishes its commits as a new branch. - Is git LFS supported? Not yet: LFS files are pointers in a workspace, and gitd says which. Support will come if users need it. - What does it cost? Nothing. gitd is open source under the Apache License 2.0. ## Links - Source: https://github.com/dooservice/gitd - Design: https://github.com/dooservice/gitd/blob/main/docs/DESIGN.md - Threat model: https://github.com/dooservice/gitd/blob/main/docs/THREAT_MODEL.md - Python client: https://pypi.org/project/gitd/ - TypeScript client: https://www.npmjs.com/package/gitd-client