Skip to content

Commit ab1703c

Browse files
feat: update Koog trip planning agent example (#1401)
Update Koog trip planning agent example --- #### Type of the changes - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Tests improvement - [ ] Refactoring - [x] CI/CD changes - [ ] Dependencies update #### Checklist - [ ] The pull request has a description of the proposed change - [x] I read the [Contributing Guidelines](https://github.com/JetBrains/koog/blob/main/CONTRIBUTING.md) before opening the pull request - [x] The pull request uses **`develop`** as the base branch - [ ] Tests for the changes have been added - [ ] All new and existing tests passed ##### Additional steps for pull requests adding a new feature - [ ] An issue describing the proposed change exists - [ ] The pull request includes a link to the issue - [ ] The change was discussed and approved in the issue - [ ] Docs have been added / updated
1 parent 3773c21 commit ab1703c

14 files changed

Lines changed: 189 additions & 176 deletions

File tree

.github/workflows/trip-planning-example.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
paths:
1010
- 'examples/trip-planning-example/**'
1111

12+
env:
13+
JAVA_VERSION: 17
14+
JAVA_DISTRIBUTION: 'corretto'
15+
1216
jobs:
1317
app-compilation:
1418

@@ -21,11 +25,11 @@ jobs:
2125
run: |
2226
git config --global core.autocrlf input
2327
- uses: actions/checkout@v6
24-
- name: Set up JDK 17
28+
- name: Set up JDK ${{ env.JAVA_VERSION }}
2529
uses: actions/setup-java@v5
2630
with:
27-
java-version: '17'
28-
distribution: 'corretto'
31+
java-version: ${{ env.JAVA_VERSION }}
32+
distribution: ${{ env.JAVA_DISTRIBUTION }}
2933

3034
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
3135
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
@@ -35,3 +39,7 @@ jobs:
3539
- name: Assemble
3640
working-directory: ./examples/trip-planning-example
3741
run: ./gradlew assemble
42+
43+
- name: ktlintCheck
44+
working-directory: ./examples/trip-planning-example
45+
run: ./gradlew ktlintCheck

examples/trip-planning-example/build.gradle.kts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
plugins {
22
alias(libs.plugins.kotlin.jvm)
33
alias(libs.plugins.kotlin.serialization)
4+
alias(libs.plugins.ktlint)
45
application
56
}
67

78
application.mainClass.set("ai.koog.agents.examples.tripplanning.MainKt")
89

910
dependencies {
11+
implementation(libs.koog.agents)
1012
implementation(libs.kotlin.bom)
11-
12-
implementation(libs.kotlinx.serialization.json)
13-
1413
implementation(libs.kotlinx.coroutines.core)
15-
16-
implementation(libs.ktor.client.core)
14+
implementation(libs.kotlinx.datetime)
15+
implementation(libs.kotlinx.serialization.json)
1716
implementation(libs.ktor.client.cio)
1817
implementation(libs.ktor.client.content.negotiation)
19-
implementation(libs.ktor.serialization.kotlinx.json)
18+
implementation(libs.ktor.client.core)
2019
implementation(libs.ktor.client.logging)
21-
22-
implementation(libs.koog.all)
23-
20+
implementation(libs.ktor.serialization.kotlinx.json)
2421
implementation(libs.logback.classic)
2522
implementation(libs.oshai.logging)
2623
}
Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
[versions]
2-
kotlin = "2.3.10"
3-
ktor = "3.1.2"
42
coroutines = "1.10.2"
5-
koog = "0.4.2-feat-1-3"
6-
logback = "1.5.13"
7-
oshai-logging = "7.0.7"
3+
koog = "0.8.0"
4+
kotlin = "2.3.21"
5+
kotlinx-datetime = "0.7.1"
6+
ktlint = "14.2.0"
7+
ktor = "3.4.2"
8+
logback = "1.5.32"
9+
oshai-logging = "8.0.01"
810

911
[libraries]
12+
koog-agents = { module = "ai.koog:koog-agents", version.ref = "koog" }
1013
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
11-
12-
# Serialization
14+
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
15+
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
1316
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json"}
14-
15-
# Ktor
16-
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
1717
ktor-client-cio = { group = "io.ktor", name = "ktor-client-cio", version.ref = "ktor" }
1818
ktor-client-content-negotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor" }
19-
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" }
19+
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
2020
ktor-client-logging = { group = "io.ktor", name = "ktor-client-logging", version.ref = "ktor" }
21-
22-
# Koog (meta-dependency to get all core modules)
23-
koog-all = { module = "ai.koog:koog-agents", version.ref = "koog" }
24-
25-
# Coroutines
26-
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
27-
28-
# Logging
21+
ktor-serialization-kotlinx-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" }
2922
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
3023
oshai-logging = { module = "io.github.oshai:kotlin-logging", version.ref = "oshai-logging" }
3124

3225
[plugins]
3326
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
3427
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
28+
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
-11.5 KB
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#Mon Jun 16 13:32:43 CEST 2025
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

examples/trip-planning-example/gradlew

Lines changed: 32 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)