design: add Context Offload plugin#762
Merged
lizradway merged 3 commits intostrands-agents:mainfrom May 7, 2026
Merged
Conversation
Contributor
Documentation Preview ReadyYour documentation preview has been successfully deployed! Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-762/docs/user-guide/quickstart/overview/ Updated at: 2026-04-20T16:12:07.773Z |
lizradway
reviewed
Apr 17, 2026
lizradway
reviewed
Apr 20, 2026
lizradway
reviewed
Apr 20, 2026
lizradway
reviewed
Apr 20, 2026
zastrowm
reviewed
Apr 20, 2026
zastrowm
reviewed
Apr 20, 2026
zastrowm
reviewed
Apr 20, 2026
mkmeral
reviewed
Apr 20, 2026
Contributor
Documentation Preview FailedThe documentation deployment encountered an error. Please check the deployment logs for more details. |
mkmeral
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds design document 0009: Context Offloader. This documents the
ContextOffloaderplugin that intercepts oversized tool results viaAfterToolCallEvent, stores each content block individually to a pluggable storage backend with content type preserved, and replaces the in-context result with a truncated preview plus per-block storage references. Includes a built-inretrieve_offloaded_contenttool (enabled by default) so the agent can fetch offloaded content on demand.Implements token-based thresholds using the model's
countTokensmethod, with three storage backends:InMemoryStorage,FileStorage, andS3Storage.Python implementation: sdk-python#2162. TypeScript implementation: sdk-typescript#974.
Part of the context management roadmap.
Related Issues
Type of Change
Checklist
npm run dev