Skip to content

docs(agent): clarify ContextOverflowStrategy (context condensation, not history replacement) - #1061

Open
nurhamdan1987 wants to merge 1 commit into
mainfrom
docs/context-overflow-strategy-clarify
Open

docs(agent): clarify ContextOverflowStrategy (context condensation, not history replacement)#1061
nurhamdan1987 wants to merge 1 commit into
mainfrom
docs/context-overflow-strategy-clarify

Conversation

@nurhamdan1987

Copy link
Copy Markdown
Collaborator

The ContextOverflowStrategy docstring (source of the generated API reference) inaccurately said SUMMARIZE "replaces the full chat history". Rewritten to be accurate and practical; the generated agent.md block is updated to match.

What it now says

  • Context condensation manages the working context sent to the model on a run — not Shared Memory or the stored session history, which is always retained.
  • TRUNCATEdefault; removes the oldest unprotected turns until the context fits.
  • SUMMARIZE — summarizes older context into a shorter form; retains more meaning than truncation but adds latency and model cost.
  • Available in SDK 0.2.46+ (use the current 0.2.47).
  • Precedence, highest first: per-run override (execution_params) → saved agent setting (agent.context_overflow_strategy) → Agent Engine default (truncate).

Verified against 0.2.47: enum values truncate/summarize, field default None, and execution_params maps context_overflow_strategycontextOverflowStrategy (per-run override).

Companion narrative guide + examples: aixplain/sdk-documentation#264.

Note: docs/api-reference/python/aixplain/v2/agent.md is generated by pydoc-markdown. I hand-updated the affected block to match the docstring since the generator isn't run in this environment; a full regen will reproduce equivalent output.

🤖 Generated with Claude Code

…ext, not stored history

The enum docstring inaccurately said SUMMARIZE 'replaces the full chat history'.
Corrected to explain context condensation manages the working context sent to the
model on a run (not Shared Memory or stored session history, which is always
retained); TRUNCATE is the default (removes oldest unprotected turns); SUMMARIZE
adds latency and model cost; available 0.2.46+; precedence per-run > saved > engine
default. Regenerated the API-reference block to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants