Skip to main content
API reference sections

Schema

ToolActivity

Durable and public tool activity. Raw arguments, results, queries, titles, paths, and workspace content deliberately have no field in this type. The stable target ids and bounded public error summary are the only context kept for an auditable, useful activity row.

Type object

Shape

FieldTypeDescription
idrequiredToolInvocationId

ToolInvocationId - a client-minted UUID v4, never derived from content or location.

attempt_idrequiredInferenceAttemptId

InferenceAttemptId - a client-minted UUID v4, never derived from content or location.

chat_idrequiredChatId

ChatId - a client-minted UUID v4, never derived from content or location.

assistant_message_idrequiredMessageId

MessageId - a client-minted UUID v4, never derived from content or location.

tool_namerequiredstring
read_onlyrequiredboolean
statusrequiredToolActivityStatus
approvalrequiredToolApproval
proposed_atrequiredTimestamp

Epoch milliseconds, UTC. Signed, so instants before 1970 are representable.

started_atTimestamp or null
completed_atTimestamp or null
result_bytesinteger (uint64, >= 0) or null
error_codeToolErrorCode or null
target_workspace_idWorkspaceId or null
target_document_idDocumentId or null
error_messagestring or null
agent_labelstring or null

A local agent's own label for the call (Read README.md), bounded, kept since schema 8 so a row reads the same after the turn as during it. None on Koru's own tool rows.

agent_summarystring or null

What a local agent's permission request asked, bounded, kept since schema 8.

agent_inputstring or null

What the agent asked the tool to do - a command line, a change's paths, an MCP call's arguments - bounded to [crate::AGENT_CONTENT_CHARS], kept since schema 8 (UC17).

agent_outputstring or null

What the tool produced - output, a diff, a result - bounded to [crate::AGENT_CONTENT_CHARS], kept since schema 8 (UC17).

text_offsetinteger (uint32, >= 0) or null

How much of the reply's Markdown, in bytes, had arrived when the call began: the text before it was said before it, the text after it after. Kept since schema 10 on a local agent's rows, so a reopened reply can still tell the agent's running commentary from its final answer. None on earlier rows and on Koru's own tool rows.

liveAgentActivityLive or null

A local agent's live state for this row - the choices a pending permission request offers - populated only from the worker's live turn table while the turn runs. None on every repository read and after the turn ends. The agent's wording lives on the row's own agent_* fields.

Example
{
  "id": "00000000-0000-4000-8000-000000000000",
  "attempt_id": "00000000-0000-4000-8000-000000000000",
  "chat_id": "00000000-0000-4000-8000-000000000000",
  "assistant_message_id": "00000000-0000-4000-8000-000000000000",
  "tool_name": "string",
  "read_only": false,
  "status": "proposed",
  "approval": "not_required",
  "proposed_at": 0,
  "started_at": 0,
  "completed_at": 0,
  "result_bytes": 0,
  "error_code": "permission_denied",
  "target_workspace_id": "00000000-0000-4000-8000-000000000000",
  "target_document_id": "00000000-0000-4000-8000-000000000000",
  "error_message": "string",
  "agent_label": "string",
  "agent_summary": "string",
  "agent_input": "string",
  "agent_output": "string",
  "text_offset": 0,
  "live": {
    "choices": [
      {
        "id": "string",
        "intent": "allow_once",
        "label": "string"
      }
    ],
    "questions": [
      {
        "id": "string",
        "header": "string",
        "question": "string",
        "options": [
          {
            "label": "string",
            "description": "string"
          }
        ],
        "allow_other": false,
        "secret": false
      }
    ]
  }
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.