🌶️

Spice Framework

Modern Multi-LLM Orchestration Framework

Type-safe, coroutine-first framework for building AI-powered applications in Kotlin

Why Spice?

Simple yet Powerful

Get started in minutes, scale to complex multi-agent systems

Type-Safe

Leverage Kotlin's type system for compile-time safety

Async-First

Built on coroutines for efficient concurrent operations

Clean DSL

Intuitive API that reads like natural language

Extensible

Easy to add custom agents, tools, and integrations

Multi-LLM Support

OpenAI, Anthropic, Google Vertex AI, and more

Quick Start

// 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'")
        }
    }
}

Ready to spice up your AI applications? 🌶️

Join the growing community of developers building with Spice Framework