It's Alive! Project KARL is Now Open Source.
Aniket Raj

Aniket Raj @theaniketraj

About: A third-year BTech student & software engineer passionate about AI-driven automation and developer productivity.

Location:
RBH WB, IN
Joined:
Apr 20, 2023

It's Alive! Project KARL is Now Open Source.

Publish Date: Aug 6
6 0

Hey Dev Community!

It’s here.

After months of late-night coding sessions, wrestling with Gradle, architecting APIs, and sharing the journey with all of you, I'm incredibly proud and excited to announce that Project KARL (Kotlin Adaptive Reasoning Learner) is now officially open source!

The repository is public, the code is available, and the first alpha version is ready for you to explore.

Check out Project KARL on GitHub! ↗

A Quick Recap: What is KARL?

For those new to the journey, KARL is my answer to a question that drove this entire project: Can we build powerful, personalized AI without sacrificing user privacy?

KARL is an open-source library, built entirely in Kotlin, for creating on-device, adaptive AI models.

  • Privacy-First: All learning and data storage happen locally. No cloud servers, no data egress.
  • Truly Personal: The AI starts as a blank slate and learns exclusively from an individual user's interactions, creating a deeply personalized experience.
  • Modular & KMP-Powered: Built on a clean, container-based architecture with a Kotlin Multiplatform core, making it flexible and extensible.

From "Build Hell" to a Working Demo

The path to this release was a marathon. I've shared some of the struggles with dependency resolution and build configurations right here on dev.to. But today, I'm thrilled to share the result: a fully functional example application that brings the entire KARL ecosystem to life.

Here it is in action:

GIF of Project KARL Desktop App in action, showing buttons being clicked, the interaction log updating, the confidence trend changing, and the prediction details updating.

What you're seeing is the complete, end-to-end data flow:

  1. A user action is simulated in the Controls panel.
  2. The DataSource sends this interaction to the KarlContainer.
  3. The KLDLLearningEngine performs a trainStep, updating its local model.
  4. The AI Insights panel updates in real-time, showing the Interactions Processed count and the Confidence Trend.
  5. A new prediction is requested, and the Prediction Details panel displays the model's output, including its confidence and alternatives.

All of this happens instantly, on-device, with a persistent state managed by our Room-based DataStorage implementation.

What's in the Box? (The Modules)

The initial release includes:

  • :karl-core: The KMP core with all the essential interfaces and data models.
  • :karl-kldl: A LearningEngine implementation using KotlinDL.
  • :karl-room: A DataStorage implementation using AndroidX Room and KSP.
  • :karl-compose-ui: Reusable Jetpack Compose components.
  • :karl-example-desktop: The fully runnable diagnostic dashboard you see in the GIF!

This is Just the Beginning: An Invitation to Contribute

This is an alpha release. The foundation is laid, but there is so much more to build. I'm officially inviting you to be a part of this journey.

  • Explore the Code: Dive into the repository. I'd love to hear your feedback on the architecture.
  • Run the Example App: Clone the repo and run the desktop app yourself!
  • Read the Docs: The Official Documentation is live with detailed guides.
  • Contribute: Check out the CONTRIBUTING.md and the open issues. Whether you're a Gradle expert, an ML enthusiast, or a Compose wizard, there's a place for you. I'll be adding good first issue labels soon!

Thank you to everyone who has followed along, offered encouragement, and shown interest. This project was born out of a belief in a different kind of AI, and I can't wait to see where we, as a community, take it next.

Let me know what you think in the comments!


AR

Comments 0 total

    Add comment