Git AI

Custom Background Agents

Track code from custom background agents with Git AI telemetry and attribution.

Many engineering teams, some inspired by the Ramp blog post are building their own internal background agents. These agents are tailored to their codebases and workflows — wrapping Claude Code, OpenCode, or other harnesses to run autonomously in sandboxed environments. Git AI tracks code from these agents the same way it tracks local sessions: through agent hooks and git notes for attribution.

Setting git authors

We suggest configuring the git author on each sandbox to the human engineer who started the agent and will own the resulting code.

git config user.name "Ada Lovelace"
git config user.email "ada@example.com"

When programmatically opening pull requests, it is ok to use the human identity or a dedicated app identity for the agent.

Headless harness telemetry

To collect the same telemetry from a custom background agent as from a local Git AI installation, install Git AI in the sandbox and hook it into the harness.

  1. Install Git AI on the machine:
curl -fsSL https://raw.githubusercontent.com/git-ai-project/git-ai/refs/heads/main/install.sh | bash
  1. Install your coding harness of choice (Claude Code, OpenCode, etc.).

  2. Run install-hooks to wire Git AI into the harness:

git ai install-hooks
  1. (Optional) Set custom metadata to tag sessions with attributes specific to the background agent:
export GIT_AI_CUSTOM_ATTRIBUTES='{"agent":"our-agent","version":"10.1.1"}'

GIT_AI_CUSTOM_ATTRIBUTES accepts a JSON object. These key-value pairs appear alongside session data in the Git AI dashboard, making it possible to filter and compare runs across agent versions, trigger sources, or any other dimension.

Enhanced telemetry

Teams and Enterprise customers can collect additional live telemetry from running Git AI sessions by adding a telemetry-write scoped API key to the sandbox environment:

GIT_AI_API_KEY=<api_key>
GIT_AI_CLOUD_AGENT=1

Set both variables in the sandbox's secrets or environment configuration so they are available when the agent session starts. With the key in place, Git AI streams checkpoint and authorship data to the dashboard in real time — no extra configuration required.