Skip to main content
Required ACL: search Keep the last N messages and/or fit a heuristic token budget, optionally dropping tool parts from what is kept (tool parts are stripped before the budget is applied). Returns the trimmed messages plus before/after stats. With no constraints set, the messages are returned unchanged and only the stats are computed - a deliberate, cheap “how big is my context?” probe (no LLM call, no mutation).

Usage

See the full API reference

For more details about input parameters and response fields.
Last modified on October 12, 2026