docs/en/studio/ai-agent-git-integration.md
//[doc-seo]
{
"Description": "Technical reference for ABP Studio AI Agent Git integration, AI Review, changed-file prompting, commit messages, merge conflicts, and GitHub issue or pull request handoff."
}
//[doc-nav]
{
"Next": {
"Name": "Coding with AI Agent",
"Path": "studio/coding-with-ai-agent"
}
}
ABP Studio integrates AI Agent features into the Git and GitHub workflow. The integration uses selected files, staged or working-tree diffs, review notes, GitHub issue/PR context, and image attachments to build prompts for dedicated AI review or coding sessions.
AI Review runs from the Git panel against selected changed files. It is a dedicated review flow, separate from the normal Agent chat.
AI Review:
The review model is selected from the Git Review Model setting. When configured as "Ask me every time", Studio shows a model picker before starting the review.
AI Review focuses on changed lines. Surrounding code can be used to understand context, but suggestions are attached to changed lines.
The reviewer checks for:
Generated files such as migrations can be skipped by the reviewer when they are recognized as generated output.
AI Review suggestions have one of the following severities:
| Severity | Meaning |
|---|---|
| Error | A likely bug, crash, security issue, data loss risk, or other high-priority defect. |
| Warning | A potential production issue, bad practice, ABP convention violation, or maintainability problem. |
| Info | A lower-priority design or naming issue worth considering. |
| Confirmation | Positive confirmation for exceptional code. Limited to rare cases. |
The Git panel can store user notes and AI suggestions against files and lines. Review content is used in two ways:
Blocking review content includes user notes and AI suggestions with severities other than Info and Confirmation.
The Git panel can send review findings to AI Agent. Studio builds a prompt that includes:
Confirmation suggestions are excluded. Info suggestions are treated as optional context; warning and error suggestions are emphasized.
The prompt instructs the agent to implement the requested changes, not only explain them.
Commit message generation uses selected file diffs and the Text Processor Model. It skips binary files and truncates large diffs before sending them to the model.
The generator returns a concise past-tense commit message. It is intended to summarize the selected changes, not the whole repository state.
When unresolved merge conflicts exist, the Git panel can send the conflict list to AI Agent. The generated prompt asks the agent to resolve conflicts and request clarification when the correct resolution is ambiguous.
Conflict handoff can use the current session or create a new session. It starts with analysis skipped so the prompt is centered on the conflict files.
GitHub issue details can be sent to AI Agent from Studio when GitHub integration is connected.
The generated issue prompt includes:
Comments can be excluded from the AI prompt. Images that belong to excluded comments are not attached. The prompt instructs the agent to solve the issue by making the necessary code changes.
Pull request details can be sent to AI Agent when the current branch matches the PR branch.
The generated PR prompt includes:
Reviews, comments, and requested changes can be excluded from the AI prompt. Only included items are sent.
GitHub issue and PR handoff can attach downloaded images to the agent prompt. The prompt text annotates image references with the corresponding attached file name so the model can connect the image file to the original issue, comment, or review context.
Image handling still depends on the selected model's image support. If the model does not support images, the normal attachment restrictions apply.
Agent URL fetching can enrich GitHub URLs with issue or pull request information when GitHub integration is available. Pull request URL context can include review comments up to Studio's fetch limits.
This is separate from the explicit GitHub issue/PR "Send to AI Agent" actions in the Git UI.