{
 "schema_version": 1,
 "generated": "2026-10-19",
 "id": "feder-cr-git-ai--give-each-agent-its-own-token",
 "repo": "feder-cr/git-ai",
 "repo_url": "https://github.com/feder-cr/git-ai",
 "repo_slug": "feder-cr-git-ai",
 "title": "Give every coding agent its own token and branch limits",
 "page_title": "How to give every coding agent its own token and branch limits with git-ai",
 "summary": "Use per-agent tokens, an RPC allowlist and branch policies so each agent can only do what you allow.",
 "who": "Engineering manager who just discovered an agent pushed to a protected branch and wants accountability per agent",
 "problem": "With shared credentials you cannot tell which agent broke something or stop one from touching branches it should not.",
 "outcome": "Each agent has its own identity and permitted actions, and each landed change is logged with the agent that made it.",
 "steps": [
  "Read doc/graft/AGENT-SECURITY.md to see how tokens, the RPC allowlist and branch policies are set",
  "Add per-agent tokens and branch policies to your config.toml",
  "Restart the server and have two agents land changes under different identities",
  "Use the graft CLI to list the changeset log and check each entry shows its actor"
 ],
 "agent_prompt": "In feder-cr/git-ai, follow doc/graft/AGENT-SECURITY.md to create two agent tokens in <config.toml> with different branch policies. Show that one agent is denied on a protected branch, and verify the changeset log records which agent landed each accepted change.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "field",
 "caveat": "Exact config keys for tokens and policies live in the docs, not the README; follow the docs instead of guessing the TOML.",
 "category": "Software & DevOps",
 "tags": [
  "Software & DevOps"
 ],
 "lang": "go",
 "requirements": [
  "Linux or macOS",
  "Go 1.26, a C toolchain, Meson and Ninja (the build compiles a bundled Git)",
  "No paid keys needed; conflict resolution can use any LLM provider, a deterministic tool, or none",
  "SQLite or PostgreSQL plus object storage (file, S3, GCS, Azure) only if you move the repo state off local Git"
 ],
 "risk": "none",
 "seen_in_the_wild": true,
 "best": true,
 "score": 0.708,
 "evidence": [
  {
   "platform": "x",
   "url": "https://x.com/i/web/status/2112319865218314452",
   "posted": "2026-10-19"
  },
  {
   "platform": "x",
   "url": "https://x.com/i/web/status/2112080627617202280",
   "posted": "2026-10-19"
  }
 ],
 "url": "https://dedupedai.com/use-cases/feder-cr-git-ai/give-each-agent-its-own-token/",
 "md": "https://dedupedai.com/use-cases/feder-cr-git-ai/give-each-agent-its-own-token/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly."
}
