Skip to main content

Aigentic
AI agents with Kotlin

Streamline your LLM development journey with a powerful Kotlin DSL for building and integrating AI agents into applications

Intuitive Kotlin
DSL

Building and integrating AI agents into applications can be complex and challenging. Aigentic streamlines this process with a powerful Kotlin DSL that helps you:

  • Rapidly create and deploy LLM agents
  • Seamlessly integrate with multiple LLM providers
  • Easily define and manage agent tools and capabilities
  • Efficiently handle message processing and context management
  • Transition smoothly from proof of concept to production
  • Iterate quickly based on real-world feedback
aigentic-kotlin-dsl
aigentic-code-example

Why Aigentic

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 ecosystem.

By offering a model-agnostic approach, Aigentic supports multiple LLM providers including OpenAI, Gemini, Ollama, VertexAI, and more. This flexibility allows you to choose the best model for your specific use case without being locked into a single provider.

Additionally, Aigentic bridges the gap between proof of concept and production-ready applications, enabling rapid iteration and improvement based on real-world feedback. In short, Aigentic accelerates AI development, reduces complexity, and improves integration with existing systems.

Create and deploy AI agents with intuitive Kotlin DSL

Integrate with multiple LLM providers seamlessly

Accelerate from proof of concept to production

How

Define

Aigentic provides an intuitive Kotlin DSL for defining AI agents with clear, concise syntax. This approach allows you to specify agent behavior, tools, and capabilities in a type-safe manner. The DSL abstracts away the complexity of working with different LLM providers while giving you full control over your agent's functionality.

Explore the DSL
SimpleAgent.kt
fun agent(question: String) = agent {

@AigenticResponse
data class Answer(val answer: String)

// Configure the model for the agent
openAIModel {
apiKey("YOUR_API_KEY")
modelIdentifier(OpenAIModelIdentifier.GPT4Turbo)
}

// Configure the task for the agent
task("Answer questions about Kotlin Multiplatform") {
addInstruction("Provide concise and accurate answers")
}

// Set context
context {
addText(question)
}

finishResponse<Answer>()
}

// Start the agent and get a run
val run = agent("What is cool about kotlin?").start()

// Print the result
when (val result = run.result) {
is Result.Finished -> println(result.getFinishResponse<Answer>()?.answer)
is Result.Stuck -> println("Agent is stuck: ${result.reason}")
is Result.Fatal -> println("Error: ${result.message}")
}

println("""
Token Usage:
- Input tokens: ${run.inputTokens()}
- Output tokens: ${run.outputTokens()}
- Thinking output tokens: ${run.thinkingOutputTokens()}
- Cached input tokens: ${run.cachedInputTokens()}
""")

val model = openAIModel {
apiKey("YOUR_API_KEY")
modelIdentifier(OpenAIModelIdentifier.GPT4Turbo)
}

Providers

Aigentic is designed to be model-agnostic, allowing you to seamlessly integrate with various LLM providers including OpenAI, Gemini, Ollama, VertexAI, or your own. This flexibility enables you to choose the best model for your specific use case without being locked into a single provider. You can switch between providers with minimal code changes.

Explore Providers

Validate

Aigentic bridges the gap between proof of concept and production-ready applications. With its Kotlin Multiplatform foundation, you can validate your AI agents across different platforms and environments. Aigentic provides tools for monitoring, logging, and managing your agents in production, enabling you to iterate quickly based on real-world feedback.

Vision
Deployment Diagram

Key capabilities

LLM Providers

Aigentic supports multiple LLM providers, giving you flexibility and choice.

Supported: OpenAI, Gemini, Ollama, VertexAI, or your own

Multiplatform

Built with Kotlin Multiplatform for cross-platform compatibility.

Platforms: JVM, JavaScript, Node, Native

Integrations

Aigentic includes a variety of built-in tools for common agent integrations.

Included: HTTP tools, OpenAPI tools

Context

Efficient handling of conversation context and message history.

Features: Memory management, Context caching

Validation

Comprehensive testing utilities for AI agent development.

Features: Mock LLM responses, Test fixtures, Scenario testing

Why Aigentic

Choosing Aigentic means selecting a powerful, flexible library designed for developers who want to build production-ready AI applications with Kotlin's type safety and expressiveness.

Our commitment to ongoing innovation and quality ensures that Aigentic not only meets current demands but also evolves with emerging AI technologies and best practices.

By actively engaging in the open-source community and maintaining transparent development processes, we ensure that Aigentic remains at the forefront of AI agent development. Our focus on developer experience, performance, and reliability provides you with a framework that elevates your AI projects to new heights.