start_orchestrator

Bring a workflow's orchestrator back with a pane to talk to, starting the one that workflow has never had.

AgentwritesidempotentMCP tool

An orchestrator is the agent drawn on the workflow's own row rather than a row of its own, and it hands work out across that workflow rather than writing any itself. This returns whichever orchestrator the workflow already has, taking it out of the archive and resuming its conversation as far as either is needed, and launches a fresh one only when the workflow has never had one hold a conversation at all. An orchestrator already running comes back as it stands rather than being started twice, so this is safe to call again. A workflow that does not exist is refused as not_found.

Calling it#

curl -X POST http://127.0.0.1:8787/agent.v1.AgentService/StartOrchestrator \
  -H 'Content-Type: application/json' \
  -d '{
  "workflowId": "<workflowId>"
}'

Request#

StartOrchestratorRequest#

FieldTypeDescription
workflowIdstring

The workflow whose orchestrator to bring back, or to start if it has never had one.

required

Response#

StartOrchestratorResponse#

FieldTypeDescription
agentAgent

The orchestrator, with a pane to talk to.

Types#

Agent#

FieldTypeDescription
idstring

The handle every other call names this agent by, and what mail is addressed to.

namestring

What the panel lists it as, which is also its tmux window name at launch.

cwdstring

The directory it is running in, its own worktree when the workflow provisions one.

flagsstring

The command-line flags its CLI was started with.

promptstring

The whole briefing it was launched with.

paneIdstring

The tmux pane its CLI is running in, which is what capture-pane reads.

stateAgentState

What the panel last decided it was doing, read off the tail of its pane.

sessionIdstring

The CLI's own conversation id, which is the handle a resume needs.

harnessstring

Which CLI it runs, such as claude or codex.

workflowIdstring

Which workflow it is filed under, whose context it took at launch.

createdAtstring

When it was launched, in RFC 3339.

archivedAtstring

When it was hidden from the panel, unset while it is live.

scheduleIdstring

The schedule that launched it, unset for an agent a person or another agent spawned.

alivebool

Whether its pane is still there, which a dormant agent's is not.

hiddenbool

Whether the panel draws a row for it, which changes nothing about the agent itself.

metadatalist of AgentMetadata

Facts it has recorded about its own work, such as the ticket it is implementing.

idempotencyKeystring

The key a retry of its create carried, which is what answers a repeat with this agent.

spawnedByAgentIdstring

Which agent called create, unset for one a person spawned.

parentAgentIdstring

The agent this one is attached to, where spawned_by_agent_id is only who called create.

branchstring

The git branch its worktree is on, unset for an agent that provisions none.

repositoryUrlstring

The canonical web address of the repository its checkout pushes to, such as https://github.com/harrisoncramer/komrad, unset when the checkout is gone or its origin is not a forge.

headShastring

The commit its checkout has checked out, unset when the checkout is gone or git cannot read it.

worktreeRemovedbool

Whether its checkout has been taken away, which leaves the record and the transcript.

sequenceInProgressbool

Whether a merge, a rebase or a cherry-pick is part-way through its checkout, waiting on somebody to settle it.

failedRunbool

Whether a script komrad fired for the agent failed and nobody has looked at it since.

failedRunLogint32

The run log that failure was written to, which is the run the panel opens on.

stateChangedAtstring

When the state above last moved, in RFC 3339.

reportedReasonstring

What the agent's own CLI last reported it was doing, which annotates the state the pane decided rather than replacing it.

roleAgentRole

What the agent was launched to do, which decides the half of the review briefing it is sent.

promptTruncatedbool

Whether prompt holds only its opening, which a summary listing returns so that a page of agents does not carry every briefing they were launched with.

treeStandingReviewTreeStanding

Where the agent's worktree stood when last measured against the round tree_standing_sha names.

treeStandingShastring

The snapshot of the round tree_standing was measured against, empty before any measurement.

movedSinceRoundstring

The snapshot of its newest round while its worktree no longer hashes to it, empty otherwise.

heldAtstring

When a person stopped this agent and took its worktree, empty while nobody is holding it.

AgentMetadata#

FieldTypeDescription
keystring

What the fact is filed under, such as pr or branch.

valuestring

The fact as the panel shows it, which is why a URL belongs here whole.

AgentState#

AgentState is what the panel last decided an agent was doing, read off the tail of its pane.

ValueDescription
AGENT_STATE_IDLE

The pane is at rest with nothing typed.

AGENT_STATE_THINKING

The CLI is working on a turn.

AGENT_STATE_WAITING

The CLI is blocked on a human answering a selection.

AGENT_STATE_SETTING_UP

The agent is being launched and has no pane to read yet.

AGENT_STATE_FAILED_TO_CREATE

The launch failed, which retry_agent is for.

AGENT_STATE_FAILED_TO_CLEANUP

A delete failed to take the worktree down, and the reason is on the row.

AGENT_STATE_UNCERTAIN

The pane could be read but its tail decided nothing.

AgentRole#

AgentRole is what an agent was launched to do.

ValueDescription
AGENT_ROLE_IMPLEMENTER

An agent that lands work on a branch of its own.

AGENT_ROLE_REVIEWER

A child that reads another agent's work and gives a review.

AGENT_ROLE_ORCHESTRATOR

The agent drawn on a workflow's own row that hands work out.

ReviewTreeStanding#

ReviewTreeStanding is where an agent's worktree stands against the round its last verdict was given on.

ValueDescription
REVIEW_TREE_STANDING_MOVED

The worktree differs from the round and the base does not hold the round.

REVIEW_TREE_STANDING_LANDED

The base holds the round whole and the worktree carries nothing beyond the base.

REVIEW_TREE_STANDING_LANDED_MOVED

The base holds the round whole and the worktree carries new work on top of the base.