Add Memory
Ingest user memories – preferences, conversation history, or inline text.
When to use it
Use this endpoint to store user-specific context that personalizes recall:- Preferences – “User prefers dark mode and detailed technical explanations”
- Conversation history – chat messages between the user and your agent
- User notes – markdown snippets, settings, profile data
POST /ingestion/upload_knowledge instead.
Endpoint
- Auth: Bearer token
- Idempotency: Controlled by
upsert(defaulttrue– overwrites existing items with the samesource_id) - Async: Yes – memories are queued for processing. Use
POST /ingestion/verify_processingto check status.
Example
Request parameters
Memory item
Each entry in thememories array supports three content formats. Pick one:
Format 1 – Plain text
Format 2 – Markdown
Format 3 – Conversation pairs
All MemoryItem fields
Inference modes
Theinfer flag controls how HydraDB processes content:
infer: true– HydraDB extracts implicit preferences, insights, and entities from the text. Best for conversation history and free-form user notes where you want HydraDB to derive structured signals.infer: false(default) – Content is chunked and indexed as-is. Best for content that should be stored verbatim, like preset profile fields or raw notes.
infer explicitly. The default is false. If you’re storing conversational content and expect HydraDB to extract preferences, you must set infer: true.Response
Behavior notes
POST /ingestion/verify_processing with the returned source_id until status is completed.sub_tenant_id that doesn’t exist, HydraDB creates it automatically on first use. There is no separate sub-tenant creation endpoint.Related endpoints
- Next: Verify processing – check ingestion status
- Next: Recall preferences – retrieve memories
- Related: Delete memory – remove individual memories
- Alternative: Upload knowledge – for documents and app knowledge instead of user memories
Errors
Common codes:400 INVALID_PARAMETERS, 404 TENANT_NOT_FOUND, 422 VALIDATION_ERROR. See Error Responses for the full list.
Read more: Essentials → Memories · Essentials → MetadataAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
List of memory items to ingest
1Unique identifier for the tenant/organization
"tenant_1234"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
"sub_tenant_4567"
If true, update existing sources with the same source_id.
true
Response
Successful Response
Response model for add_memory endpoint.
true
List of results for each ingested memory item.
Number of items successfully queued for ingestion.
1
Number of items that failed to queue.
1