feat(tarko-agent): hierarchical context compression#1494
Open
Conversation
✅ Deploy Preview for agent-tars-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Add comprehensive context compression framework with multiple strategies - Implement sliding window, tool result, and image compression strategies - Support configurable compression levels (conservative/moderate/aggressive) - Add token estimation system for context management - Enable custom compression strategy development - Maintain backward compatibility with legacy maxImagesCount - Include comprehensive tests and documentation
7c306a2 to
3cda449
Compare
- Fix ChatCompletionContentPart type compatibility issues - Add proper type casting for image content parts - Support both image_url and legacy image types - Ensure build passes with strict TypeScript checks
…y method - Add function overloads to support both sync and async usage - Sync version for existing tests and simple usage - Async version only when sessionId and iteration provided for compression - All existing tests pass without modification - No breaking changes to public API
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.
Summary
Implements a comprehensive hierarchical context compression system for Tarko Agent to prevent context window overflow while preserving important conversation information. This enables agents to run for extended periods without hitting token limits.
Checklist