Skip to content
RhodeCode
00
Agentic AI Governance position

An agent is a contributor. Treat it like one.

Coding agents write, review and merge inside your repositories. They need what every other contributor needs — an identity, scoped permissions, a rate limit and an audit trail. Not a plug-in. A principal in the permission model.

  1. 01 An identity, not a tokenEvery agent is a first-class account. Actions attribute to it, and revoking it stops everything it owns.
  2. 02 Scoped like a contractorRead, write or nothing, per repository and per path — with explicit deny and IP binding, exactly as for a person.
  3. 03 A ceiling on damageRate limits, spend caps and blast-radius rules mean a runaway loop is bounded rather than discovered on the invoice.
  4. 04 A record an auditor acceptsThe model, the prompt hash, the cost and the human approver, recorded against the line and exportable.
Fig. 00Every agent action resolves through the same six stages
01AI code review

AI in the review loop, not in someone else's cloud.

Connect ChatGPT, Gemini, Claude or a self-hosted model and have it analyse pull requests in place, on all three version control systems. We do not resell inference and we do not proxy your traffic — an administrator supplies the endpoint and credential, and the instance calls the provider directly.

  • The model is yours. We do not resell inference or proxy a single request.
  • AI comments never satisfy a required approval — people still own the merge.
  • Off by default, enabled per repository by an administrator.
  • Point it at a self-hosted model and no diff ever leaves your network.
  • Every AI action lands in the same audit log as every human one.
Illustration of an AI reviewer commenting inline on a pull request
Fig. 1aIllustration — an AI reviewer commenting inline, with your own model
02Agent accounts

Agent accounts, not shared service tokens

The failure mode everywhere else is a single bot token with write access to everything, shared between tools and impossible to attribute. RhodeCode already grants at user, group and path level with explicit denies and IP binding — an agent is simply another subject inside that model.

Ref Control What it means Enforced as
02.1 Its own account Every agent authenticates as itself, never through a shared bot token or a person's credential. user account + auth token
02.2 Scoped permissions Grant read, write or nothing at repository, group or path level — the same grants a person gets. path-level ACL
02.3 Explicit deny Deny always wins, so an agent can be barred from a path even when its group inherits access to the parent. deny beats inherit
02.4 IP binding Bind the agent to the subnet its runner lives on; a leaked token used elsewhere authenticates nowhere. per-subject IP range
02.5 Rate and spend ceiling Cap requests per hour and inference spend per day, so a runaway loop stops instead of billing. quota + budget cap
02.6 Revocable in one action Disable the account and every open pull request, token and running job it owns stops with it. single revoke
03Policy gate

Agent policy gate

Try it — the denials are the interesting part

Can an agent force-push to your release branch, or spend without a ceiling? Set the three fields and watch the same engine that resolves a person derive the answer.

Agent
Target
Action
Evaluation trace
  1. 01 IdentityAuthenticated as agent account claude-agent-04 with its own token and audit subject. scoped write
  2. 02 ScopeAgent scope is platform/**, docs/**. The target repository is outside it, so the grant never applies. out of scope
Gate decision
DENIED

Scope is declared up front and enforced on every call. Widening it is a permission change with an audit entry, not a runtime decision the agent can make.

Principal
claude-agent-04
Trust level
scoped write
Scope
platform/**, docs/**
Budget
$40 / day
Audit entry
agent.merge.denied
04Provenance

The provenance ledger

Origin · line-level attribution

“Was this code AI-generated?” is now an audit question, and “probably” is not an answer. Origin records the agent, the model, the prompt hash, the cost and the human who approved it — against the line, not the pull request.

Origin blame src/settlement/ledger.py 5 of 8 lines agent-authored
Line Source Author Model Cost
41 def settle(batch, ledger): r.eberhardt human —
42 total = Decimal(0) r.eberhardt human —
43 for txn in batch.confirmed(): claude-agent-04 sonnet-4.6 $0.004
44 total += txn.amount.quantize(CENTS) claude-agent-04 sonnet-4.6 $0.004
45 audit.record(txn, actor=batch.actor) claude-agent-04 sonnet-4.6 $0.004
46 ledger.post(total) claude-agent-04 sonnet-4.6 $0.002
47 return Ledger.Result(total, batch.id) claude-agent-04 sonnet-4.6 $0.002
48 # reviewed against settlement spec 4.2 m.osei human —
Prompt hash sha256:4f1c…9ae2 Approved by r.eberhardt Merge 8fa21c Exportable for audit
04.1
Recorded at the line
Attribution attaches to each line, not to the pull request, so a later refactor cannot launder its origin.
04.2
Prompt and model
The prompt hash, the model and its version are stored with the change — reproducible months later.
04.3
Cost per change
Inference spend is recorded per line, which is how you find the agent that costs more than it saves.
04.4
Exportable evidence
The ledger exports as an audit artifact, so "was this AI-generated?" has a filed answer.