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, typically when a User sends a message and the AI replies.

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.