Skip to main content

1. Look at the Context Graph

The Context Graph holds what Autoheal knows about your engineering system: services, teams, people, repositories, and how they connect. Agents read it during a run. Skills, memories, agents and runs are also in the graph, so you can see how they connect to your services.

Step 1: Open the Context Graph zone​

In the sidebar, click Context Graph. The zone has these pages:

PageWhat it shows
GraphThe entities and their relations, as a graph or as a table.
MemoriesWhat agents learned in past runs. You approve each memory before agents use it.
Sources (under Setup)The integrations that add entities to the graph, and when they sync.
Blueprints (under Setup)The kinds of entity, with their fields and relationships.
Labels (under Setup)The label keys that your resources use.

Click Graph. A new project can have few entities. Usually you see people, your recent runs and your Integration Connections. If the project has no entities, the page shows "This project's context graph is empty".

Step 2: Learn the three parts​

  • An entity is one thing: the recommendation service, the shop-backend team, or a person. Each entity has a name that never changes, a title for people to read, and properties such as a description.
  • A blueprint is a kind of entity. It sets the properties and relations that an entity of that kind can have. The Service blueprint (service) has a description, a primary language and a tier.
  • A relation connects two entities. The blueprint names each relation and sets its target. The Service blueprint has three relations:
Relation keyTitleTargetTargets
ownerOwner TeamteamOne
depends_onDependenciesserviceMany
contributorsContributorspersonMany

depends_on goes from the service that calls to the service that it calls. If recommendation calls product-catalog, then recommendation depends on product-catalog. The services that depend on a service are its dependents. A change to a service can break its dependents.

Go to Context Graph → Blueprints. Find Service, and expand its schema. Check that it shows the fields and the three relationships in the table.

Step 3: Read the graph from the CLI​

The CLI reads the same graph. Set your project first:

BASH
export AUTOHEAL_PROJECT=<your project>

List the blueprints, and read the Service blueprint in full:

BASH
autoheal context-graph blueprints list
autoheal context-graph blueprints get service

Read an overview of the project's graph. The second command shows only service and team entities:

BASH
autoheal context-graph overview
autoheal context-graph overview --node-kinds catalog_entity --blueprints service,team

The output has nodes and edges. Each node has a key in the form <kind>:<id>. An entity is kind catalog_entity. Other kinds are integration, skill, agent, memory, artifact and run. Each edge connects two node keys.

Find a node by its name or title, and read the graph around it:

BASH
autoheal context-graph nodes --search <text>
autoheal context-graph neighborhood --root-kind catalog_entity --root-id <id> --depth 1

Run autoheal context-graph overview. Check that the output has a nodes list, and that each node has a key and a kind.

What to know​

  • Each project has its own Context Graph. People and agents in other projects do not see it.
  • A blueprint can come from Autoheal (service, team, person, repository), from an integration (for example github_repository), or from your organization (a custom blueprint).
  • An integration blueprint maps to a system blueprint. A filter on repository also finds github_repository entities.
  • An edge of kind catalog_relation comes from a relation. An edge of kind label_association comes from a label. You add a label in page 3.
  • The overview returns at most 2,000 nodes and 6,000 edges. Each blueprint gets a fair share, so many repositories do not push services and teams out. When it returns fewer than the graph has, truncation.truncated is true.
  • autoheal context-graph link <node key> ... prints a link to the Graph page that shows only those nodes.

From the CLI​

BASH
autoheal context-graph blueprints list
autoheal context-graph overview --node-kinds catalog_entity --blueprints service,team
autoheal context-graph nodes --search <text>

See Explore and edit entities and Blueprints.