---
title: "Objective reasoning event"
method: POST
path: "objective_event.reasoning"
---

# Objective reasoning event

`POST objective_event.reasoning` (webhook)

Triggered when the model produces reasoning text (extended thinking or a reasoning summary) during an objective iteration

## Payload

- ObjectiveEventWebhookData — The envelope for an objective event webhook delivery. Contains timestamp, event type, and the webhook data payload.
  - `type` string, required — The event type, prefixed with objective_event. (e.g., objective_event.tool_result)
  - `timestamp` string, date-time, required
  - `data` object, required — The webhook data payload with flat top-level keys for agent, variation, objective, and event.
    - `agent` ResourceMetadata, required — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
      - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
      - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
      - `workspaceId` string, required — Workspace this resource belongs to for organizational grouping (prefixed ULID)
      - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
      - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
      - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"environment": "production", "team": "platform", "version": "v2"}
      - `profileId` string, required — ID of the actor (user or service account) that created this resource
      - `createdAt` string, date-time, required — Timestamp when this resource was created
      - `updatedAt` string, date-time — Timestamp when this resource was last updated
    - `agentVariation` ResourceMetadata, required — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
      - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
      - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
      - `workspaceId` string, required — Workspace this resource belongs to for organizational grouping (prefixed ULID)
      - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
      - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
      - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"environment": "production", "team": "platform", "version": "v2"}
      - `profileId` string, required — ID of the actor (user or service account) that created this resource
      - `createdAt` string, date-time, required — Timestamp when this resource was created
      - `updatedAt` string, date-time — Timestamp when this resource was last updated
    - `objective` OperationMetadata, required — Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
      - `id` string, required — Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")
      - `accountId` string, required — Account this operation belongs to for multi-tenant isolation (prefixed ULID)
      - `workspaceId` string, required — Workspace this operation belongs to for organizational grouping (prefixed ULID)
      - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
      - `createdAt` string, date-time, required — Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying
      - `externalId` string — External ID for the operation (e.g., a workflow ID from an external system)
      - `profileId` string, required — ID of the actor (user or service account) that created this operation
    - `objectiveEvent` ObjectiveEvent, required
      - `metadata` OperationMetadata, required — Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
        - `id` string, required — Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")
        - `accountId` string, required — Account this operation belongs to for multi-tenant isolation (prefixed ULID)
        - `workspaceId` string, required — Workspace this operation belongs to for organizational grouping (prefixed ULID)
        - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
        - `createdAt` string, date-time, required — Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying
        - `externalId` string — External ID for the operation (e.g., a workflow ID from an external system)
        - `profileId` string, required — ID of the actor (user or service account) that created this operation
      - `data` union, required
        - ObjectiveEventDataUserMessage
          - `type` 'userMessage', required
          - `userMessage` UserMessage, required
            - `content` string
        - ObjectiveEventDataToolApprovalRequested
          - `type` 'toolApprovalRequested', required
          - `toolApprovalRequested` ToolApprovalRequested, required
            - `toolCallId` string — The ID of the objective tool call record. Use this ID with the ApproveToolCall or DenyToolCall RPCs to approve or deny the tool call.
        - ObjectiveEventDataToolApproved
          - `type` 'toolApproved', required
          - `toolApproved` ToolApproved, required
            - `toolCallId` string — The ID of the objective tool call record that was approved via the ApproveToolCall RPC.
        - ObjectiveEventDataToolDenied
          - `type` 'toolDenied', required
          - `toolDenied` ToolDenied, required
            - `toolCallId` string — The ID of the objective tool call record that was denied via the DenyToolCall RPC.
            - `memo` string — The memo provided by the reviewer when denying the tool call. This is passed to the agent to provide further instructions.
        - ObjectiveEventDataToolCalled
          - `type` 'toolCalled', required
          - `toolCalled` ToolCalled, required
            - `toolCallId` string — The ID of the objective tool call record that was executed.
            - `tool` union — CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
              - …
            - `config` union — Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline.
              - …
            - `arguments` object — The arguments passed to the tool.
        - ObjectiveEventDataError
          - `type` 'error', required
          - `error` ObjectiveError, required
            - `type` string
            - `message` string
        - ObjectiveEventDataAssistantMessage
          - `type` 'assistantMessage', required
          - `assistantMessage` AssistantMessage, required
            - `content` string
            - `toolCalls` AssistantToolCall[]
              - …
        - ObjectiveEventDataToolResult
          - `type` 'toolResult', required
          - `toolResult` ToolResult, required
            - `toolCallId` string, required
            - `result` ObjectiveToolCallResult, required — ObjectiveToolCallResult is the content a tool returned after execution. Tools can return multiple content blocks, and blocks can be multi-modal (text, image, audio). Media blocks are stored by Cadenya and served as short-lived signed URLs rather than inline bytes.
              - …
        - ObjectiveEventDataToolError
          - `type` 'toolError', required
          - `toolError` ToolError, required
            - `toolCallId` string — The ID of the objective tool call record that encountered an error during execution.
            - `message` string
        - ObjectiveEventDataContextWindowCompacted
          - `type` 'contextWindowCompacted', required
          - `contextWindowCompacted` ContextWindowCompacted, required
            - `newContextWindow` ObjectiveContextWindowData
              - …
            - `strategies` string[] — The strategies that were applied during this compaction
            - `messagesCompacted` integer — Number of messages that were compacted
            - `summary` string — The summary generated by the summarization strategy, if used.
        - ObjectiveEventDataMemoryRead
          - `type` 'memoryRead', required
          - `memoryRead` MemoryRead, required — MemoryRead is emitted each time the agent resolves a key against the memory cascade and loads an entry. Lookups that miss (key not found in any layer) do not emit this event.
            - `message` string — Human-readable description of the read, set by the runtime. For example: "Loaded skill", "Resolved context key". Not machine-parsed; intended for UI display alongside the other events in an objective's timeline.
            - `memoryLayerId` string — The layer the entry resolved to. The top-most layer that contained the key — other layers beneath it that also contained the key are shadowed and not referenced here.
            - `memoryEntryId` string — The specific entry that was read.
        - ObjectiveEventDataCancelled
          - `type` 'cancelled', required
          - `cancelled` ObjectiveCancelled, required — ObjectiveCancelled is the terminal event written when an objective is cancelled. After this event, the objective is super-terminal: no further iterations, compaction, or continuation are permitted.
            - `message` string — Optional human-readable note recorded at cancel time. Today the workflow sets "Cancelled" but this field leaves room for richer reasons (e.g. "Cancelled by user", "Cancelled by schedule sweep", "Credit balance exhausted").
        - ObjectiveEventDataSubAgentSpawned
          - `type` 'subAgentSpawned', required
          - `subAgentSpawned` SubAgentSpawned, required
            - `agent` ResourceMetadata — Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
              - …
            - `objective` OperationMetadata — Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
              - …
            - `task` string
        - ObjectiveEventDataSubAgentUpdated
          - `type` 'subAgentUpdated', required
          - `subAgentUpdated` SubAgentUpdated, required
            - `agent` BareMetadata — BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
              - …
            - `objective` BareMetadata — BareMetadata contains the minimal metadata for a resource: the ID and an optional human-readable name. These are used for reference fields where the full metadata (account scoping, timestamps, labels, external IDs) is not needed — e.g., the tool references inside an agent variation spec or the tools assigned to an objective. Both fields are server-populated; clients provide IDs through sibling fields rather than by constructing a BareMetadata themselves.
              - …
            - `status` 'STATUS_UNSPECIFIED' | 'STATUS_PENDING' | 'STATUS_RUNNING' | 'STATUS_COMPLETED' | 'STATUS_FAILED' | 'STATUS_CANCELLED', enum
            - `message` string
        - ObjectiveEventDataFinalized
          - `type` 'finalized', required
          - `finalized` ObjectiveFinalized, required — ObjectiveFinalized is the terminal event written when an objective is finalized. After this event, the objective is super-terminal: no further iterations, compaction, or continuation are permitted.
            - `output` object — If the objective was created with an output schema, and the agent successfully completed the objective, this field will contain the structured output of the objective.
        - ObjectiveEventDataNotice
          - `type` 'notice', required
          - `notice` Notice, required — Notice is a non-terminal diagnostic emitted by the runtime when something noteworthy but non-fatal happens during an objective — for example a just-in-time tool set failing to load, or a previously loaded tool being dropped because it was archived. Notices carry no structured payload; they exist to make the objective timeline self-explanatory.
            - `level` 'LEVEL_UNSPECIFIED' | 'LEVEL_INFO' | 'LEVEL_WARN' | 'LEVEL_INFO' | 'LEVEL_WARN', enum
            - `message` string — Human-readable description of what happened.
            - `key` string — Stable machine-readable identifier for the notice kind (for example "tool_set_load_failed", "tool_archived"). Clients can switch on it or use it as an i18n key; the message is the English fallback.
        - ObjectiveEventDataTimedOut
          - `type` 'timedOut', required
          - `timedOut` ObjectiveTimedOut, required — ObjectiveTimedOut is the terminal event written when an objective is finalized by the inactivity sweep because it saw no activity (no user messages, no LLM calls) within its variation's inactivity timeout — or the system-wide 24 hour maximum when no timeout is configured. The objective produces no output. After this event, the objective is super-terminal: no further iterations, compaction, or continuation are permitted.
            - `message` string — Human-readable note recorded at timeout time (e.g. "Timed out after 2h of inactivity").
        - ObjectiveEventDataReasoning
          - `type` 'reasoning', required
          - `reasoning` Reasoning, required — Reasoning carries the human-readable reasoning text a model produced while working on an iteration — extended thinking (Anthropic, Gemini) or reasoning summaries (OpenAI). It is emitted alongside the assistant message from the same model response and is purely informational: the text shown here is never sent back to the model.
            - `content` string, required — The reasoning text. May be a verbatim chain of thought or a provider-generated summary depending on the model.
      - `contextWindowId` string
      - `info` ObjectiveEventInfo
        - `objective` OperationMetadata — Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
          - `id` string, required — Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")
          - `accountId` string, required — Account this operation belongs to for multi-tenant isolation (prefixed ULID)
          - `workspaceId` string, required — Workspace this operation belongs to for organizational grouping (prefixed ULID)
          - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
          - `createdAt` string, date-time, required — Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying
          - `externalId` string — External ID for the operation (e.g., a workflow ID from an external system)
          - `profileId` string, required — ID of the actor (user or service account) that created this operation
        - `createdBy` Profile — A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.
          - `metadata` AccountResourceMetadata, required — AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.
            - `id` string, required — Unique identifier for the resource (prefixed ULID, e.g., "apikey_01HXK...")
            - `accountId` string, required — Account this resource belongs to for multi-tenant isolation (prefixed ULID)
            - `name` string, required — Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly
            - `externalId` string — External ID for the resource (e.g., a workflow ID from an external system)
            - `labels` object — Key-value pairs for categorization and filtering. Values are 0-63 alphanumeric characters with "-", "_", or "." allowed between; keys follow the same shape and additionally accept an optional DNS-subdomain prefix (e.g. "cadenya.com/") of at most 253 characters. Examples: {"environment": "production", "team": "platform", "version": "v2"}
            - `profileId` string, required
            - `createdAt` string, date-time
          - `spec` ProfileSpec, required — Configuration for a profile.
            - `email` string — Email address of the profile. Required and unique within an account for user profiles.
            - `name` string — Display name (e.g., "Bobby Tables").
            - `type` 'PROFILE_TYPE_UNSPECIFIED' | 'PROFILE_TYPE_USER' | 'PROFILE_TYPE_API_KEY' | 'PROFILE_TYPE_SYSTEM', enum, required — Whether this profile represents a human user, an API key, or a system principal.
      - `duration` string — Elapsed time of the work this event records, when it is known at write time (e.g. assistant message generation, tool execution for result/error events). Unset means the event is instantaneous or the duration is not measurable. Serialized as a canonical duration string (e.g. "4.1s"). Always set together with started_at.
      - `startedAt` string, date-time — When the work this event records began. Set together with duration, so the work interval is [started_at, started_at + duration]. The event's created_at remains the time the event was persisted.

## Acknowledgement `200`

Webhook received successfully

---

[API](https://skmtc.net/cadenya/apis/cadenya-api.md) · [All operations](https://skmtc.net/cadenya/apis/cadenya-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cadenya/cadenya-api/versions/ac1a7f084068/schema)
