Guides
Memory Webhook
DumGum's AI automatically learns and memorizes facts about Users and Personas during conversations. The Memory Webhook lets you receive real-time notifications whenever the AI updates its memory, so you can keep your own systems in sync.
When configured, every time a conversation produces memory changes (new facts learned, outdated facts removed), DumGum sends an HTTP POST to your endpoint with the details.
Configuration
The Memory Webhook is configured through your project's Content Creation configuration, either via the API or directly from the Customer Dashboard. Three fields control the behavior:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
memoryWebhookUrl | string | Yes | None | The URL that will receive webhook payloads |
memoryWebhookCustomHeaders | object | No | {} | Custom HTTP headers included in every request |
memoryWebhookMode | string | No | FULL_STATE | Delivery mode: FULL_STATE or CHANGES_ONLY |
{
"memoryWebhookUrl": "https://your-server.com/webhooks/memory",
"memoryWebhookCustomHeaders": {
"X-Api-Key": "your-secret-key"
},
"memoryWebhookMode": "CHANGES_ONLY"
}Delivery Modes
FULL_STATE (default)
Every time the AI updates its memory, we send the complete current memory state for that User/Persona pair. Just replace whatever you have stored locally with what we send.
Event: memory.updated
CHANGES_ONLY
We send only what changed: which memories were added and which were deleted. More efficient for high-volume integrations applying incremental updates.
Event: memory.changed
When Are Webhooks Triggered?
Webhooks are triggered whenever the AI processes a conversation and its memory system detects changes. Memory is only updated on Pro replies. On an -auto conversation with no memory state yet, the first Pro reply also analyses the text in the first 30 and latest 31 User/Persona messages, counting overlapping messages only once. The opening 30 are included even if the count jumps past 31. This bounded catch-up selects at most 61 messages and can produce a webhook immediately, without waiting for 20 more messages. Delivery is asynchronous.
Later memory updates run once about 20 new messages have arrived since the last update. The catch-up uses the configured delivery mode and the same event payloads described below. See When Smart becomes Pro for which conversations get it and how it retries.
HTTP Request Details
| Property | Value |
|---|---|
| Method | POST |
| Content-Type | application/json |
| User-Agent | dg2-api |
| Custom Headers | As configured in memoryWebhookCustomHeaders |
Retry Behavior
If your endpoint returns a non-2xx status code, or if the connection fails or times out, we automatically retry:
- Retry interval: 15 seconds
- Maximum retries: 40 attempts
Quick Start
- Set your webhook URL in your project configuration.
- Choose a mode:
FULL_STATEfor simplicity,CHANGES_ONLYfor incremental updates. - Add custom headers (optional): include authentication headers to verify incoming requests.
- Handle the payload: see the event reference for
memory.updatedormemory.changed. - Return 2xx: respond with a success status code to acknowledge receipt.