Skip to main content
API reference sections

Schema

PublicAiEvent

An event safe to expose across Koru's public AI boundary.

Provider tool calls are deliberately absent: their arguments and reasoning continuity data remain inside the worker. Clients observe only the minimal [ToolActivity] projection: stable target ids and a bounded public failure summary, never raw tool arguments or results.

Type object or object or object or object or object or object or object or object or object or object or object or object or object or object

Shape

One of 14 shapes:

  1. type: "started"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    provider_response_idstring or null
    request_payload_bytesinteger (uint64, >= 0) or null

    Default null

    resolved_modelstring or null
    effective_reasoningReasoningChoice or null
    atrequiredTimestamp

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

    typerequired"started"
  2. type: "text_delta"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    textrequiredstring
    atrequiredTimestamp

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

    typerequired"text_delta"
  3. type: "reasoning_delta"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    textrequiredstring
    atrequiredTimestamp

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

    typerequired"reasoning_delta"
  4. type: "usage"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    usagerequiredAiUsage
    typerequired"usage"
  5. type: "context_usage"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    usedrequiredinteger (uint64, >= 0)
    sizerequiredinteger (uint64, >= 0)
    typerequired"context_usage"
  6. type: "tool_activity"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    activityrequiredToolActivity

    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.

    typerequired"tool_activity"
  7. type: "agent_notice"

    A local agent's status line beside its reply, as the chat keeps it (koru-ai D69): not part of the reply's text.

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    noticerequiredAgentNotice

    A short status line a local agent said during a reply that is not part of the reply (koru-ai D69, AI schema 12): Devin's Hook failed: … about a hook on the person's machine. Kept with the reply it came with, in the order it came, and where in the reply it came.

    typerequired"agent_notice"
  8. type: "agent_commands"

    A local agent changed the current session's command listing.

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    chatrequiredChatId

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

    commandsrequiredarray of AgentCommandView
    typerequired"agent_commands"
  9. type: "notice"

    A one-line fact about the attempt the surface shows and nothing stores: a local agent could not be reattached and a replacement was started with the conversation so far.

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    noticerequiredAttemptNotice

    A fact about the attempt the surface shows as one line and nothing stores.

    atrequiredTimestamp

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

    typerequired"notice"
  10. type: "web_search"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    call_idrequiredstring
    phaserequiredWebSearchPhase
    atrequiredTimestamp

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

    typerequired"web_search"
  11. type: "citation"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    sourcerequiredSourceLink
    atrequiredTimestamp

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

    typerequired"citation"
  12. type: "completed"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    stop_reasonstring or null
    atrequiredTimestamp

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

    typerequired"completed"
  13. type: "failed"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    errorrequiredAiError
    atrequiredTimestamp

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

    typerequired"failed"
  14. type: "cancelled"

    FieldTypeDescription
    attempt_idrequiredInferenceAttemptId

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

    atrequiredTimestamp

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

    typerequired"cancelled"
Example
{
  "attempt_id": "00000000-0000-4000-8000-000000000000",
  "provider_response_id": "string",
  "request_payload_bytes": 0,
  "resolved_model": "string",
  "effective_reasoning": "default",
  "at": 0,
  "type": "started"
}

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.