Skip to main content

Quick Start

In about 10 minutes, you create an agent that reviews a pull request, run it on a real pull request, and read what it did. You need an Autoheal account and a browser. You do not need an integration or the CLI.

Autoheal runs AI agents for the work that comes after you write code: release notes, pull request review, deploy checks, dependency upgrades and cost checks. You describe an agent in a short YAML file. Then you give it skills and tools, and you start it by hand or when an event occurs.

Choose how you work​

All three paths build the same agent. This page uses the web app, because it works on any computer with a browser, also on managed laptops and virtual desktops.

If you use a coding agent, you can give it this prompt and let it do the steps:

Install the Autoheal CLI (https://docs.autoheal.ai/cli), run `autoheal login`,
then `autoheal skill install`. Then follow https://docs.autoheal.ai/quickstart
to build a PR Review agent in my Default Project, and show me the run.

Before you start​

  • An Autoheal account. Your admin sends you an invitation, or you sign in at your organization's Autoheal address, for example https://<your-org>.autoheal.ai.
  • The Member or Project Admin role on your Default Project. New users get Member on the Default Project. See Roles & Permissions.

Step 1: Look at a finished run​

Before you build an agent, look at what an agent run shows.

  1. Open the Demo project

    Click the project picker at the top left and select Demo. The Demo project is read-only. You can open its agents, runs and artifacts, but you cannot change them or start runs.

  2. Open a run

    Open Runs and select a Deploy Verification run.

  3. Read the run

    The Summary tab shows the agent's answer and its artifacts. The Transcript tab shows what the agent did, step by step, with each tool call and what it returned.

If the project picker has no Demo project, go to step 2. An Org Admin can hide the Demo project, and installations in your own cloud do not have it.

Step 2: Create the agent​

  1. Go to your project

    Click the project picker and select your Default Project.

  2. Create a blank agent

    Go to Agent Studio → Agents and click Create agent. Type pr-review as the agent name, and click Create blank. If the dialog shows only Create, click Create.

    The editor opens agents/pr-review/agent.yaml.

  3. Write the agent

    Replace the content of agent.yaml with this:

    YAML
    apiVersion: agents.autoheal.ai/v1
    name: PR Review
    instructions: |
    You review one pull request on a public GitHub repository.
    The prompt has the pull request URL.
    Add `.diff` to the URL and download it with `curl -sL` in your shell.
    Read the diff. Then write three things:
    1. A verdict: merge, merge with changes, or do not merge.
    2. The riskiest change, with its file.
    3. One question for the author.
    Only read. Do not comment on the pull request and do not push.
  4. Commit

    In the Changes panel, click Commit changes, type a message if you want one, and click Commit 1 file. Other people in the project see your change only after you commit it.

The folder name, pr-review, is the agent's ID. The name field is the name that people see.

Step 3: Run the agent​

The agent needs a pull request to review. This page uses a sample pull request in autohealai/astronomy-shop-template, a public sample shop that has many small services. The pull request adds a time limit to a call from one service to another service. Its author left four problems in it on purpose. See how many of them your agent finds.

  1. Open the agent

    Go to Agent Studio → Agents and open PR Review. The Overview tab shows What should the agent do?

  2. Type the prompt

    Paste this URL and click Start run (the arrow button):

    https://github.com/autohealai/astronomy-shop-template/pull/1

Step 4: Read the run​

The run page opens. The run takes about one minute. When the run ends, the Summary tab shows the review. Check that the review has these parts:

  • A verdict: merge, merge with changes or do not merge.
  • The riskiest change, in the file src/recommendation/recommendation_server.py.
  • One question for the author.

Open the Transcript tab. Find the bash call with the curl command. In that call, the agent downloads the diff in its sandbox.

The pull request has these four problems:

  • The code gives a time in milliseconds to a call that expects seconds.
  • The README names the setting differently from the code.
  • The code hides every error from the other service.
  • The change has no test.

A first agent usually finds two or three of them. In the next chapters, the agent learns to find all four.

Then run the agent on a different pull request, for example an open pull request in a public repository that you know.

If a review is wrong or too long, change the instructions, commit, and run the agent again. Most agents get better in two or three changes.

What happened​

  • Your agent is a folder in your project's Git repository. Autoheal keeps each commit, so you can see who changed what.
  • The run used your organization's default model, because the agent does not name a model.
  • The agent had Autoheal's built-in tools, such as a shell in an isolated sandbox. It used the shell to download the diff. It did not need an Integration Connection, because the repository is public.
  • The sandbox needs internet access to github.com. If the download fails, ask your admin if agent sandboxes can reach the internet.

You can stop here. To continue, go to Build Your First Agent. Its chapters add an input, a model, a skill with your team's review rules, tools and a trigger to this agent. Key Concepts shows how agents, skills, tools, triggers and projects fit together.

Next steps​