Skip to content

About

Mojentic — Kotlin Multiplatform LLM integration framework. Multi-provider broker, tool calling, structured output, streaming, agents, realtime voice. JVM/Android + iOS via KMP.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

82 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mojentic

License: MIT Kotlin 2.3+ Platforms

A modern LLM integration framework for Kotlin Multiplatform (KMP) targeting JVM servers, JVM desktop applications, and Android — with the same library, same API, and same semantics on both targets.

Mojentic provides a clean abstraction over multiple LLM providers with tool support, structured output, streaming, an event-driven agent system, and realtime voice — all built natively on Kotlin coroutines and Flow.

Status: Phase 0 — skeleton. This repository currently contains only the Kotlin Multiplatform project scaffolding (Gradle build, target configuration, quality gates, smoke test). The actual LLM features land in Phase 1+ — see KOTLIN.md in the mojentic-unify monorepo for the full plan, roadmap, and parity-target rationale.

Planned Features

  • 🔌 Multi-Provider Support: Ollama, OpenAI, and Anthropic gateways
  • ⚡ Coroutine-First: suspend + Flow end to end; structured concurrency throughout; cooperative cancellation
  • 🛠️ Tool System: Extensible tool calling with automatic recursive execution, serial (default) or parallel runners
  • 📊 Structured Output: Type-safe @Serializable-derived JSON Schema
  • 🌊 Streaming: Cold Flow<StreamEvent> with full recursive tool execution
  • 🔍 Tracer System: Observability via MutableSharedFlow of TracerEvent, correlation IDs threaded through nested broker / tool calls
  • 🤖 Agent System: Event-driven multi-agent coordination with the ReAct pattern and shared working memory
  • 🎙️ Realtime Voice: OpenAI Realtime API over Ktor WebSockets with server / manual VAD and barge-in
  • 🧩 Per-Provider Modules: mojentic-core, mojentic-ollama, mojentic-openai, mojentic-anthropic, mojentic-realtime-openai — apps pull only what they use

Requirements

  • Kotlin 2.3+ (K2 compiler stable, standard-library Uuid, current KMP target shape)
  • JDK 17 and JDK 21 for the build: 17 compiles the library, 21 runs the Gradle daemon
  • Android: compileSdk 37 or later (Ktor 3.6 brings OkHttp 5.5, which requires it), minimum API 24 (Android 7.0). The build uses AGP 9.4.
  • Gradle: 9.8+ (managed via the wrapper)

Building Locally

The Gradle wrapper is committed (gradle/wrapper/gradle-wrapper.jar + gradlew / gradlew.bat), so a fresh clone is immediately buildable:

./gradlew build                       # compile + test all targets the host can build
./gradlew :mojentic-core:jvmTest      # JVM smoke test
./gradlew ktlintCheck detekt          # lint gate

CI runs the full quality-gate matrix on every push — see .github/workflows/build.yml.

Installation

Not yet published. Targeted for the Phase 0 → Phase 1 transition.

Once published to Maven Central:

// build.gradle.kts
dependencies {
    implementation("com.vetzal.mojentic:mojentic-core:<version>")
    // Add gateways as they ship:
    // implementation("com.vetzal.mojentic:mojentic-ollama:<version>")
    // implementation("com.vetzal.mojentic:mojentic-openai:<version>")
}

Documentation

Dokka HTML output will be published to GitHub Pages on every v* tag. Handwritten use-case guides will live under docs/use-cases/.

See request fidelity and 3.0 migration for nullable completion settings and provider output limits.

License

MIT — see LICENSE.

About

Mojentic — Kotlin Multiplatform LLM integration framework. Multi-provider broker, tool calling, structured output, streaming, agents, realtime voice. JVM/Android + iOS via KMP.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages