* Add Kotlin snippet for token-threshold context compaction
The compaction page had no Kotlin at all. EventsCompactionConfig gained
tokenThreshold and eventRetentionSize in adk-kotlin 0.6.0, so the Kotlin tab
shows that pair, matching the TypeScript tab's strategy.
Kotlin sits across the two groupings the prose already draws: the config
attaches to App, as in Python and Java, but supports the token-threshold pair
like TypeScript. Both parentheticals are updated to say so rather than adding
new prose.
The snippet notes that tokenThreshold and eventRetentionSize must be set
together. That is a runtime require, not a compile error, so it is easy to hit:
setting one alone throws "tokenThreshold and eventRetentionSize must be set
together or both null". The same rule applies to compactionInterval and
overlapSize, which Kotlin also supports.
Badged Kotlin v0.7.0 rather than 0.6.0, when the fields landed: appName is
"my-agent" to match the sibling tabs, and hyphens in app names were only
allowed from 0.7.0.
Inline to match the page's other tabs, so CI will not compile it. Extracted,
compiled and ran it against the 0.7.0 pin in a throwaway project:
OK app=my-agent tokenThreshold=1000 retention=1 paired=true.
* Note that Kotlin also supports the sliding-window pair
Self-review finding. The Kotlin tab shows tokenThreshold/eventRetentionSize
while Python and Java show compactionInterval/overlapSize, so a reader
comparing tabs could conclude the strategy is fixed per language. It is not:
EventsCompactionConfig accepts either pair, and exposes hasTokenThresholdConfig
and hasSlidingWindowConfig for each.
* Update compaction.md
Added the explanation for token compaction, and a header section for sliding window section, added the section: What is compaction?
* Update compaction.md
Worked on changes
* Update compaction.md
* Update compaction.md
worked on other 2 comments
* Update compaction.md
* docs: home page
* updates based on feedback
* respond to review feedback
* docs: update gemini selector strings to "flash-latest"
* Update homepage.css
* Replace google.github.io/adk-docs URLs and /adk-docs/ paths with adk.dev
Migrate all hardcoded documentation references to use the new custom
domain. Update root-relative links to remove the /adk-docs/ subpath
prefix since the site will be served from the root of adk.dev.
* Additional fixes
* Rename 'compactor' to 'summarizer' in documentation
Updated documentation to replace 'compactor' with 'summarizer' and adjusted references accordingly.
* Formatting
---------
Co-authored-by: Kristopher Overholt <koverholt@google.com>
I have rewritten the documentation to replace the outdated `SlidingWindowCompactor` with the correct `LlmEventSummarizer`, and I've updated the code example and explanatory text to match.
Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com>
* docs: add language support tags to pages
- replace img.shield tags
- add language support tags where missing
* update Agents page with general tags
* update language and version tagging
- response to review comments
- rename css styles to avoid style name conflicts
* add tags to api-server page