Connect AI agents
Sangam-Git is built for a world where AI coding tools write a large share of the code. You can connect Claude Code, Cursor, Copilot, Codex, Windsurf, Aider — anything that speaks MCP or webhooks — and Sangam-Git will label what they produce and keep a human in charge.
Why this is different
On other hosts, a commit from an AI agent looks exactly like a commit from a person. Nobody can tell what a bot wrote. Sangam-Git changes that: work from an AI agent is labelled at the source, and AI-authored pull requests cannot merge without a human's approval. This isn't a setting someone can forget — it's a rule in the system.
Create an agent token
An AI agent authenticates with an access token, just like you do — but a special kind.
- Go to Settings → Tokens.
- Give the token a name (e.g.
claude-code). - Choose For an AI agent. This is the important part: every commit and pull request made with this token is automatically tagged "AI agent."
- Copy the token now — it's shown only once.
Because the token is marked as an agent, reviewers always know which changes came from a tool, so review effort goes where the risk actually is.
Connect over MCP
Sangam-Git exposes a single MCP endpoint that any MCP-capable agent can use. For example, with Claude Code:
claude mcp add --transport http sangam \
https://sangam.example.com/mcp \
--header "Authorization: Bearer sgm_your_agent_token"
One endpoint, one command. The same tools and the same rules apply to every agent — none of them "owns" your Git host.
Let the agent work
Now your agent can read the repo, create branches, commit, and open pull requests — all through Sangam-Git. Everything it pushes is labelled. When it opens a PR, the PR is marked AI-authored and the human-approval gate applies automatically.
Bring your own agent (webhooks)
You may prefer to run your own review agent on a plan you already pay for. Sangam-Git supports that too: it POSTs signed JSON to your webhook URLs on pull-request and issue events. Your CI receives the event, runs your agent (Claude Code, Cursor, …), and posts the review back — at zero model cost from us.
Set this up under a repository's Settings → Webhooks. Always verify the X-Sangam-Signature-256 header with your signing secret so you know the event really came from Sangam-Git. (See Security.)
What Sangam-Git's own AI can do
If you'd rather use the built-in AI features, they run only when you ask, on the specific diff involved, and each run shows the model used and its cost:
- Summarise a pull request in plain language.
- AI review — bounded, high-confidence findings only (real bugs, not style nits).
- Explain config changes — turn a confusing YAML/JSON diff into "adds a discount field to the Orders form."
You can turn all AI off for your whole account or organization. When off, your code is never sent to any model — while labels, risk lanes, and secret scanning keep working locally. (See our Trust & data page.)
The principle: AI can propose as much as it likes. A person still decides what merges into
main.