Files
Kristopher Overholt 50f7df7f46 Add Kotlin language support to ADK docs (#1768)
* Add Kotlin to hero / front page

* Add quickstart page for Kotlin

* Complete Kotlin quickstart guide and fix hero code sample (#2)

* Replace GitHub repo links with language icons in header (#3)

* Fix header icon FOUC and homepage font weight regression (#4)

* Testing staging pipeline

* Revert test edit (for staging pipeline)

* Update language icon tooltips to indicate GitHub destination (#5)

* Add link to ADK Kotlin release notes (#7)

* Initial commit of ADK Kotlin API reference docs (#6)

* Add script to generate ADK Kotlin API reference docs (#8)

* Update links and link checker ignore list (temporarily) (#9)

* Add ADK Kotlin for Android getting started guide to Advanced setup page (#10)

* Add advanced setup page with steps to "Use ADK Kotlin in Android projects"

* Update temp link checker rules

* Add placeholder folder for adk-samples (#13)

* adding linter/compilation checks for kotlin snippets (#12)

* adding linter/compilation checks for kotlin snippets

* Add Kotlin validation scripts

* Initial commit of Kotlin sample agents for adk-samples (#15)

* Adding kotlin snippet for llm agents (#16)

* Adding kotlin snippets to  Events (#17)

* Pull changes to docs/events/index.md from glaforge-kotlin-snippets

* fixing kotlin event timestamp and longRunningToolIds

* Fix language tags (#19)

* Fix language tags

* Update

* Fix wrapping

* Fix wrapping (again)

* Fix wrapping/format

* Fix language tag on integration page

* Enable check_paths in PyMdown Snippets Extension to make the build fail if a snippet can't be found (#20)

* Update mkdocs config (#21)

* Fix broken links, update URLs to adk.dev, and improve (temp) lychee config (#22)

* Add Kotlin/maven badge to README (#23)

* Adding Kotlin snippets for artifacts  (#18)

* Pull Kotlin snippets for artifacts from glaforge-kotlin-snippets

* Add comprehensive Kotlin snippets for artifacts

* Refactor artifacts documentation to use external Kotlin snippets

* Update Kotlin model to gemini-flash-latest

* Fix GCS initialization in Kotlin artifact snippet

* afixi failing test with capital-agent added to files_to_check

* Fix snippet label syntax for MkDocs build

* Configure proper Gradle project for Kotlin snippets and fix dependencies

* Add KSP support and generated sources to Kotlin snippets build

* fixing capital_agent turnComplete

* Fix syntax error in build.gradle.kts by removing invalid placeholders (#25)

* Adding Kotlin snippets to google-gemini.md (#27)

Pulling kotlin changes to google-gemini.md from glaforge-kotlin-snippets

* Add a warning about not adding an api key to production code. (#28)

* Add a warning about not adding an api key to production code.

* Update note

---------

Co-authored-by: Kristopher Overholt <koverholt@google.com>

* Add ADK Demo App sample showcasing Gemini-powered agents (#29)

This sample demonstrates how to use the Google ADK (Agent Development Kit) in an Android application to create a chat interface powered by a Gemini-based "Fun Facts" agent. The implementation features:
*   Integration with the Kotlin ADK core and processor libraries.
*   A `FunFactsAgent` defined using `LlmAgent` and the Gemini model.
*   A `ChatViewModel` utilizing `InMemoryRunner` for asynchronous message streaming.
*   A modern UI built with Jetpack Compose and Material 3.
*   Build configuration logic for secure API key management via environment variables or `local.properties`.

* Update Kotlin docs and samples to align with adk-kotlin API changes (#30)

Rename GeminiModel to Gemini, @AdkTool/@AdkParam to @Tool/@Param,
adkTools() to generatedTools(), replace DebugRunner with InMemoryRunner,
fix AgentLoader import path, use SingleAgentLoader, bump Kotlin to
2.3.21 and KSP to 2.3.7, and update Android minSdk from 24 to 26.

* adding kotlin info to READMEs (#14)

* Reorganize Android sample agent and add READMEs (#31)

* Move Android sample agent

* Update repo README, add Android README, update sample agent README

* Minor edit to language support tags (#32)

* Remove blog post link (#33)

Will re-add after it's published

* Remove examples link (#34)

* Adding Kotlin snippets for Sessions docs (#26)

* initial kotlins snippets additions to sessions docs

* Updating memory docs with kotlin snippets

* Adding kotlin snippets to session state docs.

* update model to gemini-flash-latest

* sessions examples clean-up

* fixing sessions snippet markers

* adding kotlin session snippets to files to test

* adding callback to memory_example

* Fixing capital agent snippet  (#35)

Fixing file name
Updating adkTool > Tool
Updating GeminiModel > Gemini

* Adding kotlin snippets for tools docs (#36)

* adding function tool kotlin snippets

* adding function_tools snippets to files to test

* Adding kotlin snippets to observability docs (#37)

* initial kotlin observability updates

* adding observability snippets to file check (#38)

* Adding Kotlin snippets to Callbacks docs (#39)

*  kotlin callbacks snippets

* adding callbacks snippets to file check

* Align Kotlin and KSP versions with published 0.1.0 artifacts (#40)

* switch CLI entry points from InMemoryRunner to ReplRunner (#41)

* Switch CLI entry points from InMemoryRunner to ReplRunner

* Fix wording

* Update API reference docs for Kotlin, 2026-05-18 (#42)

* Remove ADK on Android note until published (#43)

* Update Kotlin code samples (#44)

* Rename GeminiModel to Gemini in Kotlin snippets and docs

* Remove broken SessionKey call and use sessionId directly in AgentTool snippet

* Rewrite Go hero snippet to use llmagent API

* Use isFinalResponse with safe access in CapitalAgent snippet

* Use Role.USER constant instead of raw string in SetupExample

* Use full semver v0.1.0 in Kotlin language support tags

* Remove Android setup steps, moving to new property (#45)

* Tutorial Kotlin agent (#46)

* Adding multi-tool-agent snippet and updating tutorial
* Fixing Go language order on tutorial page
* adding multi tool agent example to files to test

* Inline Kotlin get-started code sample

* Kotlin Multi agents snippets (#47)

* Multi-agent kotlin snippets

* Fixing docs tags in multiagent example

* Fix Kotlin language support tags, code samples, and google-gemini.md cleanup (#48)

* Add Kotlin v0.1.0 to language support tags across docs

* Fix MultiToolAgent.kt model string and argument style

* Update MultiAgentExample.kt to use gemini-flash-latest model string

* Fix google-gemini.md: add Kotlin sample, remove unsupported Java tabs

* Remove explicit apiKey from CallbackBasic.kt for consistency

* Standardize Gemini() constructor to use named args in all snippets

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Remove adk-samples directory (moved to google/adk-samples#1969) (#49)

* Update API reference docs for ADK Kotlin 0.1.0 (#50)

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Update API reference docs for ADK Kotlin 0.1.0

* Remove kotlin lycheeignore config (#51)

* Remove adk-samples directory (moved to google/adk-samples#1969)

* Remove Kotlin .lycheeignore config links

---------

Co-authored-by: Toni Klopfenstein <2359976+ToniCorinne@users.noreply.github.com>
Co-authored-by: Jolanda Verhoef <JolandaVerhoef@users.noreply.github.com>
2026-05-19 11:43:42 -05:00

588 lines
12 KiB
CSS

/**
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* Prevent layout shift from scrollbar appearing/disappearing */
html {
scrollbar-gutter: stable;
}
/* Index page styling */
.md-grid {
max-width: 80%;
}
.footer {
padding-bottom: 30vh;
}
.centered-logo-text-group {
display: inline-flex;
align-items: center;
gap: 1.5em;
margin-bottom: 0.5em;
vertical-align: middle;
}
.centered-logo-text-group img {
height: auto;
}
.centered-logo-text-group h1 {
margin: 0;
text-align: left;
}
.install-command-container {
max-width: 600px;
margin: 2.5em auto;
padding: 1.5em 2em;
background-color: var(--md-code-bg-color, #f5f5f5);
border-radius: 8px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
border-left: 5px solid var(--md-primary-fg-color, #526cfe);
margin-top: 30px;
}
.install-command-container p {
font-size: 1.1em;
color: var(--md-default-fg-color);
margin-bottom: -10px;
margin-top: -10px;
}
.install-command-container p code {
font-size: 1.1em;
font-weight: 600;
padding: 0.3em 0.6em;
background-color: var(--md-code-fg-color--light);
text-align: center;
border-radius: 4px;
display: inline-block;
line-height: 1.4;
}
/* Centered install tabs */
#centered-install-tabs .tabbed-labels {
display: flex;
justify-content: center;
width: 100%;
}
/* Copy page button */
button.md-content__button {
background: none;
border: none;
cursor: pointer;
}
button.md-content__button:hover svg {
color: var(--md-accent-fg-color);
}
/* YouTube video grid */
.video-grid {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
.video-item {
flex: 0 1 calc(33.333% - 13.333px);
box-sizing: border-box;
min-width: 250px;
}
.video-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
background: #f0f0f0;
border-radius: 4px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
@media (max-width: 992px) {
.video-item {
flex: 0 1 calc(50% - 10px);
}
}
@media (max-width: 600px) {
.video-item {
flex: 0 1 100%;
}
}
/* YouTube icon */
.youtube-red-icon svg {
fill: #FF0000 !important;
}
/* Header styles */
@media screen and (max-width: 76.1875em) {
.md-header__topic .md-ellipsis {
display: none;
}
.md-header__topic::before {
content: "ADK";
display: block;
padding-left: 0.6rem;
}
}
.md-header__title {
flex-shrink: 1 !important;
min-width: 120px !important;
overflow: hidden !important;
}
/* Constrain header right edge and search bar width on desktop */
@media screen and (min-width: 60em) {
.md-header__inner {
padding-right: 5rem;
}
.md-search__form {
max-width: 12rem;
}
}
/* Language SDK icons in header */
.lang-header-repos {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 12px;
flex-wrap: nowrap;
margin-right: 1rem;
}
/* Language SDK icon links */
.lang-repos {
display: flex;
align-items: center;
gap: 6px;
}
.lang-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
text-decoration: none;
color: var(--md-default-fg-color);
padding: 6px 6px;
border-radius: 4px;
transition: background-color 0.15s ease;
}
.lang-item:hover {
background-color: rgba(0, 0, 0, 0.06);
}
.lang-icon {
width: 24px;
height: 24px;
filter: grayscale(1);
transition: filter 0.15s ease;
}
.lang-item:hover .lang-icon {
filter: grayscale(0);
}
.lang-label {
font-size: 0.55rem;
font-weight: 500;
color: var(--md-default-fg-color--light);
white-space: nowrap;
line-height: 1;
}
/* Responsive: hide labels on medium screens */
@media (max-width: 1100px) {
.lang-label {
display: none;
}
.lang-item {
padding: 4px;
}
}
/* Responsive: hide icons entirely on small screens */
@media (max-width: 700px) {
.lang-repos {
display: none;
}
}
/* Navigation section titles */
nav.md-nav--primary .md-nav__item--section>.md-nav__link {
color: #1565C0;
font-weight: bold;
font-size: 0.8rem;
}
/* Community Resources cards */
.resource-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.5rem;
margin: 2rem 0;
}
@media (max-width: 992px) {
.resource-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 600px) {
.resource-grid {
grid-template-columns: 1fr;
}
}
.resource-card {
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 12px;
text-decoration: none !important;
display: flex;
flex-direction: column;
overflow: hidden;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.resource-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
border-color: #4285F4;
}
.card-image-wrapper {
width: 100%;
aspect-ratio: 16/9;
background-color: #f0f4f8;
overflow: hidden;
position: relative;
}
.card-image-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-content {
padding: 1.0rem;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.card-content .type {
font-size: 0.7rem;
font-weight: 600;
color: #4285F4;
margin-bottom: 0.5rem;
}
.card-content h3 {
font-size: 0.9rem;
color: #1a202c;
margin: 0;
}
.card-content p {
font-size: 0.8rem;
color: #4a5568;
line-height: 1.6;
margin-top: 0.75rem;
flex-grow: 1;
}
.translation-list {
list-style: none;
padding: 0;
display: grid;
gap: 1rem;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.translation-list a {
display: block;
padding: 1rem 1.5rem;
border-radius: 8px;
background: #f7fafc;
border: 1px solid #e2e8f0;
text-decoration: none;
font-weight: 600;
font-size: 0.8rem;
color: #2d3748;
transition: all 0.2s ease-in-out;
}
.translation-list a:hover {
background: white;
border-color: #4285F4;
transform: translateY(-2px);
}
/* Tool cards */
.tool-card-grid {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin: 1.5rem 0;
}
.tool-card {
width: 280px;
padding-left: 10px;
padding-right: 5px;
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 12px;
text-decoration: none !important;
display: flex;
flex-direction: row;
align-items: center;
overflow: hidden;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
border-color: #4285F4;
}
.tool-card-image-wrapper {
width: 64px;
height: 64px;
display: flex;
align-items: center;
justify-content: center;
background-color: transparent;
padding: 0.5rem;
box-sizing: border-box;
flex-shrink: 0;
}
.tool-card-image-wrapper img {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
}
.tool-card-content {
padding: 0.8rem;
display: flex;
flex-direction: column;
flex-grow: 1;
}
.tool-card-content h3 {
font-size: 0.8rem;
font-weight: bold;
color: #1a202c;
margin: 0;
}
.tool-card-content p {
font-size: 0.75rem;
color: #4a5568;
line-height: 1.5;
margin-top: 0.2rem;
flex-grow: 1;
}
/* Dark mode styles */
[data-md-color-scheme="slate"] nav.md-nav--primary,
[data-md-color-scheme="slate"] .md-sidebar--primary,
[data-md-color-scheme="slate"] .md-sidebar--primary .md-sidebar__scrollwrap,
[data-md-color-scheme="slate"] .md-sidebar--primary .md-sidebar__inner {
background-color: var(--md-default-bg-color);
}
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-header__inner {
background-color: var(--md-default-bg-color);
}
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-header * {
color: var(--md-default-fg-color);
}
[data-md-color-scheme="slate"] .md-header svg,
[data-md-color-scheme="slate"] .md-header path {
fill: var(--md-default-fg-color);
}
[data-md-color-scheme="slate"] .md-search__input {
color: var(--md-default-fg-color);
background-color: var(--md-default-bg-color);
border-color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="slate"] .md-search__input::placeholder {
color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="slate"] .md-search__icon svg,
[data-md-color-scheme="slate"] .md-search__icon path {
fill: var(--md-default-fg-color);
}
[data-md-color-scheme="slate"] .resource-card,
[data-md-color-scheme="slate"] .tool-card {
background: var(--md-default-bg-color);
border-color: var(--md-default-fg-color--lightest);
}
[data-md-color-scheme="slate"] .card-content h3,
[data-md-color-scheme="slate"] .tool-card-content h3,
[data-md-color-scheme="slate"] .translation-list a {
color: var(--md-default-fg-color);
background: var(--md-default-bg-color);
}
[data-md-color-scheme="slate"] .card-content p,
[data-md-color-scheme="slate"] .tool-card-content p {
color: var(--md-default-fg-color--light);
}
[data-md-color-scheme="slate"] nav.md-nav--primary .md-nav__item--section>.md-nav__link {
color: var(--md-primary-fg-color);
}
/* Catalog filter buttons */
.catalog-filter-bar {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 24px;
align-items: center;
}
.catalog-filter-label {
font-family: "Google Sans", sans-serif;
font-size: 0.84rem;
font-weight: 700;
color: #5f6368;
padding-right: 4px;
}
[data-md-color-scheme="slate"] .catalog-filter-label {
color: var(--md-default-fg-color--light);
}
.catalog-filter-btn {
padding: 8px 20px;
border: none;
border-radius: 20px;
background: #e8eef6;
color: #3c4043;
cursor: pointer;
font-family: "Google Sans", sans-serif;
font-size: 0.84rem;
font-weight: 500;
transition: background 0.15s ease, color 0.15s ease;
}
.catalog-filter-btn:hover {
background: #dae2ee;
}
.catalog-filter-btn.active {
background: #1a73e8;
color: #ffffff;
}
.catalog-filter-btn.active:hover {
background: #1765cc;
}
[data-md-color-scheme="slate"] .catalog-filter-btn {
background: #2d3748;
color: #c9d1d9;
}
[data-md-color-scheme="slate"] .catalog-filter-btn:hover {
background: #374151;
}
[data-md-color-scheme="slate"] .catalog-filter-btn.active {
background: #4285F4;
color: #ffffff;
}
[data-md-color-scheme="slate"] .catalog-filter-btn.active:hover {
background: #3b78de;
}
/* ========================
ANNOUNCEMENT BANNER
Adapts to light/dark via [data-md-color-scheme].
======================== */
[data-md-color-scheme="default"] .md-banner {
background: #1e293b;
color: #e2e8f0;
}
[data-md-color-scheme="default"] .md-banner a {
color: #93c5fd;
}
[data-md-color-scheme="slate"] .md-banner {
background: #1e1b4b;
color: #c7d2fe;
}
[data-md-color-scheme="slate"] .md-banner a {
color: #a5b4fc;
}
.md-banner {
font-size: 0.8rem;
}
.md-banner .announce-item {
display: flex; align-items: center; justify-content: center;
gap: 8px; flex-wrap: wrap;
}
.md-banner .announce-item a {
text-decoration: none; font-weight: 500; white-space: nowrap;
}
.md-banner .announce-item a:hover { text-decoration: underline; }