Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt

Use this file to discover all available pages before exploring further.

await sdk.memories.create(document, ...)
Ingest a document into Synap’s memory pipeline. The document is processed asynchronously through the extraction, categorization, entity resolution, and storage stages. The call returns immediately with an ingestion_id you can poll via memories.status().

Parameters

document
string
required
The raw document content to ingest. This can be a conversation transcript, a knowledge base article, a support ticket, or any text content.
document_type
string
required
The type of document being ingested. This determines how the ingestion pipeline processes the content.
ValueDescription
ai-chat-conversationA conversation between a user and an AI assistant
documentA generic document or report
emailAn email message or thread
pdfPDF document content (text extracted)
imageImage descriptions or OCR text
audioAudio transcriptions
meeting-transcriptMeeting transcription content
human-chat-conversationA conversation between two or more humans (coming soon)
support-ticketA customer support ticket or thread (coming soon)
knowledge-articleA structured knowledge base article (coming soon)
noteA freeform note or annotation (coming soon)
document_id
string
An optional external identifier for deduplication. If a document with this ID has already been ingested, the request is rejected as a conflict.
document_created_at
datetime
Timestamp of when the document was originally created. Used for temporal ordering of memories. Defaults to the current time if not provided.
Always provide document_created_at when backfilling historical data. Accurate timestamps improve temporal reasoning during retrieval (e.g., “What did the user say last month?”).
user_id
string
The external user ID this memory is about. Omit for customer- or client-scope ingestion.
customer_id
string
The external customer ID this memory belongs to. Omit for client-scope ingestion. The effective scope is derived by the server from the IDs you pass and the instance’s user-context isolation (B2C/B2B).
mode
string
required
The ingestion processing mode.
ValueDescription
fastOptimized for speed. Uses lighter extraction models. Best for high-volume, real-time ingestion.
long-rangeOptimized for quality. Runs the full extraction pipeline including deep entity resolution, relationship mapping, and graph storage. Best for conversations and important documents.
metadata
object
Arbitrary key-value pairs to attach to the memory. Useful for filtering and organizing memories.

Returns

CreateMemoryResponse with the ingestion job identifiers and initial status.
ingestion_id
UUID
Unique identifier for tracking this ingestion job. Pass this to memories.status or memories.wait_for_completion.
document_id
string
The document identifier (either the one you supplied or one generated by the server).
status
string
Initial status of the ingestion job. Always queued for new submissions.
queued_at
datetime
Server timestamp at which the job was accepted into the queue.

Example

from maximem_synap import MaximemSynapSDK

sdk = MaximemSynapSDK(api_key="synap_your_key_here")
await sdk.initialize()

result = await sdk.memories.create(
    document=(
        "User: I just moved to San Francisco and I'm looking for a good coffee shop.\n"
        "Assistant: Welcome to SF! There are some great options. Do you prefer light or dark roasts?\n"
        "User: Definitely light roasts. I'm also a big fan of pour-over."
    ),
    document_type="ai-chat-conversation",
    user_id="user_789",
    customer_id="cust_456",
    mode="long-range",
    metadata={"conversation_id": "conv_abc", "source": "web-chat"},
)
print(result.ingestion_id)
Ingestion is asynchronous. A successful return means the document has been accepted for processing, not that extraction is complete. Use memories.status, memories.wait_for_completion, or webhooks to track progress.

Raises

  • SynapAuthError — when the API key is missing or invalid.
  • SynapValidationError — when required fields are missing or document_type / mode are not recognized.
  • SynapConflictError — when a document with the same document_id has already been ingested.

See also