Compact a session
Summarises older messages in the session into a compact checkpoint message, reducing the context window footprint. Returns a 409 if a response is currently streaming for the session. Returns a 422 if the session history is too short to benefit from compaction. The x-exulu-model-override header is accepted to choose the summarisation model.
Authorizations
Organisation API key. Format: sk_<secret>/<keyname> — the secret portion, a literal slash, and the human-readable key name. The header exulu-api-key is accepted as an alias. A Bearer prefix is tolerated and stripped. Keys with an agent scope are only valid for the scoped agent instance.
Headers
Agent session ID whose history should be compacted.
LiteLLM model ID to use for summarisation, overriding the agent's configured model.
Path Parameters
Agent ID (UUID).
Body
Optional freeform instruction appended to the compaction prompt to guide what the summary should emphasise.
Response
Compaction result including the checkpoint message.
Result returned by compactSession — includes the generated checkpoint message and the number of messages replaced.