You can ask your agent to use AgentGit in plain language. Skills teach the workflow; MCP gives the agent tools to search, inspect, and save history. Complete Get Started first if you want to record your own conversations.
Set up your agent
agit setup
This installs the AgentGit skill, available runtime hooks, MCP registration,
and the project’s AGENTS.md integration. To target one runtime, use
agit setup --runtime codex, for example. Reload your runtime if it needs a
restart to discover new tools or skills.
Then try:
Use AgentGit to save this conversation with the milestone “API design agreed”.
Search our AgentGit history for this error, read the relevant turns, and explain which solution actually worked.
Use AgentGit to compare our current approach with the alternative session. Propose which decisions we should keep before merging.
See Supported runtimes for installation paths and hook availability. Saving locally and publishing to the Hub are separate actions; ask for a push explicitly when you want to publish.
Local MCP server
agit mcp runs on your machine over stdio and is registered by agit setup.
Your agent uses these tools from within its runtime:
| Tool | What it does |
|---|---|
search |
Search hosted history you can read; requires sign-in |
show |
Read a conversation, turn, or event by reference |
view |
Inspect a branch’s VIEW composition |
status |
Inspect identity and sync state |
commit |
Save the session supplied by AGIT_SESSION, optionally with a milestone |
rc_status |
Inspect the local remote-control daemon’s connection and supervised sessions |
rc_list |
List Cloud devices available to the account |
The tools call the CLI implementation. If an operation needs an option the MCP tool does not expose, the agent can use the corresponding CLI command with the installed skill’s guidance.
The local commit tool inherits AGIT_SESSION from the MCP server process;
it does not accept a target argument. If that environment value is missing
or stale, ask the agent to use agit commit owner/repo@branch in its shell
with the intended target. Importing a conversation does not update the
environment of an already-running MCP server.
Remote MCP server
The Hub provides a read-only MCP endpoint for clients that do not need a local agit installation:
https://agent-git.com/mcp
Configure this as a Streamable HTTP MCP server in your client. Public
repository browsing works without authentication. search, session_hits,
and private repository access require a valid token from the same Hub in an
Authorization: Bearer <token> header. Private content also requires a
repository read grant. Store the token in your client’s credential
configuration.
| Tool | What it does |
|---|---|
search |
Search readable sessions, repositories, PRs, or people |
session_hits |
Locate matches inside a session using the repository, session ID, and ref from a search result |
list_agents |
List repositories visible to the caller |
get_agent |
Fetch repository metadata by owner and name |
list_sessions |
List sessions at a ref; ref="*" lists across the repository; retain returned cursors for later pages |
read_turns |
Read a bounded conversation window; from is inclusive and to is exclusive |
Each POST is an independent JSON-RPC request. The endpoint supports
initialize, ping, tools/list, and tools/call, with no persistent MCP
session or SSE stream. The tools use the Hub’s existing access controls and
result-size limits. Remote MCP does not expose the local server’s commit
tool.
Search filters
The local and remote search tools accept author, since, and before as separate arguments
for session searches. These are not query qualifiers:
{
"author": "alice@example.org",
"since": "2026-09-01",
"before": "2026-10-01",
"page": 1,
"limit": 20
}
Omit query to search using only these filters. author matches the selected
saved version’s Git author name or email exactly, ignoring case. It is recorded
Git metadata, not an authenticated account or repository owner. since includes
the boundary and before excludes it. Time refers to the saved version’s Git
committer timestamp, independently of transcript event timestamps. Date-only
boundaries mean midnight UTC; RFC3339 timestamps with offsets normalize to UTC.
applied_filters echoes the normalized predicates. The local tool rejects a
Hub response that omits or changes the requested filters. incomplete: true
means that hits and total are lower bounds, including when metadata could not
be read; filters are never silently relaxed. Inspect unknown for unsupported
query qualifiers. Use page and limit to continue through results. The local
tool also accepts queries for a batch with shared filters; the remote tool
accepts one search per call.
What the skill teaches
The installed skill includes command references that the agent reads when needed. It teaches the agent to:
- Run
agit statusand select the correct repository before creating or importing a session. - Use
@only whenAGIT_SESSIONselects the intended session; otherwise use an explicitowner/repo@branchtarget. - Save completed work with a milestone, and add
--codeonly when a code commit is also intended. - Reconcile forks by reading their VIEWs, selecting useful turns, reviewing shared-file changes, and writing a merge summary before continuing.
- Preserve conversation history instead of rebasing, amending, or force-pushing it.
The merge-agent protocol
When AgentGit launches a merge agent, AGIT_MERGE_TX identifies the target
transaction. Automatic settlement is suspended for that merge session, so its
exploratory conversation is not appended to the target’s history.
The agent reads both VIEWs and their events with agit view and agit show,
selects context with merge pick and merge drop, and reconciles shared files
under the path returned by agit repo path owner/repo@branch. It then writes the
required summary and completes the transaction with agit merge --continue.
The manual merge workflow
shows the commands and their order.
You can use the skill without MCP: the agent can run agit directly.
Everyday commands shows the terminal equivalents;
Forks and merges covers reconciliation.