sdk.fetch(context_mode="conversation-summary").
Poll completion with sdk.memories.status(ingestion_id) or sdk.memories.wait_for_completion(ingestion_id).
Parameters
The client’s own call/conversation id. Any string is accepted: it is not validated as a UUID (unlike
record_message). The server coerces it and echoes the original back as external_conversation_id. Reuse a stable id per call (e.g. your telephony provider’s call id, or "{phone}:{call_start_iso}").The conversation content. A plain string is split by the server on the turn grammar; a
List[TranscriptTurn] is preferred because it preserves per-turn timestamps and speaker labels. At most 2,000 turns.Required on B2B (strict-isolation) instances. Not accepted on B2C (
equals_customer): the user_id is the whole identity there, and a call carrying a customer_id is rejected with HTTP 400.Your own per-call analysis JSON (≤ 64 KB). Stored verbatim (returned by conversation-summary fetches and shown in the dashboard) and fed to extraction as high-confidence hints.
The level of your scope ladder this conversation belongs to, for example
{"customer": "acme", "team": "payments", "user": "dana"}. Usually needed once per user: once a user has been placed at a level, customer_id and user_id alone reach their whole chain. The path is stored on the conversation (the first one sent is kept), so later conversation fetches use it without being told. Every level above the one you name must be named. A path is refused (400) if it has a gap, or if nested scoping is off or the ladder has not been accepted. Python 0.4.10 and later. JavaScript and TypeScript 0.5.1 and later, as scope_path (or scopePath).Returns
ATranscriptIngestResponse.
Handle for
sdk.memories.status() / wait_for_completion(). Always set on success, never null, even on the duplicate branch."queued" (extraction enqueued) or "duplicate" (the same turns were already pushed under this id).Number of turns stored by this call. It is
0 when the conversation already had turns stored, even though the transcript is still queued for extraction."in_progress" (compaction enqueued), "already_compacted" (the conversation already has a summary), or "skipped" (no new turns to summarize).What the server could not do with this push, empty when there is nothing to report: no event time was supplied (send
ended_at or per-turn timestamps so recency ranking can order these memories), or the conversation already had turns and they were kept. Python 0.5.17 and JavaScript 0.5.16 and later; before that, read it from .raw..raw: the untyped response dict, for forward compatibility with fields a newer server may add.
Sending the same conversation_id again
The server compares the transcript you send with what it stored for thatconversation_id:
A transcript is never replaced, so give every call its own
conversation_id. If you push a second, different transcript under an id you used before, Synap extracts it again from the new text, and its analysis, type and times replace the first call’s on the conversation. See Conversations and transcripts for when to do that on purpose.
Example
Raises
InvalidInputError: an empty transcript, more than 2,000 turns,conversation_typeover 64 characters,analysisormetadataover 64 KB, a B2B push withoutcustomer_id, or a refusedscope_path(HTTP 400/422).InvalidInputError, before any request: an emptyconversation_idoruser_id, or no transcript (Python 0.5.17 and later).CustomerIdNotAcceptedError, a subclass ofInvalidInputError, before any request: acustomer_idon a B2C instance (Python 0.5.12 and JavaScript 0.5.16 and later).RateLimitError: too many requests (HTTP 429).InsufficientCreditsError: as applicable.AuthenticationErrorwith the message “SDK not initialized”: when called beforeawait sdk.initialize()(Python). JavaScript resolves the client’s identity on the first call instead.AuthenticationError: when the API key is invalid or revoked. A missing key fails earlier, when the client is created (JavaScript) or initialized (Python).NetworkTimeoutError: the SDK could not reach Synap (a timeout, or a refused or dropped connection) after its retries.
See also
- context.fetch (conversation-summary mode): the conversation-start read.
- user.get_profile
- memories.status / memories.wait_for_completion