Aigentic Documentation

website·Indexed 31 days ago

https://aigentic.io

A Kotlin Multiplatform library for building and integrating AI agents. It features a type-safe Kotlin DSL for agent configuration, support for multiple LLM providers, OpenAPI integration, and workflows to chain multiple agents together for complex tasks.

Tokens
11.9K
Snippets
37
Records
83
Agent score
58%

What's inside Aigentic

  1. Overview of Aigentic AI Automation

    Aigentic is an AI-powered automation platform developed by Flock engineers. Unlike traditional automation that requires structured processes and predefined rules, Aigentic uses AI agents to handle unstructured tasks such as reading and interpreting emails, extracting relevant information, and auto-filling forms or databases. It integrates with existing platforms without requiring a full system overhaul.
  2. Overview of Aigentic

    Aigentic is a model-agnostic Kotlin Multiplatform library that provides a DSL for building, deploying, and managing AI agents. It supports various LLM providers including OpenAI, Gemini, Ollama, and Vertex AI, allowing developers to integrate AI agents into their software ecosystems with a type-safe approach.
  3. Overview of the Aigentic platform for AI agent production

    Aigentic is a platform that streamlines the transition of AI and LLM applications from proof-of-concept (PoC) to production-grade deployment. It reduces development complexity by shortening the feedback loop, allowing developers to integrate agents into existing applications, analyze real-world usage data, modify tasks and prompts, and test improvements against historical data before deployment.
  4. Manage conversation context and memory in Aigentic

    Aigentic provides features for efficient handling of conversation context and message history, including memory management and context caching.
  5. Use Aigentic to build AI agents for product classification

    Aigentic provides a Kotlin Multiplatform DSL for building and integrating AI agents tailored to specific business needs. In the context of regulatory compliance (such as EUDR), it can be used to create specialized classification agents that analyze product descriptions and specifications to determine accurate Harmonized System (HS) codes at scale.
  6. Get started with Aigentic Kotlin DSL

    Aigentic provides a Kotlin DSL designed to streamline the development, building, and integration of AI agents into applications. It supports Kotlin Multiplatform and allows integration with multiple LLM providers.
  7. Implement human-in-the-loop validation with Aigentic

    To ensure high accuracy for regulatory compliance, Aigentic supports a multi-stage validation process to create a 'golden dataset' for AI agents:

    1. Initial Exploration: Test feasibility with a small product set.
    2. Iterative Labeling: Use Aigentic to create interfaces (e.g., via Excel) for humans to review and correct AI classifications.
    3. Golden Dataset Creation: Build a verified set of correctly classified products.
    4. Continuous Improvement: Adapt the agent based on human feedback to increase accuracy.
  8. Create multi-step processing pipelines with Workflow Chaining

    Aigentic allows developers to chain multiple agents together to create complex processing pipelines. Key capabilities include type-safe chaining, multi-agent orchestration, and complex task decomposition.
  9. Create type-safe AI workflows by chaining agents

    For complex tasks, Aigentic allows you to chain multiple specialized agents into a workflow using the thenProcess operator. Each agent in the chain processes the output of the previous agent. Because the workflow is type-safe, the output type of one agent must match the input type of the next agent in the sequence.
    @AigenticParameter
    data class Document(val content: String)
    @AigenticParameter
    data class ProcessedDoc(val cleanedContent: String)
    @AigenticParameter
    data class AnalyzedDoc(val content: String, val keyTopics: List<String>, val sentiment: String)
    @AigenticParameter
    data class Summary(val summary: String)
    
    val cleaner = agent<Document, ProcessedDoc> {
        geminiModel { /* config */ }
        task("Clean and format document") { addInstruction("Remove formatting artifacts") }
    }
    
    val analyzer = agent<ProcessedDoc, AnalyzedDoc> {
        geminiModel { /* config */ }
        task("Analyze document content") { addInstruction("Identify key topics") }
    }
    
    val summarizer = agent<AnalyzedDoc, Summary> {
        geminiModel { /* config */ }
        task("Create concise summary") { addInstruction("Keep under 100 words") }
    }
    
    // Chain agents into a type-safe workflow
    val workflow = cleaner thenProcess analyzer thenProcess summarizer
    
    // Execute the workflow
    val run = workflow.start(Document("Raw document text..."))
    
    when (val outcome = run.outcome) {
        is Outcome.Finished -> println(outcome.response?.summary)
        is Outcome.Stuck -> println("Workflow stuck: ${outcome.reason}")
        is Outcome.Fatal -> println("Error: ${outcome.message}")
    }
  10. Build an AI classification agent with Aigentic

    Aigentic provides a Kotlin Multiplatform DSL for building and integrating AI agents tailored to specific business needs. It can be used to create specialized classification agents that analyze product data (such as descriptions and specifications) to determine specific attributes, such as Harmonized System (HS) codes for regulatory compliance.
  11. Use Aigentic to automate EUDR product classification

    Aigentic provides a Kotlin Multiplatform DSL for building AI agents capable of analyzing large product catalogs to ensure compliance with the EU Regulation on Deforestation-free Products (EUDR). The library can be used to create specialized classification agents that analyze product descriptions and specifications to identify the correct Harmonized System (HS) codes for regulated commodities (e.g., cattle, cocoa, coffee, oil palm, rubber, soya, and wood).
  12. Start and handle the outcome of a Workflow

    To execute a workflow, use the start function with the required initial input. The resulting WorkflowRun provides an outcome that can be one of three states: Finished (success), Stuck (processing issue), or Fatal (failure).
    val workflowRun = workflow.start(initialInput)
    
    when (val outcome = workflowRun.outcome) {
        is Outcome.Finished -> {
            val result = outcome.response
            println("Workflow completed: $result")
        }
        is Outcome.Stuck -> println("Workflow stuck: ${outcome.reason}")
        is Outcome.Fatal -> println("Workflow failed: ${outcome.message}")
    }