Skip to content

flock-community/aigentic

Repository files navigation

stability-wip GitHub Workflow Status (with event) Maven Central License Documentation

Aigentic: Streamline Your LLM Development Journey

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.

Features

  • Intuitive Kotlin DSL for agent creation and management
  • Model Agnostic - supports OpenAI, Gemini, Ollama, VertexAI, and more
  • Type-Safe Tools with @AigenticParameter annotation
  • Comprehensive Integration with OpenAPI specifications
  • Cross-Platform - works on JVM, Android, iOS, and JavaScript

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.GPT4O)
    }
    
    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?")

Documentation

For complete documentation, examples, and guides, visit aigentic.io

Examples

Explore ready-to-use examples in the Aigentic Initializr repository or check our example projects.

Development

Using Snapshots

To use SNAPSHOT versions, add the Sonatype snapshot repository:

repositories {
    mavenCentral()
    maven { url = uri("https://central.sonatype.com/repository/maven-snapshots/") }
}

Building

./gradlew build

License

Aigentic is released under the MIT License. See LICENSE for details.

Support

For questions, issues, or feature requests:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9