Skip to main content
Returns the current compaction state for a conversation. Use this after compact to poll for completion before calling get_compacted. The SDK checks its in-process anticipation cache first. If a compaction_update bundle has been pushed for this conversation, the call returns status="completed" immediately without a network round-trip.

Parameters

str
required
The conversation to inspect. Must be a valid UUID registered via record_message.

Returns

A CompactionStatusResponse describing the current state.
str
Echo of the supplied conversation id.
str
One of "none", "in_progress", "completed", or "failed".
str | None
Identifier of the latest compaction run, when one exists.
datetime | None
When the latest compaction completed.
float | None
Ratio of compacted-to-raw token count for the latest run. Lower values indicate more aggressive compression.
float | None
Quality score for the latest compaction (0.0-1.0). Reflects how well the compacted summary preserves the original conversation’s information.
int | None
For status="in_progress", an estimated number of seconds until completion.
str | None
Failure reason when status="failed".
int | None
Version number of the latest compaction. Increments each time a new run completes.
datetime | None
When the latest compaction run was started.

Example

Raises

  • AuthenticationError: when the API key is missing or invalid.
  • NetworkError: when the SDK cannot reach Synap.

See also