komrad

list_log_sources

List the hook runs and language servers whose logs can be read for one agent.

read-onlyidempotentMCP toolLog

Calling it#

curl -X POST http://127.0.0.1:8787/komrad.log.v1.LogService/ListLogSources \
  -H 'Content-Type: application/json' \
  -d '{
  "agent_id": "<agent_id>"
}'

Request#

ListLogSourcesRequest#

FieldTypeDescription
agent_iduuid*

The agent whose logs to list, by id.

Response#

ListLogSourcesResponse#

FieldTypeDescription
agentLogAgent

The agent.

hook_runsHookRun[]

The agent's hook runs that wrote a log, newest first, those of its task's moments included.

language_serversLanguageServerLog[]

The logs of the language servers over the checkout of the agent's task, by name. Empty when the task has no checkout.

Types#

LogAgent#

LogAgent is the agent whose logs a read holds.

FieldTypeDescription
iduuid*

The agent's id.

namestring

The agent's name.

roleAgentRole

The agent's role.

created_attimestamp

When the agent was created.

archived_attimestamp

When the agent was archived. Unset while the agent is live.

HookRun#

HookRun is one run of a hook's script for an agent.

FieldTypeDescription
iduuid*

The hook run's id, to pass as hook_run_id to read_logs.

agent_iduuid*

The agent the hook ran for, by id.

numberint32

The hook run's number among the agent's hook runs.

triggerMoment

The moment the script ran at.

scriptstring

The hook's script, by file name in the hooks directory.

started_attimestamp

When the hook run started.

finished_attimestamp

When the hook run finished. Unset while it runs.

failedbool

Whether the hook run failed.

LanguageServerLog#

LanguageServerLog is the log of one language server over a task's checkout.

FieldTypeDescription
namestring

The language server's name, to pass as language_server to read_logs.

written_attimestamp

When the language server last wrote to its log.

AgentRole#

AgentRole is what an agent was launched to do.

ValueDescription
reviewer

An agent on a task that reads the writer's change and gives a review.

orchestrator

The one agent per workflow that hands work out across its tasks.

writer

The one agent on a task that changes its checkout.

Moment#

Moment is a point in the life of an agent or task at which komrad runs a script.

ValueDescription
agent.provision

runs the provisioner before komrad creates an agent's directory

agent.resume

reruns the provisioner before komrad resumes an agent

agent.deprovision

runs the deprovisioner as komrad releases an agent's directory

agent.pre-launch

runs in the agent's directory before its pane opens, and a failure abandons the create

agent.post-launch

runs once the agent's pane opens

agent.pre-resume

runs in the agent's directory before a dormant agent's pane opens, and a failure refuses the resume

agent.post-resume

runs once a dormant agent is back in a pane

agent.pre-archive

runs while the agent is still running, and a failure refuses the archive

agent.post-archive

runs in the agent's directory after komrad closes its pane and archives it

agent.pre-restore

runs before an archived agent's row comes back, and a failure refuses the restore

agent.post-restore

runs when an archived agent's row comes back

agent.pre-delete

runs in the agent's directory as komrad deletes it, before komrad releases the worktree

agent.post-delete

runs once the agent and its worktree are gone

task.pre-open

runs before a task's first live agent opens its pane, and a failure abandons the create or restore

task.post-archive

runs after komrad archives a task's last live agent, and the task with it

task.pre-delete

runs as komrad deletes a task, before it releases the worktree, and a failure keeps the task