Data model
The graph holds Hydra's own nodes and the nodes Hydra copies from each connected source. Each node has a kind, an id and fields. Edges join two nodes with a relation.
An expression reads a node's fields as self.<field> on the node an agent lives on, and as event.subject.<field> on an event's subject. event.old is an Option, so read its fields in a method, as in event.old.map(o => o.<field>). Every kind also has the field id, a String that holds the node id. The syntax is in Expression language. The events that carry a subject are in Events. lives_on in Agent definition takes a kind name from this page.
Names
Hydra's kinds, ids and relations have no prefix. An outside source's kinds, ids and relations start with the source name and /.
| Name | Hydra | Outside source |
|---|
| Kind | issue | linear/issue |
| Node id | i-abcdef | github/owner/repo#123 |
| Relation | child-of | github/for-issue |
An edge has a direction. A pattern writes it from the edge's From node to its To node.
(self)-[child-of]->(parent:issue)
(event.subject)-[github/for-issue]->(self)
The tables below use these types:
timestamp is a String in RFC 3339, such as 2026-10-08T12:00:00.000Z.
Option[T] is a T or null. A field of this type may be absent. An expression reads null and an absent field as None.
An enum lists the strings the field allows, such as "open" | "closed". Hydra reports an error when an expression compares the field with another string.
record is an object. A dotted field, such as github.number, is a field of a record field.
An expression cannot read a field of type map of String to String.
Hydra
A Hydra node id is a prefix and a random string of letters.
| Kind | Id format |
|---|
issue | i-… |
patch | p-… |
document | d-… |
session | c-… |
board | j-… |
label | l-… |
issue
| Field | Type | Description |
|---|
id | String | The issue's id. |
org_id | String | The organization's id. |
type | "bug" | "feature" | "task" | "chore" | "merge-request" | "review-request" | "unknown" | The issue's type. |
title | String | The title. |
description | String | The description. |
status | String | The key of the issue's status on its board. |
board_id | String | The board's id. |
board_key | Option[String] | The board's key. Hydra leaves the field absent when it cannot read the board. |
assignee | Option[Principal] | The assignee's username. |
assignee_user_id | Option[String] | The assignee's user id. |
archived | Boolean | Whether the issue is archived. |
version | Int | The issue's version number, which rises with each change to the issue. |
patch
| Field | Type | Description |
|---|
id | String | The patch's id. |
org_id | String | The organization's id. |
title | String | The title. |
status | "open" | "closed" | "merged" | "unknown" | The patch's status. |
is_automatic_backup | Boolean | Whether the patch is an automatic backup. |
review_summary.count | Int | The number of reviews. |
review_summary.approved | Boolean | Whether a review approved the patch. |
review_summary.changes_requested | Boolean | Whether a review requested changes. |
service_repo_name | String | The repository name in the form owner/repo. |
github | Option[record] | The patch's GitHub pull request. |
github.owner | String | The repository owner. |
github.repo | String | The repository name. |
github.number | Int | The pull request number. |
github.head_ref | Option[String] | The head branch. |
github.base_ref | Option[String] | The base branch. |
github.head_sha | Option[String] | The head commit. |
github.url | Option[String] | The URL of the pull request's page. |
github.ci | Option[record] | The CI state of the pull request's head. |
github.ci.state | "pending" | "success" | "failed" | "unknown" | The CI state. |
github.ci.head_sha | Option[String] | The commit the CI state is for. |
branch_name | Option[String] | The patch's branch. |
base_branch | Option[String] | The branch the patch merges into. |
archived | Boolean | Whether the patch is archived. |
aggregate_review_state | Option["approved" | "changes-requested" | "commented" | "dismissed" | "unknown"] | The aggregate review state. |
version | Int | The patch's version number, which rises with each change to the patch. |
document
| Field | Type | Description |
|---|
id | String | The document's id. |
title | String | The title. |
path | Option[String] | The document's path. |
archived | Boolean | Whether the document is archived. |
version | Int | The document's version number, which rises with each change to the document. |
session
| Field | Type | Description |
|---|
id | String | The session's id. |
session_id | String | The session's id. |
title | Option[String] | The title. |
agent_name | Option[String] | The name of the agent that runs the session. |
agent_instance | Option[record] | The agent instance that runs the session. |
agent_instance.address.actor | String | The agent's name. |
agent_instance.incarnation | Int | The instance's incarnation. |
version | Int | The session's version number, which rises with each change to the session. |
board
| Field | Type | Description |
|---|
id | String | The board's id. |
org_id | String | The organization's id. |
key | String | The board's key. |
name | String | The display name. |
statuses | List[record] | The board's statuses in display order. |
statuses.key | String | Each status's key. |
statuses.label | String | Each status's display name. |
statuses.color | String | Each status's color as #rrggbb. |
statuses.unblocks_parents | Boolean | Whether an issue that enters the status unblocks its parents. |
archived | Boolean | Whether the board is archived. |
description_path | Option[String] | The path of the board's description document. |
priority | Double | The number that boards sort by, in ascending order. |
version | Int | The board's version number, which rises with each change to the board. |
label
| Field | Type | Description |
|---|
id | String | The label's id. |
label_id | String | The label's id. |
name | String | The name. |
color | String | The color as #rrggbb. |
recurse | Boolean | Whether attaching the label to an issue can also attach it to the issue's descendants. |
hidden | Boolean | Whether the label is hidden. |
version | Int | The label's version number, which rises with each change to the label. |
Hydra relations
| Relation | From | To | Meaning |
|---|
child-of | issue | issue | The issue is a child of the target issue. |
blocked-on | issue | issue | The issue waits on the target issue. |
related-to | issue, session | issue, session | The two nodes are related. |
has-patch | any kind | patch | The patch belongs to the node. |
has-document | any kind | document | The document belongs to the node. |
has-session | issue | session | The issue spawned the session. |
spawned-from | session | any kind | The session was spawned from the target. |
refers-to | session | issue, patch, document | The session wrote the target. |
has-label | issue, patch, document, session, board | label | The node has the label. |
GitHub
| Kind | Id format |
|---|
github/pr | github/<owner>/<repo>#<number> |
github/check-run | github/<owner>/<repo>/check-runs/<id> |
github/review | github/<owner>/<repo>#<number>/reviews/<id> |
github/status | github/<owner>/<repo>/statuses/<sha>/<context> |
github/user | github/users/<id>, where <id> is GitHub's numeric user id |
github/pr
| Field | Type | Description |
|---|
id | String | The node id. |
repo | String | The repository name in the form owner/repo. |
number | Int | The pull request number. |
title | String | The title. |
state | "open" | "closed" | "merged" | The pull request's state. A draft pull request also has one of these states. |
draft | Boolean | Whether the pull request is a draft. |
head_branch | String | The head branch. |
base_branch | String | The base branch. |
head_sha | String | The head commit. |
author | String | The author's login. |
created_at | timestamp | The time the author opened the pull request. |
updated_at | timestamp | The time the pull request last changed. |
merged_at | Option[timestamp] | The time the pull request was merged. |
closed_at | Option[timestamp] | The time the pull request was closed. |
url | Option[String] | The URL of the pull request's page. |
additions | Option[Int] | The number of lines the pull request adds. |
deletions | Option[Int] | The number of lines the pull request deletes. |
files_changed | Option[Int] | The number of files the pull request changes. |
github/check-run
| Field | Type | Description |
|---|
id | String | The node id. |
name | String | The check's name. |
status | String | GitHub's status, such as in_progress. |
conclusion | Option[String] | GitHub's conclusion, such as timed_out. |
head_sha | String | The commit the check ran on. |
url | Option[String] | The URL of the check run's page. |
github/review
| Field | Type | Description |
|---|
id | String | The node id. |
state | String | GitHub's state, such as approved or changes_requested. |
url | String | The URL of the review's page. |
submitted_at | Option[timestamp] | The time the reviewer submitted the review. The value is null for a pending review. |
github/status
| Field | Type | Description |
|---|
id | String | The node id. |
context | String | The status's context. |
state | String | GitHub's state, such as success or error. |
head_sha | String | The commit the status is on. |
url | Option[String] | The status's target_url from GitHub. |
github/user
| Field | Type | Description |
|---|
id | String | The node id. |
login | String | The login. |
avatar_url | Option[String] | The URL of the avatar image. |
kind | String | GitHub's account type, such as user, bot or organization. |
GitHub relations
| Relation | From | To | Meaning |
|---|
github/for-issue | github/pr | issue | The pull request's head branch names the Hydra issue. |
github/authored-by | github/pr | github/user | The user opened the pull request. |
github/check-of | github/check-run | github/pr | The check ran on the pull request. |
github/status-of | github/status | github/pr | The pull request's checks listed the status. |
github/review-of | github/review | github/pr | The review is on the pull request. |
github/reviewed-by | github/review | github/user | The user wrote the review. |
Check runs and statuses on older commits keep their edge to the pull request.
Linear
Every Linear kind has the id format linear/<uuid>, where <uuid> is Linear's id.
| Kind | Id format |
|---|
linear/issue | linear/<uuid> |
linear/project | linear/<uuid> |
linear/comment | linear/<uuid> |
linear/user | linear/<uuid> |
linear/workflow-state | linear/<uuid> |
linear/project-status | linear/<uuid> |
linear/issue
| Field | Type | Description |
|---|
id | String | The node id. |
identifier | String | The issue's key, such as ENG-1. |
title | String | The title. |
url | String | The URL of the issue's page in Linear. |
team | String | The team's key. |
state | String | The team's name for the workflow state. |
state_type | String | Linear's type of the state, such as started. |
priority | Int | The issue's priority, from 1 (urgent) to 4 (low), or 0 for no priority. |
assignee | Option[String] | The assignee's name. |
assignee_id | Option[String] | The assignee's uuid. |
creator | Option[String] | The creator's name. |
labels | List[String] | The names of the issue's labels. |
project_id | Option[String] | The project's uuid. |
parent_id | Option[String] | The parent issue's uuid. |
created_at | timestamp | The time the issue was created. |
updated_at | timestamp | The time the issue last changed. |
completed_at | Option[timestamp] | The time the issue was completed. |
canceled_at | Option[timestamp] | The time the issue was canceled. |
description | Option[String] | The first 8 KiB of the description. |
description_truncated | Boolean | Whether Hydra cut the description to 8 KiB. |
linear/project
| Field | Type | Description |
|---|
id | String | The node id. |
name | String | The name. |
url | String | The URL of the project's page in Linear. |
state | String | The name of the project's status. |
lead | Option[String] | The lead's name. |
target_date | Option[String] | The target date, as YYYY-MM-DD. |
teams | List[String] | The keys of the project's teams. |
created_at | timestamp | The time the project was created. |
updated_at | timestamp | The time the project last changed. |
| Field | Type | Description |
|---|
id | String | The node id. |
issue_id | String | The issue's uuid. |
author | Option[String] | The author's name. |
created_at | timestamp | The time the author posted the comment. |
updated_at | timestamp | The time the comment last changed. |
body | String | The first 2 KiB of the body. |
truncated | Boolean | Whether Hydra cut the body to 2 KiB. |
url | Option[String] | The URL of the comment in Linear. |
linear/user
| Field | Type | Description |
|---|
id | String | The node id. |
name | String | The name. |
avatar_url | Option[String] | The URL of the avatar image. |
is_hydra_app | Boolean | Whether Hydra's Linear app acts as this user. The field is present only when its value is true. |
linear/workflow-state
| Field | Type | Description |
|---|
id | String | The node id. |
name | String | The name, such as In Review. |
color | Option[String] | The color as #rrggbb. |
linear/project-status
| Field | Type | Description |
|---|
id | String | The node id. |
name | String | The name, such as In Progress. |
color | Option[String] | The color as #rrggbb. |
Linear relations
| Relation | From | To | Meaning |
|---|
linear/child-of | linear/issue | linear/issue | The issue is a sub-issue of the target issue. |
linear/in-project | linear/issue | linear/project | The issue is in the project. |
linear/in-state | linear/issue | linear/workflow-state | The issue is in the workflow state. |
linear/assigned-to | linear/issue | linear/user | The user is the assignee. |
linear/created-by | linear/issue | linear/user | The user created the issue. |
linear/comment-on | linear/comment | linear/issue | The comment is on the issue. |
linear/authored-by | linear/comment | linear/user | The user wrote the comment. |
linear/led-by | linear/project | linear/user | The user leads the project. |
linear/has-status | linear/project | linear/project-status | The project has the status. |
An edge can point at a user, workflow state or project status that Hydra has not stored yet.
Grafana
| Kind | Id format |
|---|
grafana/alert | grafana/<fingerprint> |
grafana/alert
| Field | Type | Description |
|---|
id | String | The node id. |
fingerprint | String | Grafana's fingerprint of the alert. |
status | "firing" | "resolved" | The alert's status. |
alertname | Option[String] | The alert's name. |
folder | Option[String] | The folder of the alert rule. |
rule_uid | Option[String] | The alert rule's uid. |
labels | map of String to String | The alert's labels. |
annotations | map of String to String | The alert's annotations, without Grafana's __-wrapped ones. |
starts_at | String | The time the alert started, in the form Grafana sent. |
ends_at | Option[String] | The time the alert ended, in the form Grafana sent. |
generator_url | Option[String] | The URL of the alert rule's page. |
silence_url | Option[String] | The URL of the page that silences the alert. |
dashboard_url | Option[String] | The URL of the dashboard's page. |
panel_url | Option[String] | The URL of the panel's page. |
silenced | Boolean | Whether the alert is silenced. |
Grafana alerts have no relations.