# get\_agent

Get one agent by id, archived or not, with its prompt in full.

read-only · idempotent · MCP tool · [Agent](https://komrad.dev/latest/api/agent.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.agent.v1.AgentService/GetAgent \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "<id>"
}'
```

```bash
komrad rpc get-agent \
  --id '<uuid>'
```

```json
{
  "name": "get_agent",
  "arguments": {
    "id": "<id>"
  }
}
```

Offered by the komrad MCP server to writer, reviewer, orchestrator agents.

## Request

### GetAgentRequest

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentRequest-id) | uuid\* | The agent to get, by id. Archived agents are included. |

## Response

### GetAgentResponse

| Field | Type | Description |
| --- | --- | --- |
| [`agent`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-agent) | [Agent](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent) | The agent, with the prompt in full. |
| [`unread_mail`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-unread_mail) | bool | Whether mail is waiting that the agent has not read. |
| [`pull_request`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-pull_request) | [PullRequestStanding](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding) | The state of the current pull request from the agent's branch. |
| [`pull_requests`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-pull_requests) | [PullRequest\[\]](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest) | Every pull request from the agent's branch, the current one first. |
| [`local_review_snapshots`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-local_review_snapshots) | int32 | How many review snapshots the agent's work has. |
| [`reviewer_comments`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-reviewer_comments) | [CommentCounts](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts) | The comments reviewers have left on the agent's work. Unset while there are none. |
| [`person_comments`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-person_comments) | [CommentCounts](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts) | The comments the person has left on the agent's work. Unset while there are none. |
| [`task`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-task) | [Task](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task) | The agent's task. Unset for an agent on no task. |
| [`forge_comments`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-GetAgentResponse-forge_comments) | [CommentCounts](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts) | The comments copied from the forge onto the agent's work. Unset while there are none. |

## Types

### Agent

Agent is one CLI conversation that komrad runs in a pane and tracks.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-id) | uuid\* | The agent's id. Mail is addressed to it. |
| [`name`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-name) | string | The agent's name. It is also the agent's tmux window name at launch. |
| [`cwd`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-cwd) | string | The directory of the agent's checkout. |
| [`flags`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-flags) | string | The command-line flags the agent's CLI started with. |
| [`prompt`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-prompt) | string | The agent's prompt. |
| [`pane_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-pane_id) | string | The tmux pane the agent's CLI runs in. |
| [`state`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-state) | [AgentState](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState) | What komrad last read the agent to be doing. |
| [`session_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-session_id) | string | The CLI's own id for the agent's conversation. A resume needs it. |
| [`harness`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-harness) | string | The harness the agent runs, such as `claude` or `codex`. |
| [`workflow_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-workflow_id) | uuid\* | The id of the workflow the agent belongs to. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-created_at) | timestamp | When the agent was created. |
| [`archived_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-archived_at) | timestamp | When the agent was archived. Unset while the agent is live. |
| [`schedule_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-schedule_id) | uuid | The id of the schedule that created the agent. Unset when a person or an agent created it. |
| [`alive`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-alive) | bool | Whether the agent's pane exists. A dormant agent has none. |
| [`idempotency_key`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-idempotency_key) | string | The idempotency key the agent's create carried. |
| [`spawned_by_agent_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-spawned_by_agent_id) | uuid | The id of the agent that created this agent. Unset when the person created it. |
| [`failed_run`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-failed_run) | bool | Whether a hook run for the agent failed and the person has not opened its log since. |
| [`failed_run_log`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-failed_run_log) | int32 | The id of the log of the agent's failed hook run. Unset when no run failed. |
| [`state_changed_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-state_changed_at) | timestamp | When the agent's state last changed. |
| [`reported_reason`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-reported_reason) | string | What the agent's CLI hooks last reported the agent doing. |
| [`failure_reason`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-failure_reason) | string | Why the agent's create or cleanup last failed. Empty when neither has failed. |
| [`turn_error`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-turn_error) | string | What the CLI printed when an API error ended the agent's last turn. Empty when that turn did not fail. |
| [`role`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-role) | [AgentRole](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentRole) | What the agent was launched to do. |
| [`task_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-task_id) | uuid | The id of the agent's task. Unset for an orchestrator, or once the task is deleted. |
| [`task_slug`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-task_slug) | string | The slug of the agent's task. Unset whenever [`task_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-task_id) is. |
| [`provision_disabled`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-provision_disabled) | bool | Whether the agent was told to work in the workflow's directory instead of a worktree. |
| [`hooks`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-hooks) | string\[\] | The CLI hooks the agent's latest launch installed, as the CLI names its events. Empty when that launch failed or never ran. |
| [`turn_ended_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-turn_ended_at) | timestamp | When the agent's last turn ended. Unset until its first turn ends. |
| [`turn_failure_kind`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-turn_failure_kind) | [TurnFailureKind](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-TurnFailureKind) | Why an error ended the agent's last turn. Unspecified when that turn did not fail. |
| [`turn_retries`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-turn_retries) | int32 | How many times komrad has retried the agent's failed turns since a turn last ended without an error. |
| [`turn_retry_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-Agent-turn_retry_at) | timestamp | When komrad next retries the agent's failed turn. Unset when no retry is waiting. |

