Skip to content

docs: add proactive compression docs#806

Merged
opieter-aws merged 5 commits into
strands-agents:mainfrom
opieter-aws:proactive-compression-docs
May 13, 2026
Merged

docs: add proactive compression docs#806
opieter-aws merged 5 commits into
strands-agents:mainfrom
opieter-aws:proactive-compression-docs

Conversation

@opieter-aws
Copy link
Copy Markdown
Contributor

@opieter-aws opieter-aws commented May 1, 2026

Description

Add docs for proactive compression and token counting features

Related Issues

strands-agents/sdk-python#2239

Type of Change

  • New content

Checklist

  • I have read the CONTRIBUTING document
  • My changes follow the project's documentation style
  • I have tested the documentation locally using npm run dev
  • Links in the documentation are valid and working

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-806/docs/user-guide/quickstart/overview/

Updated at: 2026-05-13T18:43:41.048Z

Comment thread src/content/docs/user-guide/concepts/model-providers/index.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

Assessment: Comment

The documentation is well-written and clearly explains a complex feature (proactive context compression). The code snippets follow existing patterns, the section structure is logical, and cross-references between token counting and proactive compression are solid.

Review Notes
  • Correctness: The token counting snippet in index.ts references an undefined agent variable — see inline comment for details.
  • Design doc alignment: The design doc (0008) uses threshold as the parameter name while these docs use compressionThreshold. If the implementation landed with compressionThreshold, this is fine (design doc is aspirational), but worth confirming.

Nice work documenting both the high-level concept and the internals (token estimation strategy, provider support table).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Assessment: Approve

This PR adds clear, well-organized documentation for proactive context compression. The code snippets follow established patterns (function scoping, snippet markers), cross-references between pages are consistent, and the external link to the SDK source code is valid. The prior review comment about the undefined agent variable in the token counting snippet has been resolved. No new issues identified.

@opieter-aws opieter-aws force-pushed the proactive-compression-docs branch from f1761dc to c223bc3 Compare May 5, 2026 18:52
@opieter-aws opieter-aws force-pushed the proactive-compression-docs branch from c223bc3 to f91b048 Compare May 7, 2026 21:04
@opieter-aws opieter-aws force-pushed the proactive-compression-docs branch from f91b048 to 50d94b7 Compare May 7, 2026 21:10
opieter-aws and others added 2 commits May 12, 2026 16:32
Move token counting docs under Advanced Features for native-only
providers, remove from heuristic-only providers, and document the
200k default context window fallback behavior with accuracy caveats.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Assessment: Approve

The PR has been significantly improved since the prior review. The restructuring — distributing token counting docs to individual provider pages and using proactiveCompression: true | { compressionThreshold } API — is cleaner and more discoverable. The documentation is thorough and well-organized.

Review Notes
  • Structure: Good decision to add Token Counting subsections on each provider page rather than a centralized section. The cross-references between pages (relative links from conversation-management, /docs/-prefixed links from provider pages) follow existing repo patterns.
  • API clarity: The dual-form proactiveCompression option (true for default, object for custom threshold) is clearly documented with both the shorthand and explicit usages.
  • Best-effort semantics: The explanation that proactive compression never breaks a working agent (line 354) is an important detail for users.
  • Prior feedback addressed: The undefined agent variable issue is resolved (token counting snippet removed and replaced by per-provider docs).

Comment thread src/content/docs/user-guide/concepts/agents/conversation-management.mdx Outdated
Comment thread src/content/docs/user-guide/concepts/model-providers/amazon-bedrock.mdx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Assessment: Approve

All previously raised feedback has been addressed. The addition of Python code examples, simplified caution section, and generalized token counting intro text ("context management strategies") are good improvements. No new issues found.

@opieter-aws opieter-aws force-pushed the proactive-compression-docs branch from f1493eb to c35cb0a Compare May 13, 2026 16:34
@opieter-aws opieter-aws temporarily deployed to manual-approval May 13, 2026 16:34 — with GitHub Actions Inactive
@opieter-aws opieter-aws requested a review from lizradway May 13, 2026 17:21
lizradway
lizradway previously approved these changes May 13, 2026
Comment thread src/content/docs/user-guide/concepts/agents/conversation-management.mdx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Assessment: Approve (one minor note inline)

The PR is in great shape. All prior feedback has been addressed — typos fixed, Python examples added, caution section simplified, token counting intro generalized. The only remaining item is the "(TypeScript)" label on line 99 of conversation-management.mdx which is now outdated since the section covers both languages.

@opieter-aws opieter-aws merged commit c7755ee into strands-agents:main May 13, 2026
6 of 10 checks passed
@opieter-aws opieter-aws deleted the proactive-compression-docs branch May 13, 2026 18:44
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