Skip to main content

6. Use Commits and Branches

Each agent and skill is a folder in the project's Git repository. Each change is a commit, and a branch keeps a change away from other people until you choose. In this chapter, you add a teammate, read the agent's history, and try a change on a branch.

Branches cannot be merged yet. To keep a change from a branch, make the same change on main.

Roles​

RoleGiven onCan do
Read-onlyOrganization or projectSee agents, runs, artifacts and settings. Cannot change anything.
MemberProjectChange and run agents. Create and change triggers. Approve an agent's tool requests. Cannot delete, manage integrations or manage people.
Project AdminOrganization or projectEverything in the project, also integrations, deletes and members.
Org AdminOrganizationUsers, groups, projects, SSO and secrets. Cannot change project content: an Org Admin who changes agents also needs a project role.

See Roles & Permissions for every permission.

Step 1: Add a teammate​

You must be a Project Admin for this step. Go to Settings → Access → IAM and click Grant access. In Principals, add a person or a group. In Roles, select Member, and click Save. See Manage access.

People who sign in through SSO for the first time get the Member role on the Default Project.

Step 2: Read the agent's history​

Go to Agent Studio → Agents, open PR Review, and open the History tab. Each row is one commit that changed the agent, with its author, its time and its message. Check that you see the commits from the earlier chapters.

Step 3: Make a branch​

Click the branch button at the top of the Agent Studio sidebar, and select New branch from main. In Branch name, type rule-checklist, and click Create branch. Make sure that the branch button now shows rule-checklist.

Open skills/review-rules/SKILL.md in the editor. Add this line above the ## Example heading, and commit:

MARKDOWN
End the review with a checklist: each rule, with pass or fail.

The change is on rule-checklist only. main does not change.

Step 4: Try the change​

Run the agent while the branch button shows rule-checklist. A run uses the agent as it is on the current branch. Check that the review ends with a checklist of the rules. Then switch the branch button to main, run the agent with the same prompt, and compare the two reviews.

Triggers continue to use main, or the branch that they name in run.branch. Your change does not reach them.

Step 5: Keep the change​

Branches cannot be merged yet. To keep the change, make the same change on main and commit it.

One team or many​

  • One team, one project. A second team with its own agents, Integration Connections and people gets its own project.
  • To use one GitHub organization or one Grafana in more than one project, share the Integration Connection. Do not connect the same system two times.
  • Each change is a commit with an author. The agent's History tab shows who changed what and when.
  • The Demo project is read-only for everyone. An Org Admin can hide it in the org settings.

From the CLI​

BASH
autoheal agents history pr-review
autoheal branches create rule-checklist
# change skills/review-rules/SKILL.md on the branch in the web app
autoheal run pr-review "https://github.com/autohealai/astronomy-shop-template/pull/1" --branch rule-checklist --follow