Webhooks let your application receive real-time HTTP notifications when Hindsight completes background operations. Instead of polling the Operations API, you register an endpoint on your server and Hindsight calls it automatically whenever a matching event occurs — such as a retain completing, observations being consolidated, or a mental model being refreshed. Webhooks are registered per memory bank and fire once per event.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/vectorize-io/hindsight/llms.txt
Use this file to discover all available pages before exploring further.
Delivery and retries
Failed deliveries (non-2xx response or timeout after 30 seconds) are retried with exponential backoff:| Attempt | Delay after failure |
|---|---|
| 1 | 5 seconds |
| 2 | 5 minutes |
| 3 | 30 minutes |
| 4 | 2 hours |
| 5 | 5 hours |
| 6 | Permanent failure |
Webhook delivery is at-least-once. Delivery tasks are enqueued in the same database transaction as the triggering operation, so your endpoint may receive the same event more than once. Use the
operation_id field to deduplicate.Create a webhook
Request parameters
Your tenant identifier. Use
default for single-tenant deployments.The memory bank to register the webhook for.
The HTTPS URL Hindsight will POST events to. Must be publicly reachable.
One or more event types to subscribe to. Accepted values:
"retain.completed", "consolidation.completed".Response fields
Unique webhook ID. Use this to list or delete the webhook.
The memory bank this webhook is registered for.
The registered endpoint URL.
The event types this webhook listens for.
ISO 8601 timestamp of when the webhook was created.
Example
List webhooks
Response fields
List of registered webhooks.
Example
Delete a webhook
Example
Webhook payload format
When an event fires, Hindsight sends an HTTP POST to your registered URL with a JSON body. All payloads share the following top-level fields:The event type that triggered this delivery:
"retain.completed" or "consolidation.completed".The memory bank the event originated from.
Unique identifier for the operation. Use this to deduplicate deliveries — Hindsight provides at-least-once delivery.
Terminal status of the operation:
"completed" or "failed".ISO 8601 timestamp of when the event occurred.
Event-specific data. Shape varies by event type — see the sections below.
retain.completed
Fired once per content item after a retain operation finishes. When a batch contains N items, N separate events are delivered.
The document ID if one was provided in the retain request.
null if auto-generated.Document-level tags applied during retain.
For async retain (
async: true), operation_id matches the ID returned by the retain API. For sync retain, operation_id is a generated tracing identifier.consolidation.completed
Fired after Hindsight finishes consolidating new memories into observations for a bank.
Number of new observations created.
Number of existing observations updated.
Number of observations deleted.
Set when
status is "failed". Describes what went wrong.Receiving and handling events
Your endpoint should return a2xx status code as quickly as possible. If processing takes time, acknowledge the request immediately and handle the payload asynchronously.
Error codes
| Status | Code | Description |
|---|---|---|
400 | invalid_request | Malformed request body or missing required fields. |
401 | unauthorized | Missing or invalid API key. |
404 | bank_not_found | The specified bank does not exist. |
404 | webhook_not_found | The specified webhook does not exist. |
422 | validation_error | One or more fields failed validation (e.g. unsupported event type). |
500 | internal_error | Server error. |
