Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 13, 2025

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

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@netlify
Copy link

netlify bot commented Sep 13, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit e5fc294
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68c5b4e9039b470007ef4cd3
😎 Deploy Preview https://deploy-preview-1494--agent-tars-docs.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.

@ulivz ulivz changed the title feat(tarko-agent): implement context compression strategies WIP: feat(tarko-agent): implement context compression strategies Sep 13, 2025
- 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
@ulivz ulivz force-pushed the feat/context-compression branch from 7c306a2 to 3cda449 Compare September 13, 2025 17:47
@ulivz ulivz changed the title WIP: feat(tarko-agent): implement context compression strategies feat(tarko-agent): implement hierarchical context compression system Sep 13, 2025
- 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
@ulivz ulivz changed the title feat(tarko-agent): implement hierarchical context compression system feat(tarko-agent): hierarchical context compression Sep 13, 2025
…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
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