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.wait_for_completion(ingestion_id, timeout_seconds=300, poll_interval_seconds=2)
Wait for an ingestion job to reach a terminal status (completed, failed, or partial_success). Internally polls memories.status at the requested interval and returns the final status response. Useful for scripts and tests where you need a synchronous result before moving on.

Parameters

ingestion_id
UUID
required
The ingestion job ID to wait on.
timeout_seconds
integer
Maximum time to wait in seconds. Defaults to 300.
poll_interval_seconds
integer
How often to poll for status in seconds. Defaults to 2.

Returns

MemoryStatusResponse — the final status response once the job reaches completed, failed, or partial_success. See memories.status for the full field list.

Example

from maximem_synap import MaximemSynapSDK

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

result = await sdk.memories.create(
    document="User prefers email communication.",
    document_type="ai-chat-conversation",
    user_id="user_789",
    customer_id="cust_456",
    mode="long-range",
)

final = await sdk.memories.wait_for_completion(
    result.ingestion_id,
    timeout_seconds=120,
    poll_interval_seconds=3,
)
print(final.status)         # "completed"
print(final.memory_ids)     # IDs ready to fetch
Prefer this helper over your own polling loop in scripts and integration tests. In production applications, use webhooks instead of long-polling.

Raises

  • TimeoutError — when the job does not reach a terminal status within timeout_seconds.
  • SynapAuthError — when the API key is missing or invalid.
  • SynapNotFoundError — when the ingestion_id is unknown.

See also