Git AI Agent
Overview
The Git AI Agent correlates code changes with infrastructure incidents. By analyzing recent commits, pull requests, and file changes, it helps identify whether a code or configuration change caused an issue.
Requirements
- GitHub or GitLab integration configured for the cluster
- See GitHub Integration or GitLab Integration
Capabilities
| Capability | Description |
|---|---|
| List recent commits | View commits in a repository, filtered by time range or branch |
| View PR/MR details | See pull request descriptions, changes, and merge status |
| File blame | Identify who last changed a specific file or line |
| Compare branches | See differences between branches |
| View file contents | Read specific files from the repository |
Use Cases
Change Correlation
During an investigation, the Git Agent identifies deployments and code changes that occurred around the time the alert fired:
- "A Kubernetes manifest change was merged 15 minutes before the alert — deployment resource limits were reduced from 512Mi to 256Mi"
- "A new application version was deployed 30 minutes ago — here are the relevant code changes"
Interactive Queries
In AI Chat, you can ask the Git Agent directly:
What PRs were merged in the last 24 hours?
Who changed the deployment config for api-gateway recently?
Show me the commit that last modified deployment.yaml
Fix Suggestions
When the root cause is traced to a specific code change, the Git Agent can suggest reverting or adjusting the change. See PR Creation.
Next Steps
- GitHub Integration — Connect GitHub
- GitLab Integration — Connect GitLab
- PR Creation — Code-level fix suggestions