Expand description
Context management strategy for long-running agent sessions.
Enums§
- Context
Strategy - Strategy for managing the context window.
Functions§
- apply_
sliding_ window - Apply sliding window to a message list: always keep the first message (initial task),
then include as many recent messages as fit within
max_tokens. - inject_
summary_ into_ messages - Inject a summary into a message list, replacing middle messages.
- messages_
to_ text - Render a message list as a plain text transcript for summarization.