Koog Firebase

Firebase Vertex AI integration for the Koog Agent Framework.
Features
- Kotlin Multiplatform support (Android, iOS)
- Firebase AI (Google AI / Vertex AI) backend integration
- Seamless integration with Koog agents
- Pre-configured Gemini model definitions
- Streaming response support
- Function calling (tool) support
Installation
Version Catalog
Add to your libs.versions.toml:
[versions]
koog-firebase = "0.5.0"
[libraries]
koog-firebase = { module = "dev.ynagai.koog:koog-firebase", version.ref = "koog-firebase" }
Then in your build.gradle.kts:
dependencies {
implementation(libs.koog.firebase)
}
Gradle DSL
dependencies {
implementation("dev.ynagai.koog:koog-firebase:0.5.0")
}
Usage
Simple Usage
import ai.koog.agents.core.agent.AIAgent
import dev.ynagai.koog.firebase.FirebaseModels
import dev.ynagai.koog.firebase.simpleFirebaseExecutor
val agent = AIAgent(
promptExecutor = simpleFirebaseExecutor(),
systemPrompt = "You are a helpful assistant.",
llmModel = FirebaseModels.Gemini2_5Flash
)
val result = agent.run("Hello!")
Custom Configuration
import dev.ynagai.firebase.Firebase
import dev.ynagai.firebase.ai.GenerativeBackend
import dev.ynagai.koog.firebase.simpleFirebaseExecutor
val executor = simpleFirebaseExecutor(
app = Firebase.app,
backend = GenerativeBackend.vertexAI()
)
Available Models
Requirements
- Kotlin 2.1+
- Firebase project with AI enabled
- Android API 24+ / iOS 13+
License
Copyright 2025 Yuki Nagai
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
https:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.