AgentGit saves the conversation behind your work: prompts, tool calls, results, and decisions. You can drive a live session together with other people, hand it to someone else, continue it later, or share it for reading. If you have not set it up yet, send the prompt on Get started to your agent first.
Your Agent repo holds conversation history and shared instructions. Each session branch holds one conversation; a turn is one user message and the agent’s response. Your project’s code Git repository stays separate.
Multiplayer Mode (Remote Control)
Multiplayer Mode lets several people watch and steer the same live agent session from any desktop or phone browser. The agent, your project files, and the runtime’s login and model settings stay on your machine; the Hub relays the conversation, and every turn is still saved as AgentGit history. It works with Claude Code, Codex, and OpenCode.
Use it to check on a long task from your phone, work through a problem with a teammate in the same session, or let someone follow along without typing.
Turn it on
On the computer where your code lives, with AgentGit 0.2.1 or later:
agit login
agit rc start --detach
This starts the AgentGit daemon, agitd, in the background and registers the
machine to your account. There is no pairing code. Then:
- Open Workspaces and sign in with the same account. Your machine appears as a private workspace.
- Use + folder to add your project folder.
- Under Projects, choose the runtime button beside the folder to start a session, or select an existing session to continue it. Send prompts, read streamed replies and tool activity, and answer approval requests.
Keep the machine awake and online. Closing the browser does not stop the agent; stopping the daemon ends its sessions.
Invite people
Open the workspace and use its Shared with panel:
- Create invitation link, choose the role it grants (Viewer unless you pick more), and send it. Anyone with the link can sign in and join with that role. Invitation links expire, and you can revoke them in the same panel.
- Invite a Hub username, choosing the role the same way. To change a collaborator’s role, higher or lower, choose their role on the member list.
| Role | What the person can do |
|---|---|
| Full access | Add folders, manage members, use the machine’s file browser and terminal, and answer owner-required approvals |
| Operator | Start or drive sessions in added folders and answer approvals delegated to operators |
| Viewer | Follow sessions without sending prompts or approving tools |
The account that set up the workspace is listed as Owner; Full access gives a collaborator the same powers in the workspace.
In Codex conversations, commands run without asking, so an operator’s messages can read files anywhere on the machine and its environment variables, such as API keys.
Access to your machine is also limited by its resource policy. If a collaborator can open the workspace but not a project, see device access.
Check or stop it
agit rc status
agit rc stop
status shows the daemon and its live sessions. stop stops the daemon and the
sessions it runs; run agit rc start --detach again to resume access. See
Multiplayer Mode (Remote Control) for approvals,
revoking a device, proxies, and troubleshooting.
More you can do
- Pick up where you left off. Save a conversation with its prompts, tool results, and decisions, then resume it later without explaining everything again. You can also fork it to try another approach while keeping the original path.
- Hand a session to a teammate or another machine. Publish saved work with
push; the recipient can clone it, get later updates withpull, and continue from that context withagit run owner/repo@branch. Read access lets them clone and pull; give write access if they should push work back. See Sharing for the handoff workflow. - Invite someone to a private repository. With AgentGit 0.2.5 or later,
agit repo invite owner/repoprints a read-only invite link, andagit repo invite owner/repo@branchprints one that opens that branch’s session once the invitation is accepted. On the Hub, owners can create links in the repository’s Settings → Invite by link or with the Invite button on a session page, choosing read-only or read-write access. See invite links. - Share a conversation for someone to read. On the Hub, Share on a
session page copies a read-only link to the version you are looking at. From
the terminal,
sharecreates a read-only copy with an optional expiry, view limit, and password. Either is useful for a review, a bug report, or showing how you solved a problem, and neither grants repository or live-agent access. See snapshot links and share links. - Protect secrets before uploading. AgentGit automatically replaces
registered secrets and protected values with placeholders when saving.
pushthen scans outgoing history and blocks suspected secrets or an incomplete scan. This does not erase secrets from older history; review the result before publishing. See secret protection. - Continue in a different agent harness. Move a saved conversation between
supported runtimes, such as Claude Code and Codex, with
resume --as. AgentGit converts the session and reports context that cannot transfer, such as vendor-specific reasoning. See switching runtimes.
You can ask your connected agent to help with these workflows in plain language.
Set it up by hand
The Get started prompt has your agent do this for you. Follow these steps to set up AgentGit yourself, or to see what each step does.
1. Install and connect your agent
You need Node.js 20 or later, Git 2.28 or later, and an installed agent runtime. AgentGit supports macOS and Linux on Intel and ARM, plus Windows x64. You can start and resume sessions in Claude Code, Codex, OpenCode, OpenClaw, Hermes, or WorkBuddy; Cursor sessions can be imported for inspection. See runtime support for each runtime’s installation requirements and limitations.
Open a terminal in the project folder where you work and run:
npx -y create-agit@latest
The installer downloads the CLI and runs agit setup to connect supported
runtimes with instructions, skills, hooks, and MCP where available. Restart an
already-open agent so it can load those integrations.
The installer places agit in ~/.local/bin (agit.exe on Windows). If the
command is not found, add that directory to your shell or Windows user PATH
and open a new terminal. Native Windows ARM64 is not a prebuilt installer target.
Check that installation worked:
agit --version
agit doctor
If you installed the CLI another way, added a runtime, or need to connect a new
project folder, run agit setup there. It is safe to run again.
2. Sign in
agit login
agit whoami
Approve the sign-in in your browser. On a machine without a browser, use
agit login --device instead. The default Hub is
agent-git.com.
In the examples below, replace your-name with the account name shown by
agit whoami. Use the same Agent repo and branch names throughout the guide.
3. Initialize your Agent repo
Check whether this project already has an Agent repo:
agit status
If a bound repo is shown, reuse it and substitute its owner/name in the
following examples. If there is no bound repo but an adopted session already
belongs to this folder, reuse that session’s repo; when several are listed,
choose the repo you intend to work in.
For a project with no existing Agent repo, create one:
agit init project-notes
This creates your-name/project-notes, prepares its shared main file line, and
binds the current folder to it. init does not start a conversation. Next,
choose one of the two paths below.
4. Start or import a conversation
Choose a new conversation if you are beginning a
task, or an existing conversation if you
already have work to keep. Both paths below use the branch name first-task;
follow just one, or choose different branch names if you try both.
Start a new conversation
From your project’s terminal, run:
agit new your-name/project-notes -b first-task --as codex
Replace codex with your runtime’s CLI identifier,
such as hermes, openclaw, or workbuddy. AgentGit creates
first-task and launches the runtime in your project folder. Ask your agent to
do a small task. Before you exit, ask it to save the conversation:
Use AgentGit to save this conversation on your-name/project-notes@first-task. Check whether this exact runtime session is adopted. If it is not, identify its native session ID and import that ID into the same empty branch with –independent. Do not guess the ID from the newest conversation or the project folder. Then run
agit commit your-name/project-notes@first-taskand verify the saved turns withagit log your-name/project-notes@first-task.
Replace your-name in the prompt with your account name. Working startup hooks
register the new transcript on its branch. When hooks are unavailable, import
it explicitly using its native runtime ID:
agit import SESSION_ID --into your-name/project-notes@first-task --independent
SESSION_ID is the runtime’s conversation ID, not the AgentGit branch name.
If the agent cannot identify it, exit the runtime and use the
import picker below, choosing a fresh
branch name such as saved-first-task. Use that branch in the remaining
examples. Once the saved turns are verified, return to your terminal.
If you are already talking to an agent and want to keep that conversation, use the import path below.
Import an existing conversation
Exit the existing conversation in its runtime, then open the session picker from your project’s interactive terminal:
agit import
Select your existing your-name/project-notes repo, the inactive conversation
to import, and the new branch name first-task. Then choose a verified starting
point or an independent import. Cancellation is the initial choice. Once you
confirm the lineage, the picker saves its recorded turns so far; it does not launch a new conversation.
Skip the direct import command below if you used the picker.
Alternatively, for a conversation you intend to import without selecting a
prior saved base, replace SESSION_ID with its native runtime ID and run:
agit import SESSION_ID --into your-name/project-notes@first-task --independent
Or ask the agent in the conversation you want to keep:
Use AgentGit to import this conversation into my existing your-name/project-notes repo on a new branch named first-task. Check
agit statusfirst, identify this exact conversation’s native session ID, and runagit import SESSION_ID --into your-name/project-notes@first-taskwith that ID and an explicit lineage decision: inspect earlier saved context if it continues existing work, or use –independent if it has no chosen base. Ask me to choose when unclear. If you cannot identify the native ID, tell me to use the terminal picker.
Replace your-name in the prompt too. If the conversation is already adopted,
continue its existing branch instead of importing it again. Import requires a
native session ID or an explicit picker selection; it does not accept @ as
shorthand for the running conversation. See import lineage
for read-only candidate inspection, --onto, and noninteractive usage.
5. Save, inspect, and continue
After your first task or import, save any new turns and inspect the result:
agit commit your-name/project-notes@first-task
agit log your-name/project-notes@first-task
agit show your-name/project-notes@first-task#-1
commit saves locally; log lists recorded turns; show reads the latest one.
A commit with nothing new to save is harmless. Automatic saving depends on your
runtime and launch mode, so use commit whenever you want to make sure your work
is recorded. It does not commit your code unless you add --code.
When you return to this project, continue the same conversation:
agit resume your-name/project-notes@first-task
For an imported Cursor session, use log and show to inspect it; native Cursor
resume is not supported. Runtime support explains the options.
6. Publish when ready
Publishing is optional. To upload the saved branch to the Hub as a private repo:
agit push your-name/project-notes@first-task --private
Use --public instead if you want anyone to be able to read it. Visibility flags
apply to the first publication; later pushes keep the repository’s existing
visibility. AgentGit scans for secrets before uploading and prints the Hub URL
when it succeeds. Review the conversation and scan result before sharing it.
Run commit before a later push to include your latest work. To let someone
into the private repository, create an invite link with
agit repo invite your-name/project-notes@first-task. See
Sharing for links, teammates, and visibility settings.
Let your agent use AgentGit
Start new work with agit new owner/repo -b next-task instead of launching a bare
runtime: this gives the conversation a named AgentGit branch from the start.
Use agit init only when the project has no reusable Agent repo; an existing
binding or explicitly selected adopted session identifies the repo to reuse.
If several sessions are listed without a binding, choose one explicitly.
Use agit resume owner/repo@branch when continuing existing work.
If you prefer to keep launching plain claude or codex in a project folder,
turn on automatic upload there with
agit on instead.
You do not need to memorize the CLI. After agit setup, you can ask your agent
to use AgentGit from the same conversation:
- “Check which AgentGit repo and session this project is using.”
- “Save this conversation with an AgentGit milestone called ‘First working version’.”
- “Show me what we decided in the last recorded turn.”
- “Fork this conversation so we can try a different approach.”
For publishing, tell the agent the intended repo, branch, and visibility. See Use with your agent for more examples and integrations.
Save every session in a project folder
Turn on automatic upload in a project folder once, and each new Claude Code or Codex conversation you start there is saved and uploaded by itself after each turn, in its published form:
agit on
It names the Hub repository the folder uploads to, and whether it is private
(only its members can read it) or public (anyone can read it), and asks before
it starts. It covers this folder and its subfolders that have no binding of
their own. Turned on in a Git repository’s main checkout, it also covers the
linked worktrees that have no setting of their own, and says which. Other
folders are not affected.
Conversations from before you turned it on stay as they are: agit on says how
many there are, and agit save --all uploads them too if you want, except
conversations you stopped uploading. To stop
saving and uploading new conversations here (nothing already saved is deleted):
agit off
Bind a folder by hand
agit new names one conversation at a time. If you start Claude Code or Codex
directly, for example in several terminal windows in the same folder, you can
also bind the folder to an existing Agent repo with automatic upload yourself.
The runtime’s Stop hook then imports each new session started in that folder
onto its own project-<runtime>-<id> branch at the end of a turn and pushes it
to the Hub.
The repo must already exist on the Hub. Create a private one if needed, preview the binding, then bind:
agit repo create project-notes --private
agit project bind . --repo your-name/project-notes --history none --auto-upload --dry-run
agit project bind . --repo your-name/project-notes --history none --auto-upload
bind shows the destination and asks you to confirm it; add --yes once you
have reviewed it. With --auto-upload, it installs the Claude Code and Codex
hooks and turns on push.auto for the whole repository, so other sessions
already managed in that local repo also publish automatically. You do not need
to set push.auto separately. --history selects which conversations are
included:
none: only conversations started after the bind; earlier ones in the folder stay out unless they are already saved in this repo.all: also import and publish the folder’s existing Claude Code and Codex conversations during the bind.
Be aware of what it does not cover:
- Only Claude Code and Codex are captured, and Codex only when it reports its
hooks feature as enabled. Without that, publish the folder’s Codex sessions
with
agit project sync .. - Subfolders are included unless they have a binding of their own.
- A session already saved in another repo stays in that repo, even with
--history all. Sessions cannot be transferred between repos; continue them withagit resume owner/repo@branchin the repo that holds them. commit.automust not befalse;bind --auto-uploadrefuses otherwise.- Without
--auto-uploadno hooks are installed. Runagit project sync .to import and publish the folder’s sessions when you choose.
agit project status . shows the policy and the result of the last capture or
sync, without network access. agit project unbind . stops capture and keeps
the history that is already saved locally and on the Hub. This is different
from the binding agit init creates: that binding only selects a default repo
for commands and never saves a conversation by itself.
Move a folder to another repo
If agit init or agit clone already bound the folder to a different repo,
agit project bind refuses with “directory is bound to …; rebind it explicitly
first”. Rebind the folder to the destination repo from inside it, then bind it
as a project:
agit clone acme/project-notes --rebind
agit project bind . --repo acme/project-notes --history none --auto-upload --dry-run
agit project bind . --repo acme/project-notes --history none --auto-upload
Replace acme/project-notes with a repo you can write to, such as an
organization repo. New conversations started in the folder after the bind are
saved to it. Sessions already saved in the old repo stay there: they are not
transferred, so continue them in the old repo or start a new conversation.
agit clone --rebind changes the binding only when the repo already has a
branch on the Hub; a repo made with agit repo create has none until something
is pushed to it. If clone reports that no branches came down, the folder keeps
its old binding; agit status shows which repo the folder is bound to.
This applies only to an init or clone binding. A folder that already has a
project policy for another repo cannot be moved, even after
agit project unbind .; use a different folder for the new repo.
Keep these commands nearby
Use owner/repo@branch to select a session explicitly. AgentGit sets
AGIT_SESSION when it launches a runtime; @ selects the branch supplied by
that variable. A folder’s binding does not select a session for commands.
| What you want to do | Command |
|---|---|
| Check the current repo and sessions | agit status |
| Create the first Agent repo for this project | agit init project-notes |
| Start a new conversation in an existing repo | agit new owner/repo -b next-task |
| Save and upload every new session in this folder | agit project bind . --repo owner/repo --history none --auto-upload |
| Save new turns locally | agit commit owner/repo@branch |
| List recorded turns | agit log owner/repo@branch |
| Read the latest turn | agit show owner/repo@branch#-1 |
| Continue a conversation | agit resume owner/repo@branch |
| Publish saved work | agit push owner/repo@branch |
| Get saved work from another machine | agit pull owner/repo@branch |
| Invite someone to a session’s repository | agit repo invite owner/repo@branch |
| Share an explicitly selected native session | agit share SESSION_ID --views 5 --expire 24h --password |
| Use your agent from a browser, with others | agit rc start --detach |
| Get help for any command | agit COMMAND --help |
Saving with commit is local. Publishing with push and creating a share are
separate choices. Review what will be published and choose the intended repo,
branch, visibility and sharing scope before either action. For a share, use the
exact native session ID; see Sharing.
Next, follow Everyday commands for the daily workflow, or browse History & versions when you want to revisit a decision. For more detail, jump directly to the reference syntax, terminal history browser, core concepts, or runtime setup.
If something gets in the way
agitis not found: open a new terminal and follow the installer’s PATH instructions. For the default install location, runexport PATH="$HOME/.local/bin:$PATH", thenagit --version; add that PATH setting to your shell profile to keep it across terminals.- The agent does not see AgentGit: run
agit setupin the project, restart the runtime, and checkagit doctor. - The picker says a closed session is still active: it uses recent transcript
writes as a signal. Wait at least 90 seconds after the last activity, then
close and reopen
agit importto refresh the list. If you know the native session ID, you can use the explicit import command instead. - More than one session is listed: use the full
owner/repo@branchfromagit statusto select the intended session explicitly. - A branch name is already in use: resume it if it is yours, or choose a new branch name for a different conversation.
- No registered live transcript: if you already exited a new session before
its first save, use
agit import SESSION_ID --into owner/repo@branchwith that runtime session’s ID and the branch you created, then retrycommit. - The log is empty: make sure the agent has completed a turn, then run
agit commitagainst the intended branch and checkagit status. agit repo inviteis not recognized: it needs AgentGit 0.2.5 or later; runnpx -y create-agit@latestto update.- The Hub cannot be reached: run
agit doctor --check-backend. Already recorded local history stays on your machine.