Overview
Ingestion is how you feed data into Synap’s memory system. Every conversation, document, email, or transcript you send throughsdk.memories.create() enters the ingestion pipeline where it is categorized, chunked, entities are extracted and resolved, and the result is persisted across Synap’s vector and graph storage engines.
Ingestion is asynchronous. When you call create(), Synap immediately returns an ingestion_id that you can use to poll the processing status. This design allows high-throughput workloads without blocking your application.
Creating a Memory
Usesdk.memories.create() to send a single document into the ingestion pipeline.
document: the raw content to ingest (full transcript with speaker labels for conversations).document_type: tells the pipeline which extraction and chunking strategy to apply. See Document Types below.mode:long-range(default) orfast. Both run the same pipeline today. See Ingest Modes below.user_id/customer_id: control the memory scope. The effective scope is derived from the combination you pass plus the instance’s B2C vs B2B configuration; see Memory Scopes.document_id: an optional label of your own for the document, returned asdocument_id. It is not a duplicate check: Synap catches repeats by content, so the same content for the same user in the same instance within 7 days returns the first ingestion, whatever the id.
ingestion_id (status "queued") that you poll via sdk.memories.status().
Full parameter reference →
Every parameter, the complete response shape, and the errors raised by
memories.create().Document Types
Thedocument_type parameter tells the ingestion pipeline which extraction and chunking strategies to apply.
For
image and audio types, you provide the text content (description, transcript, or OCR output), not the raw binary file. Media processing and transcription should be handled upstream of Synap.Ingest Modes
mode accepts long-range (the default) or fast. The server accepts either value, but in the current release nothing downstream reads it: both run the same ingestion pipeline, so the choice does not change what is extracted or how long a write takes. You can leave it out.
Ingestion
mode values (fast / long-range) are distinct from retrieval mode values (fast / accurate). The retrieval mode does change what a fetch does; see Retrieval modes. Passing "accurate" to memories.create() or "long-range" to context.fetch() will be rejected. See also Types and enums.Code Examples
Ingesting a Conversation
Ingesting a Document
Ingesting with User and Customer Scoping
When bothuser_id and customer_id are provided, the memory is accessible at both scopes. This is useful when a user’s conversation may contain information relevant to the broader organization.
Batch Ingestion
For bulk workloads, usesdk.memories.batch_create() to submit multiple documents in a single request.
The fail_fast Option
batch_create() takes a fail_fast flag (default False). With False, all documents are processed and invalid ones are rejected individually while valid ones proceed; with True, the entire batch aborts if any document fails validation and no documents are ingested.
Full parameter reference →
The
CreateMemoryRequest fields, fail_fast semantics, and the BatchCreateResponse shape.Recording Conversation Messages
sdk.memories.create() ingests a fully-formed document. For live agents that need to stream messages turn-by-turn (so compaction and get_context_for_prompt() always see the latest history), use sdk.conversation.record_message() instead.
conversation_idmust be a valid UUID string (non-UUID values are rejected) and the same value should be reused across all turns of a single conversation.rolemust be either"user"or"assistant".contentis subject to the per-message size limit listed in Performance & Limits.
message_id, conversation_id, session_id, and recorded_at.
Full parameter reference →
Every parameter, scope rules for
customer_id, the response shape, and the errors raised.Recording Messages in Batch
For backfills or buffered writes,record_messages_batch accepts a list of message dicts:
total, succeeded, failed, and a per-message results[] list.
Use one path per conversation. Recorded turns already become long-term memory: Synap extracts them in the background as the conversation grows and after it ends, through the same pipeline
memories.create() uses. You do not call memories.create() for turns you recorded. See Conversations and transcripts for which call fits which situation.Send each conversation once
Recording turns and ingesting the same content withmemories.create() extracts it twice. Both calls consume credits (see Pricing & Credits, and sdk.credits.estimate() to size an operation before you run it), and the duplicate check only catches identical text, not the same conversation worded two ways.
- Live agent: record every turn with
record_message(),record_messages_batch()orinstance.send_message(). That alone gives you short-term context right away and long-term memory later. Do not also callmemories.create()with the assembled conversation. - Finished conversation you never recorded (a call handled elsewhere, a support chat closed in another system): push it once with
conversation.ingest_transcript(). - Content that is not a recorded turn (documents, emails, a chat export from another tool, backfills): use
memories.create()ormemories.batch_create().
One-Shot Transcript Ingest
For async integrations (where Synap does nothing during a session and everything happens at the end)conversation.ingest_transcript() collapses “stream turns + assemble + ingest + summarize” into a single call. It records the whole transcript, enqueues extraction, and fires a summary compaction, then returns immediately. Nothing sits on a hot path.
record_message:
conversation_idis an arbitrary string: no UUID validation. The server coerces it and echoes the original asexternal_conversation_id.- Idempotent on the same turns. Re-pushing the same transcript returns
status="duplicate"with the originalingestion_id. A different transcript under the same id (or an id whose turns you already recorded live) is accepted withturns_recorded=0and a warning: the stored turns stay as they are and the new text is extracted as one more document. Give every call its ownconversation_id. See Sending the same conversation_id again. analysisdoes double duty: stored verbatim (surfaced at call-start fetch and in the dashboard) and injected into extraction as high-confidence hints.
sdk.fetch(context_mode="conversation-summary"). Full parameter reference: conversation.ingest_transcript.
Checking Ingestion Status
Ingestion is asynchronous. Usesdk.memories.status() to poll the processing state of a submitted document.
Ingestion Statuses
The
partial_success status typically occurs with large documents where some chunks process successfully while others encounter extraction errors. The successfully processed portions are still available for retrieval.Updating Memories
Update an existing memory usingsdk.memories.update(). This is useful when the source document has been edited or when you want to append new information.
Merge Strategies
replace
replace
Completely replaces the existing memory content with the new document. Previous extractions are discarded and re-extracted from the new content. Use when the document has been fully rewritten.
append
append
Adds the new content to the end of the existing memory. Previous extractions are preserved, and new extractions are generated only from the appended content. Use when adding new turns to a conversation.
smart-merge
smart-merge
Intelligently merges the new content with the existing memory. The pipeline detects overlapping sections, deduplicates extractions, and reconciles conflicting information by preferring the newer version. Use when the document has been partially edited.
Deleting Memories
Remove a memory and all its associated extractions permanently.Best Practices
Include speaker labels in conversations
Include speaker labels in conversations
Always prefix conversation turns with speaker labels (
User:, Assistant:, or actual names). The ingestion pipeline uses these labels to correctly attribute preferences, facts, and intents to the right participant.Set user_id and customer_id consistently
Set user_id and customer_id consistently
Use stable, deterministic identifiers for
user_id and customer_id. These IDs form the basis of scoped retrieval. Inconsistent IDs fragment the user’s memory across multiple scopes.Retries are safe
Retries are safe
A
document_id is your own label for a document; it does not stop duplicates. Synap catches a repeat by its content: the same content for the same user in the same instance within 7 days returns the first ingestion, so a retried request does not create a second memory.Provide document_created_at for historical data
Provide document_created_at for historical data
When backfilling historical conversations or documents, set
document_created_at to the original timestamp. This enables accurate temporal reasoning (“What did the user say last month?”).Batch when possible
Batch when possible
For bulk ingestion (backfills, migrations), use
batch_create() with fail_fast=False. This reduces HTTP overhead and allows the pipeline to optimize scheduling.Next Steps
Context Fetch
Query the memories you have ingested for contextual retrieval.
Entity Resolution
Understand how entities are automatically resolved during ingestion.
Context Compaction
Compress long conversations to reduce token costs.
SDK Configuration
Configure SDK behavior, timeouts, and retry policies.