Skip to main content
Version: Next

Mem0

The Mem0 sink sends SeaTunnel rows to the hosted Mem0 Platform V3 asynchronous add API. Phase 1 supports ADD only. A row is acknowledged only when the API returns a non-empty event_id; this is accepted at-least-once delivery, not completion of asynchronous processing.

Sink Options​

NameTypeRequiredDefaultDescription
api_keyStringYes-Mem0 Platform API key. Sent as Authorization: Token <api_key>.
api_base_urlStringNohttps://api.mem0.aiMem0 Platform V3 API base URL.
messages_fieldStringYes-Input row field holding the messages payload. It must resolve to an array.
user_id_fieldStringNo-Input row field mapped to Mem0 user_id.
agent_id_fieldStringNo-Input row field mapped to Mem0 agent_id.
app_id_fieldStringNo-Input row field mapped to Mem0 app_id.
run_id_fieldStringNo-Input row field mapped to Mem0 run_id.
metadata_fieldStringNo-Input row field mapped to Mem0 metadata. It must resolve to a JSON object.
retryIntegerNo-Maximum number of retries when an HTTP request fails with an IOException.
retry_backoff_multiplier_msIntegerNo100Retry-backoff interval in milliseconds used as the multiplier when a request fails.
retry_backoff_max_msIntegerNo10000Maximum retry-backoff interval in milliseconds when a request fails.
common-optionsNo-Sink plugin common parameters, please refer to Sink Common Options for details.

At least one of user_id_field, agent_id_field, app_id_field and run_id_field must be configured and non-empty for every row. The three retry* options are inherited from the shared HTTP sink options and apply to request failures.

Configuration​

sink {
Mem0 {
api_key = "${MEM0_API_KEY}"
messages_field = "messages"
user_id_field = "user_id"
api_base_url = "https://api.mem0.ai"
}
}

messages_field must resolve to an array. At least one scope field among user_id_field, agent_id_field, app_id_field, and run_id_field must be configured and non-empty for each row. Optional metadata_field must resolve to a JSON object.

The connector uses POST /v3/memories/add/ with Authorization: Token, Content-Type: application/json, and Accept: application/json. Delete, self-hosted OSS endpoints, event polling, and a generic Mem0-compatible protocol are outside Phase 1.

Change Log
ChangeCommitVersion
[Feature][Connector-V2] Add Mem0 Platform V3 ADD sink connector-Next