Skip to main content
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

UUID
required
The ingestion job ID to wait on.
integer
Maximum time to wait in seconds. Defaults to 300.
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

Prefer this helper over your own polling loop in scripts and integration tests. In production applications, poll memories.status at an interval that suits you, or skip the wait and let extraction finish in the background; you do not need wait_for_completion to use a memory later.

Raises

  • TimeoutError: when the job does not reach a terminal status within timeout_seconds.
  • AuthenticationError: when the API key is missing or invalid.
  • ContextNotFoundError: when the ingestion_id is unknown (HTTP 404).

See also