DumGumDocs
Search documentation

Loading search…

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:

FieldTypeRequiredDefaultDescription
memoryWebhookUrlstringYesNoneThe URL that will receive webhook payloads
memoryWebhookCustomHeadersobjectNo{}Custom HTTP headers included in every request
memoryWebhookModestringNoFULL_STATEDelivery 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

PropertyValue
MethodPOST
Content-Typeapplication/json
User-Agentdg2-api
Custom HeadersAs 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

  1. Set your webhook URL in your project configuration.
  2. Choose a mode: FULL_STATE for simplicity, CHANGES_ONLY for incremental updates.
  3. Add custom headers (optional): include authentication headers to verify incoming requests.
  4. Handle the payload: see the event reference for memory.updated or memory.changed.
  5. Return 2xx: respond with a success status code to acknowledge receipt.
Ask DumGum AIAnswers from the documentation

What can we help you build?

Ask about setup, content creation, or the API.

AI can make mistakes—verify important information against the sources. Conversations are kept for 30 days to improve the documentation, and questions and recent messages are sent to a third-party AI provider. Don’t include secrets or sensitive information.