Give Agents Context
The PR Review agent from Build Your First Agent reads code well, but it does not know your system. It cannot say which team owns a service, or which services break when that service changes. In this track, you put this knowledge into the Context Graph. Then you tell the agent to read it. At the end, each review starts with the changed service and its owner team. It also names the services that it calls and the services that call it.
| Page | You do | You learn |
|---|---|---|
| 1. Look at the Context Graph | Open the Context Graph and read it from the CLI. | Entities, blueprints, relations, and the Context Graph zone |
| 2. Add your services | Add three services, an owner team and the dependencies between them. | How to create entities and relations, and what Sources do |
| 3. Use the graph in an agent | Make the PR Review agent read the graph, and run it on a pull request. | The Context Graph tools, the context_graph field, labels, and git_clone |
The track takes about 40 minutes.
Before you start
- Do the Quick Start, Build Your First Agent chapters 1 to 3, and steps 1 and 3 of chapter 4. The agent must clone the repository and have the read-only tool filters. These steps need no GitHub Integration Connection. You need the
pr-reviewagent and thereview-rulesskill in your project. - To add entities, you need permission to create and edit entities in the Context Graph. A Project Admin has it. If you are a Member, ask a Project Admin to do page 2, or check your role in Roles.
- The examples use the Astronomy Shop, a small online store made of many services. The example pull request is autohealai/astronomy-shop-template#1. It adds a timeout to the call from the recommendation service to the product catalog service. You do not need a GitHub Integration Connection, because the repository is public.
- For the "From the CLI" steps, install the
autohealCLI and log in. See chapter 8.