Skip to main content

When it fires

  • A tool call finishes and Cadenya records its result. startedAt and duration on the event cover the tool’s execution.
  • A Bare tool call gets its content from your application, either through set a Bare tool call’s content or a fixed alwaysSetResult.

Event data

The event-specific fields live at data.objectiveEvent.data. The rest of the payload is the shared envelope.
string
required
Always toolResult. Switch on this, not on the outer type, when one handler serves several events.
object
required
The recorded result.

Handle it

Every SDK verifies the signature and returns the typed envelope in one call. The handler reads the raw body (not a parsed and re-serialized one), unwraps it, and returns a 2xx fast.
The cURL tab signs the sample payload the same way Cadenya does and posts it to a local handler. Run one of the other tabs first, set SECRET to the key that handler uses, then run the script to see the event land.

Envelope

Every objective event arrives in the same envelope. type names the event, data carries the agent, variation, and objective it belongs to, and data.objectiveEvent.data holds the fields documented on each event page.
Cadenya signs every delivery per the Standard Webhooks specification and sends it as a POST with a JSON body.Find the signing key under Account Admin and rotate it with rotate the webhook signing key. Cadenya records every attempt, and you can inspect them with list webhook deliveries.
string
required
The event name, for example objective_event.tool_called.
string
required
RFC 3339 time when Cadenya emitted the delivery.
object
required
Everything you need to route the event without a lookup.