
Empowers developers to create and manage AI agents with a streamlined DSL, offering error handling, logging, and integration with the ecosystem to transition from PoC to production.
Visit aigentic.io for a complete overview.
Aigentic is a Kotlin Multiplatform library that provides a powerful DSL for building and integrating AI agents into applications. It streamlines the process of creating, deploying, and managing LLM agents within your software ecosystem.
Create agents in a fully type-safe way:
@AigenticParameter
data class WeatherRequest(val location: String)
@AigenticParameter
data class WeatherResponse(
val temperature: String,
val conditions: String,
val location: String
)
val agent = agent<String, WeatherResponse> {
openAIModel {
apiKey("YOUR_API_KEY")
modelIdentifier(OpenAIModelIdentifier.GPT5_5)
}
task("Provide weather information") {
addInstruction("You are a helpful weather assistant")
addInstruction("Use the getWeather tool to fetch current weather conditions")
}
// Add a weather lookup tool
addTool("getWeather", "Get current weather for a location") { req: WeatherRequest ->
WeatherResponse(
temperature = "22°C",
conditions = "Partly cloudy",
location = req.location
)
}
}
val run = agent.start("What's the weather like in Amsterdam?")For complete documentation, examples, and guides, visit aigentic.io
Explore ready-to-use examples in the Aigentic Initializr repository or check our example projects.
To use SNAPSHOT versions, add the Sonatype snapshot repository:
repositories {
mavenCentral()
maven { url = uri("https://central.sonatype.com/repository/maven-snapshots/") }
}./gradlew -q buildA cloud session starts with an empty ~/.gradle and downloads every dependency from Maven Central, which often
answers with 429 Too Many Requests. Two things avoid that:
maven-central-mirror.init.gradle.kts routes Maven Central
traffic through Google's mirror, which doesn't throttle.gradle-dep-cache release. It's built through the mirror, because Gradle caches
dependencies per repository URL, so use the two together.To use them, in Claude Code (desktop or web) edit the settings of your cloud environment:
Environment variable: GRADLE_RO_DEP_CACHE=/opt/gradle-ro-dep-cache
Setup script:
#!/bin/bash
mkdir -p ~/.gradle/init.d /opt/gradle-ro-dep-cache
curl -fsSL --retry 3 -o ~/.gradle/init.d/maven-central-mirror.init.gradle.kts \
https://raw.githubusercontent.com/flock-community/aigentic/main/.github/gradle/maven-central-mirror.init.gradle.kts \
|| echo "Maven Central mirror not installed"
curl -fsSL --retry 3 https://github.com/flock-community/aigentic/releases/download/gradle-dep-cache/gradle-ro-dep-cache.tar.gz \
| tar -xz -C /opt/gradle-ro-dep-cache \
|| echo "Gradle dependency cache not downloaded; Gradle falls back to the network"The setup script's result is cached with the environment for about a week, so sessions don't download the cache each time. Dependencies missing from the cache are still downloaded as usual, through the mirror. An environment can use one read-only cache, so use a separate environment for another Gradle project that publishes its own.
Aigentic is released under the MIT License. See LICENSE for details.
For questions, issues, or feature requests:
Visit aigentic.io for a complete overview.
Aigentic is a Kotlin Multiplatform library that provides a powerful DSL for building and integrating AI agents into applications. It streamlines the process of creating, deploying, and managing LLM agents within your software ecosystem.
Create agents in a fully type-safe way:
@AigenticParameter
data class WeatherRequest(val location: String)
@AigenticParameter
data class WeatherResponse(
val temperature: String,
val conditions: String,
val location: String
)
val agent = agent<String, WeatherResponse> {
openAIModel {
apiKey("YOUR_API_KEY")
modelIdentifier(OpenAIModelIdentifier.GPT5_5)
}
task("Provide weather information") {
addInstruction("You are a helpful weather assistant")
addInstruction("Use the getWeather tool to fetch current weather conditions")
}
// Add a weather lookup tool
addTool("getWeather", "Get current weather for a location") { req: WeatherRequest ->
WeatherResponse(
temperature = "22°C",
conditions = "Partly cloudy",
location = req.location
)
}
}
val run = agent.start("What's the weather like in Amsterdam?")For complete documentation, examples, and guides, visit aigentic.io
Explore ready-to-use examples in the Aigentic Initializr repository or check our example projects.
To use SNAPSHOT versions, add the Sonatype snapshot repository:
repositories {
mavenCentral()
maven { url = uri("https://central.sonatype.com/repository/maven-snapshots/") }
}./gradlew -q buildA cloud session starts with an empty ~/.gradle and downloads every dependency from Maven Central, which often
answers with 429 Too Many Requests. Two things avoid that:
maven-central-mirror.init.gradle.kts routes Maven Central
traffic through Google's mirror, which doesn't throttle.gradle-dep-cache release. It's built through the mirror, because Gradle caches
dependencies per repository URL, so use the two together.To use them, in Claude Code (desktop or web) edit the settings of your cloud environment:
Environment variable: GRADLE_RO_DEP_CACHE=/opt/gradle-ro-dep-cache
Setup script:
#!/bin/bash
mkdir -p ~/.gradle/init.d /opt/gradle-ro-dep-cache
curl -fsSL --retry 3 -o ~/.gradle/init.d/maven-central-mirror.init.gradle.kts \
https://raw.githubusercontent.com/flock-community/aigentic/main/.github/gradle/maven-central-mirror.init.gradle.kts \
|| echo "Maven Central mirror not installed"
curl -fsSL --retry 3 https://github.com/flock-community/aigentic/releases/download/gradle-dep-cache/gradle-ro-dep-cache.tar.gz \
| tar -xz -C /opt/gradle-ro-dep-cache \
|| echo "Gradle dependency cache not downloaded; Gradle falls back to the network"The setup script's result is cached with the environment for about a week, so sessions don't download the cache each time. Dependencies missing from the cache are still downloaded as usual, through the mirror. An environment can use one read-only cache, so use a separate environment for another Gradle project that publishes its own.
Aigentic is released under the MIT License. See LICENSE for details.
For questions, issues, or feature requests: