Webhooks
Webhooks let you receive real-time notifications when events occur in your Rekall workspace. Subscribe to specific event types and receive HTTP POST requests to your endpoint with event details.
Overview
When you register a webhook endpoint, Rekall sends HTTP POST requests to your URL whenever subscribed events occur. Each delivery includes a JSON payload describing the event, along with a cryptographic signature you can use to verify the request originated from Rekall.
Webhook endpoints
Your webhook endpoint must respond with a 2xx status code within 30 seconds. The endpoint must be publicly accessible over HTTPS. Plain HTTP endpoints are not supported.
Event Types
Subscribe to one or more of the following event types when creating a webhook. Use the wildcard * to receive all events.
| Event | Description |
|---|---|
memory.created | A new memory was created |
memory.updated | An existing memory was updated |
memory.deleted | A memory was deleted |
entity.created | A new entity was added to the knowledge graph |
entity.updated | An entity was updated |
entity.deleted | An entity was removed from the knowledge graph |
workflow.triggered | A procedural workflow was triggered |
workflow.completed | A workflow execution completed |
workflow.failed | A workflow execution failed |
agent.spawned | A new agent was spawned |
agent.terminated | An agent was terminated |
hive.member_added | A member was added to a hive |
hive.member_removed | A member was removed from a hive |
execution.checkpoint | An execution task checkpoint was saved |
execution.completed | An execution task completed |
Webhook Payload
Every webhook delivery includes a consistent payload structure with the event type, timestamp, and the relevant resource data.
{"id": "evt_abc123def456","type": "memory.created","created_at": "2025-01-15T10:30:00Z","data": {"id": "mem_xyz789","type": "episodic","content": "User completed onboarding flow","context": "agent","agent_id": "agent_abc123","metadata": {"step": "onboarding_complete"},"created_at": "2025-01-15T10:30:00Z"}}
Signature Verification
Each webhook request includes an X-Rekall-Signature header containing an HMAC-SHA256 signature. Verify this signature to ensure the webhook was sent by Rekall and was not tampered with in transit.
The signature is computed using your webhook secret (provided when you create the webhook) and the raw request body.
import crypto from 'crypto';function verifyWebhookSignature(payload: string,signature: string,secret: string): boolean {const expected = crypto.createHmac('sha256', secret).update(payload, 'utf-8').digest('hex');return crypto.timingSafeEqual(Buffer.from(signature),Buffer.from(expected));}// In your webhook handler:app.post('/webhooks/rekall', (req, res) => {const signature = req.headers['x-rekall-signature'] as string;const isValid = verifyWebhookSignature(JSON.stringify(req.body),signature,process.env.REKALL_WEBHOOK_SECRET!);if (!isValid) {return res.status(401).json({ error: 'Invalid signature' });}// Process the webhook eventconst event = req.body;console.log(`Received event: ${event.type}`);res.status(200).json({ received: true });});
Always verify signatures
Never process webhook payloads without verifying the signature. Without verification, attackers could send fake events to your endpoint.
Delivery Lifecycle
Webhook deliveries go through the following states during their lifecycle:
Pending
Event is queued for delivery.
Delivering
HTTP POST request is being sent to your endpoint.
Delivered
Your endpoint responded with a 2xx status code within 30 seconds.
Failed
Delivery failed after all retry attempts have been exhausted.
Retry Policy
If your endpoint does not respond with a 2xx status code within 30 seconds, Rekall will retry the delivery with exponential backoff. The retry schedule is:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 24 hours |
After 5 failed delivery attempts, the event is marked as failed. If a webhook endpoint consistently fails, it will be automatically disabled after 100 consecutive failures. You can re-enable it from the Developer Portal.
Webhook Management API
Use these endpoints to programmatically manage your webhook subscriptions.
