Skip to content

Extend the compaction summarizer section to Kotlin - #2161

Open
happyhuman wants to merge 1 commit into
mainfrom
docs-kotlin-compaction-summarizer
Open

Extend the compaction summarizer section to Kotlin#2161
happyhuman wants to merge 1 commit into
mainfrom
docs-kotlin-compaction-summarizer

Conversation

@happyhuman

Copy link
Copy Markdown
Collaborator

What

  • Adds the Kotlin tab to the Define a Summarizer group on docs/context/compaction.md.
  • Fixes two lines of prose that understated Kotlin.

Why

The group showed Python, Java and TypeScript only, and the prose around it repeated the omission:

Line Before Issue
~199 "LlmEventSummarizer (Python/Java) or LlmSummarizer (TypeScript)" Kotlin also has LlmEventSummarizer
~281 "In Python and Java, customize the prompt_template" Kotlin exposes promptTemplate as a constructor parameter

Kotlin has had LlmEventSummarizer since v0.3.0. This complements the earlier work that covered only the token-threshold config.

Inline, not a new .kt file

The backlog row suggested creating CompactionSummarizer.kt. I did not, deliberately:

  • All four sibling tabs in this group are inline.
  • The page's existing Kotlin tab (token-threshold config) is inline too.

A reader switching between the two Kotlin tabs on one page should not see one transcluded and one inline. Both snippets also reference an undefined rootAgent, exactly as their siblings do, so neither could compile standalone anyway.

The cost is that this tab gets L0 rather than the compiler. L0 does validate every import and named argument against real v0.8.0 signatures — which is the failure mode that matters here — but it cannot see type mismatches. LlmEventSummarizer(model: Model, promptTemplate: String) and EventsCompactionConfig(compactionInterval, overlapSize, summarizer, ...) were both read directly from the v0.8.0 tag.

Verification

Ladder: L0, L3, L5, L6 PASS; L1/L2 PASS across the snippet tree; L4 runSnippets SKIP (no such Gradle task in this repo).

Tracked as KT-28.

The Define a Summarizer group showed Python, Java and TypeScript but not
Kotlin, and two lines of surrounding prose understated Kotlin as a
result: one attributed LlmEventSummarizer to Python and Java only, the
other said only Python and Java can customize the prompt template.
Kotlin has had LlmEventSummarizer since v0.3.0 and exposes
promptTemplate as a constructor parameter.

This is partial coverage rather than an untouched page - the page is
already Kotlin-badged and has a Kotlin tab for the token-threshold
config. That tab is inline, as are all four siblings in this group, so
the new tab is inline too rather than the new .kt file the backlog
suggested; mixing forms between two Kotlin tabs on one page would be
worse than either choice on its own.
@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 990c86c
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/6a872b252e242200087f0ed4
😎 Deploy Preview https://deploy-preview-2161--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@happyhuman happyhuman self-assigned this Aug 20, 2026
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.

1 participant