### PullRequestStanding

PullRequestStanding is the current pull request from an agent's branch.

| Field | Type | Description |
| --- | --- | --- |
| [`state`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-state) | [PullRequestState](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState) | The state of the current pull request. [`unread`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-unread) means komrad has not read the repository yet, and [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-none) means the branch has no pull request, or the checkout has moved past a finished one. |
| [`number`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-number) | int32 | The current pull request's number. Unset for `unread` and `none`. |
| [`url`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-url) | string | The current pull request's web address. Unset for `unread` and `none`. |
| [`title`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-title) | string | The current pull request's title. Unset for `unread` and `none`. |
| [`merge_readiness`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-merge_readiness) | [MergeReadiness](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness) | Whether the forge would merge the current pull request. Unspecified for `unread` and `none`. |
| [`head_sha`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-head_sha) | string | The commit at the head of the current pull request on the forge. Unset for `unread` and `none`. |
| [`forge`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-PullRequestStanding-forge) | [Kind](https://komrad.dev/latest/api/agent/get-agent.md#komrad-forge-v1-Kind) | The kind of forge the current pull request is on. Unspecified for `unread` and `none`. |

### PullRequest

PullRequest is a pull request as komrad last read it from the forge.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-id) | uuid\* | The pull request's id. |
| [`forge`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-forge) | [Kind](https://komrad.dev/latest/api/agent/get-agent.md#komrad-forge-v1-Kind) | The kind of forge the pull request is on. |
| [`provider_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-provider_id) | string | The forge's own stable id for the pull request, such as GitHub's `node_id`. |
| [`url`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-url) | string | The pull request's web address. |
| [`repository_url`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-repository_url) | string | The web address of the repository the pull request merges into. |
| [`head_repository_url`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-head_repository_url) | string | The web address of the repository the pull request's branch is in. Empty when the forge no longer has that repository. |
| [`number`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-number) | int32 | The pull request's number, unique within its repository. |
| [`title`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-title) | string | The pull request's title. |
| [`head_branch`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-head_branch) | string | The branch the pull request merges from. |
| [`head_sha`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-head_sha) | string | The commit at the tip of the pull request's branch. |
| [`base_branch`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-base_branch) | string | The branch the pull request merges into. |
| [`base_sha`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-base_sha) | string | The commit at the tip of the branch the pull request merges into. |
| [`draft`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-draft) | bool | Whether the pull request is a draft. |
| [`state`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-state) | [PullRequestState](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState) | The pull request's state. |
| [`opened_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-opened_at) | timestamp | When the pull request was opened. |
| [`changed_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-changed_at) | timestamp | When the pull request last changed on the forge. |
| [`merged_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-merged_at) | timestamp | When the pull request merged. Unset until the pull request merges. |
| [`closed_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-closed_at) | timestamp | When the pull request closed, merged or not. Unset while the pull request is open. |
| [`merge_readiness`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-merge_readiness) | [MergeReadiness](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness) | How close the forge is to merging the pull request. |
| [`author`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-author) | string | The login of the pull request's author. Empty when the forge no longer has the account. |
| [`body`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequest-body) | string | The pull request's description. Empty when it has none. |

### CommentCounts

CommentCounts counts the comments on an agent's work.

| Field | Type | Description |
| --- | --- | --- |
| [`open`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts-open) | int32 | How many comments are not resolved, on any snapshot. |
| [`resolved`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts-resolved) | int32 | How many comments are resolved, on snapshots that have not landed. |
| [`unread`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-CommentCounts-unread) | int32 | How many comments hold a reply the person has not read. |

### Task

Task is one piece of work that agents do.

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-id) | uuid\* | The task's id. |
| [`workflow_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-workflow_id) | uuid\* | The id of the workflow the task belongs to. |
| [`slug`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-slug) | string | The task's slug, such as `fix-login`. No two tasks ever share one. |
| [`title`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-title) | string | The task's title. |
| [`goal`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-goal) | string | What the task is meant to achieve, in markdown. |
| [`created_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-created_at) | timestamp | When the task was created. |
| [`updated_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-updated_at) | timestamp | When the task last changed. |
| [`archived_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-archived_at) | timestamp | When the task was archived. Unset while the task is live. |
| [`cwd`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-cwd) | string | The directory of the task's checkout. Unset while the task has no checkout. |
| [`branch`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-branch) | string | The git branch of the task's checkout. Unset when the task has no checkout or git cannot read the branch. |
| [`repository_url`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-repository_url) | string | The canonical web address of the repository the task's checkout pushes to, such as `https://github.com/harrisoncramer/komrad`. Unset when the checkout is gone or origin is not on a forge. |
| [`head_sha`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-head_sha) | string | The commit checked out in the task's checkout. Unset when the checkout is gone or git cannot read it. |
| [`worktree_removal_reason`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-worktree_removal_reason) | [WorktreeRemovalReason](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-WorktreeRemovalReason) | Why the task's worktree is no longer on disk. Unspecified while it is. |
| [`sequence`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-sequence) | [Sequence](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence) | The git operation stopped part way in the task's checkout. |
| [`moved_since_snapshot`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-moved_since_snapshot) | string | The commit of the task's newest snapshot, set while the checkout has changed since that snapshot. Empty otherwise. |
| [`diff_stat`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-diff_stat) | [DiffStat](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-DiffStat) | How many lines the task's checkout adds and removes since it left the base branch. Unset when there is no base branch to measure against. |
| [`adopted_branch`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-adopted_branch) | string | The existing branch the task was put on. Unset when komrad created the branch. |
| [`failure_reason`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-failure_reason) | string | Why the task's last delete failed to remove its checkout. Empty unless a delete failed. |
| [`notes`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-notes) | string | The task's notes, in markdown, written by its agents and the person. |
| [`notes_updated_at`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-notes_updated_at) | timestamp | When the task's notes were last written, or when the task was created if they never were. |
| [`parent`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-parent) | [Parent](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent) | The task this task depends on. Unset for a task on the workflow's base branch. |
| [`snapshots`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-snapshots) | int32 | How many snapshots komrad has taken of the task's checkout. |
| [`guides`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Task-guides) | int32 | How many guides agents have written for the task. [`list_guides`](https://komrad.dev/latest/api/guide/list-guides.md) returns them. |

### MergeReadiness

MergeReadiness is how close a pull request's head commit is to merging.

| Field | Type | Description |
| --- | --- | --- |
| [`decision`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-decision) | [ReviewDecision](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision) | The forge's review decision. |
| [`checks`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-checks) | [Checks](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks) | The state of the checks on the head commit. Unspecified when the forge last reported on an older head. |
| [`mergeability`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-mergeability) | [Mergeability](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability) | The forge's mergeability, or the last value for the same head while the forge recomputes it. |
| [`mergeability_unconfirmed`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-mergeability_unconfirmed) | bool | Whether [`mergeability`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-mergeability) is the last value for this head, not yet confirmed by a new read. |
| [`auto_merge`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-auto_merge) | bool | Whether auto-merge is on, so the forge merges once the checks and reviews pass. |
| [`auto_mergeable`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-auto_mergeable) | bool | Whether the forge would let komrad turn auto-merge on now. The forge refuses for a draft, a pull request with nothing left to wait for, and a repository that does not allow auto-merge. |
| [`credential_approved`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-credential_approved) | bool | Whether komrad's credential has an approval standing on the pull request. |
| [`credential_can_approve`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-credential_can_approve) | bool | Whether the forge would take an approval from komrad's credential now. The forge refuses one from the pull request's author and from a user it does not let approve. |
| [`reviewers`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-MergeReadiness-reviewers) | [Reviewer\[\]](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Reviewer) | The users who have reviewed the pull request or have a review request waiting, without its author. Empty before the forge has been read. |

### DiffStat

DiffStat counts the lines a checkout adds and removes, committed or not.

| Field | Type | Description |
| --- | --- | --- |
| [`added`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-DiffStat-added) | int32 | How many lines the checkout adds. |
| [`removed`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-DiffStat-removed) | int32 | How many lines the checkout removes. |

### Parent

Parent is the task a child depends on, and the fork point where the child's own commits begin on the parent's branch. Snapshots and line counts measure from [`fork_point`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent-fork_point).

| Field | Type | Description |
| --- | --- | --- |
| [`task_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent-task_id) | uuid\* | The id of the parent task. |
| [`fork_point`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent-fork_point) | string | The commit of the parent's branch the child's own commits sit on. |
| [`pull_request_id`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent-pull_request_id) | uuid | The id of the parent's pull request, which komrad reads for the parent's newest commit and its merge. Empty until the parent has one. |
| [`blocked`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Parent-blocked) | [CascadeBlock](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-CascadeBlock) | Why the cascade cannot rebase the child onto its parent. |

### Reviewer

Reviewer is one user who has reviewed a pull request or been asked to.

| Field | Type | Description |
| --- | --- | --- |
| [`login`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Reviewer-login) | string | The reviewer's login on the forge. |
| [`verdict`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Reviewer-verdict) | [ReviewerVerdict](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict) | Where the reviewer's latest review leaves them. |
| [`requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Reviewer-requested) | bool | Whether a review request to the reviewer is waiting. |

### AgentState

AgentState is what komrad last read an agent to be doing, from the end of its pane.

| Value | Description |
| --- | --- |
| [`idle`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-idle) | The CLI is at rest with nothing typed. |
| [`thinking`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-thinking) | The CLI is working on a turn. |
| [`waiting`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-waiting) | The CLI is waiting for the person to answer a selection. |
| [`setting_up`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-setting_up) | The agent is launching and doesn't have a pane to read yet. |
| [`failed_to_create`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-failed_to_create) | The launch failed. [`retry_agent`](https://komrad.dev/latest/api/agent/retry-agent.md) launches the agent again. |
| [`failed_to_cleanup`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-failed_to_cleanup) | A delete failed to clean up after the agent. `failure_reason` says why. |
| [`uncertain`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-uncertain) | The pane could be read, but its end showed no known state. |
| [`errored`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentState-errored) | The CLI is at rest after an API error ended the last turn. `turn_error` names the error. |

### AgentRole

AgentRole is what an agent was launched to do.

| Value | Description |
| --- | --- |
| [`reviewer`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentRole-reviewer) | An agent on a task that reads the writer's change and gives a review. |
| [`orchestrator`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentRole-orchestrator) | The one agent per workflow that hands work out across its tasks. |
| [`writer`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-AgentRole-writer) | The one agent on a task that changes its checkout. |

### TurnFailureKind

TurnFailureKind is why an error ended an agent's turn, whichever CLI ran it.

| Value | Description |
| --- | --- |
| [`cut_off`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-TurnFailureKind-cut_off) | The machine slept or the connection dropped mid-response. Komrad retries the turn. |
| [`unreachable`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-TurnFailureKind-unreachable) | The API did not answer after the CLI's own retries. Komrad retries the turn. |
| [`rate_limited`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-TurnFailureKind-rate_limited) | The account hit its usage limit. Komrad retries the turn once the limit resets. |
| [`other`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-agent-v1-TurnFailureKind-other) | Any other error, such as a billing or auth error. Komrad does not retry the turn. |

### PullRequestState

PullRequestState is the state of a pull request, worked out from the forge's report. A finished state wins over an open one.

| Value | Description |
| --- | --- |
| [`unread`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-unread) | Komrad has not read the repository yet. |
| [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-none) | Komrad read the repository and found no pull request from the branch. |
| [`open`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-open) | Open, without a review decision that decides it. |
| [`approved`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-approved) | Open, and the forge would merge it now. |
| [`changes_requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-changes_requested) | Open, with a reviewer asking for changes. |
| [`draft`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-draft) | A draft, whatever its reviews say. |
| [`merged`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-merged) | Merged. |
| [`closed`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-closed) | Closed without merging. |
| [`failing`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-failing) | Open, with a failing check on the head commit, whatever its reviews say. |
| [`approved_waiting`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-approved_waiting) | Approved, but behind its base branch or blocked by a branch rule. |
| [`conflicting`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-conflicting) | Open, and in conflict with its base branch, whatever its reviews say. |
| [`checks_running`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-checks_running) | Open, with checks running on the head commit and no reviewer asking for changes. |
| [`rereview_requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-PullRequestState-rereview_requested) | Open, and every reviewer who asked for changes has been asked to review again. |

### Kind

Kind is the kind of forge a host runs.

| Value | Description |
| --- | --- |
| [`github`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-forge-v1-Kind-github) | GitHub, or a GitHub Enterprise host. |
| [`gitlab`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-forge-v1-Kind-gitlab) | GitLab, or a self-managed GitLab host. |

### WorktreeRemovalReason

WorktreeRemovalReason is why a task's worktree is no longer on disk.

| Value | Description |
| --- | --- |
| [`deleted`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-WorktreeRemovalReason-deleted) | A delete removed the worktree. Komrad never makes it again. |
| [`gone`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-WorktreeRemovalReason-gone) | Komrad found the worktree's directory gone without a delete. |

### Sequence

Sequence is a git operation stopped part way in a task's checkout.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-none) | No git operation is stopped part way. |
| [`rebase`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-rebase) | A rebase stopped on a commit it could not replay. |
| [`am`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-am) | A `git am` stopped on a patch it could not apply. |
| [`merge`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-merge) | A merge stopped on conflicts. |
| [`cherry_pick`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-cherry_pick) | A cherry-pick stopped on conflicts or paused between commits. |
| [`revert`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-Sequence-revert) | A revert stopped on conflicts or paused between commits. |

### ReviewDecision

ReviewDecision is the forge's decision on a pull request's reviews.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision-none) | The forge reports no decision. |
| [`pending`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision-pending) | A required review has not been given. |
| [`approved`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision-approved) | The forge counts the pull request as approved. |
| [`changes_requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision-changes_requested) | A reviewer is asking for changes. |
| [`rereview_requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewDecision-rereview_requested) | Every reviewer who asked for changes has been asked to review again. |

### Checks

Checks is the overall state of the checks on a pull request's head commit.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks-none) | The head commit has no checks. |
| [`pending`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks-pending) | Checks are still running. |
| [`passing`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks-passing) | Every check passed. |
| [`failing`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks-failing) | At least one check failed, and every check has finished. |
| [`failing_running`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Checks-failing_running) | At least one check failed, and others are still running. |

### Mergeability

Mergeability is whether the forge would merge a pull request, given its base branch and branch rules.

| Value | Description |
| --- | --- |
| [`unknown`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-unknown) | The forge has not worked it out yet. |
| [`clean`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-clean) | The forge would merge the pull request now. |
| [`unstable`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-unstable) | Some checks are not passing. |
| [`blocked`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-blocked) | A branch rule is not met, such as a required review. |
| [`behind`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-behind) | The base branch has commits the pull request's branch does not. |
| [`conflicting`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-Mergeability-conflicting) | The branch is in conflict with its base branch. |

### CascadeBlock

CascadeBlock is why the cascade cannot rebase a child onto its parent.

| Value | Description |
| --- | --- |
| [`conflicted`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-CascadeBlock-conflicted) | Rebasing the child's own commits onto its parent stopped on conflicts. |
| [`orphaned`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-CascadeBlock-orphaned) | The child is orphaned: its branch holds neither its fork point nor any of its parent's own commits. |
| [`parent_closed`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-task-v1-CascadeBlock-parent_closed) | The parent's pull request closed without merging. |

### ReviewerVerdict

ReviewerVerdict is where one reviewer's latest review of a pull request leaves them.

| Value | Description |
| --- | --- |
| [`none`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict-none) | The reviewer has not reviewed the pull request. |
| [`approved`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict-approved) | The reviewer approved. |
| [`changes_requested`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict-changes_requested) | The reviewer asked for changes. |
| [`commented`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict-commented) | The reviewer left comments without approving or asking for changes. |
| [`dismissed`](https://komrad.dev/latest/api/agent/get-agent.md#komrad-pullrequest-v1-ReviewerVerdict-dismissed) | The reviewer's latest review was dismissed. |
