Skip to content

Update ADK doc according to issue #1292 - 3 - token compaction#1297

Open
adk-bot wants to merge 1 commit intomainfrom
agent-changes-20260211-234508
Open

Update ADK doc according to issue #1292 - 3 - token compaction#1297
adk-bot wants to merge 1 commit intomainfrom
agent-changes-20260211-234508

Conversation

@adk-bot
Copy link
Collaborator

@adk-bot adk-bot commented Feb 11, 2026

3. Document the new Token-based Compaction feature in Context Compaction.

Doc file: docs/context/compaction.md

Current state:

The documentation only covers sliding window compaction using compaction_interval and overlap_size.

Proposed Change:

Add a new section 'Token-based Compaction'.
Explain that you can alternatively configure compaction based on the estimated token count of the session history.

  • token_threshold: The token count that triggers compaction.
  • event_retention_size: The number of recent raw events to keep uncompressed.
    Mention that if token-based compaction is configured and triggered, it takes precedence over sliding window compaction for that turn.
    Update the EventsCompactionConfig example to show these new parameters.

Reasoning:
The new token-based compaction feature allows for more dynamic context management based on actual token usage rather than just event count. Users need to know how to configure this.

Reference: src/google/adk/apps/compaction.py

@netlify
Copy link

netlify bot commented Feb 11, 2026

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 998a2fa
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/698d1489b6d24f000861b73d
😎 Deploy Preview https://deploy-preview-1297--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@joefernandez joefernandez changed the title Update ADK doc according to issue #1292 - 3 Update ADK doc according to issue #1292 - 3 - token compaction Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants