For years we've talked about code sharing with Kotlin Multiplatform (KMP). This talk explores the next frontier: integrating AI agents directly into your KMP architecture to create intelligent, context-aware mobile applications.
I'll start by explaining KMP and Koog, then I'll demonstrate usages and power of Koog by building a document management app that evolves from a simple KMP baseline to an AI-powered assistant—all from a single codebase serving Android, iOS, and backend.
The Journey:
Act 1: The Foundation
• Building a document scanner app with shared business logic across platforms
• Implementing OCR, storage (SQLDelight), and sync (Ktor) in common modules
• Structuring your KMP project for future agent integration
Act 2: Intelligence Layer with Koog
• What is Koog and how it simplifies AI agent integration in Kotlin
• Adding an agent that auto-classifies documents and extracts key fields
• Enabling natural language queries: "show my last electricity bill"
• Building proactive features: automatic reminders for document renewals
Act 3: Architectural Patterns
• Clean separation between business logic, and agent capabilities.
• How agent integration in KMP actually simplifies your architecture
• Practical patterns for handling agent responses across platforms
• Testing strategies for agent-enhanced features
Act 4: Production Reality
• Battle-tested patterns from scaling KMP at unicorn startups
• Why agent integration in KMP actually reduces complexity (counterintuitive but true)
Key Takeaways:
• Complete architectural blueprint with code samples and diagrams
• Step-by-step guide to adding Koog to existing KMP projects
• Common patterns for agent-UI interaction in multiplatform apps
• Real examples you can adapt for your own use cases
This isn't about AI hype—it's about pragmatically extending your Kotlin skills to build the next generation of mobile apps. You'll leave with actionable insights and real code you can apply immediately.