Type-safe, coroutine-first framework for building AI-powered applications in Kotlin
Get started in minutes, scale to complex multi-agent systems
Leverage Kotlin's type system for compile-time safety
Built on coroutines for efficient concurrent operations
Intuitive API that reads like natural language
Easy to add custom agents, tools, and integrations
OpenAI, Anthropic, Google Vertex AI, and more
// Create your first agent
val assistant = buildAgent {
id = "assistant-1"
name = "AI Assistant"
description = "A helpful AI assistant"
// Add tools
tool("greet") {
description = "Greet someone"
parameter("name", "string", "Person's name")
execute { params ->
"Hello, ${params["name"]}! 👋"
}
}
// Handle messages
handle { comm ->
when {
comm.content.startsWith("greet ") -> {
val name = comm.content.removePrefix("greet ")
run("greet", mapOf("name" to name))
}
else -> comm.reply("Hi there! Try 'greet NAME'")
}
}
}
Join the growing community of developers building with Spice Framework