Kotlin Multiplatform and AI agents: four platforms, one nervous breakdown
A developer on Habr shared their experience of building AI agents for Android, iOS, Web, and the backend at once with Kotlin Multiplatform. At the same time…
AI-processed from Habr AI; edited by Hamidun News
While the tech industry debates when artificial intelligence will replace programmers, one developer decided to flip this idea on its head. Instead of building AI that writes code for people, he created an AI-agent designed to replace the users themselves. It sounds paradoxical, but this is exactly what one of the most interesting practical use cases of multi-platform AI application development looks like, which appeared on Habr in February 2026.
The story began six months ago, when a small team took on an ambitious task — to create two products at once. The first is a desktop application for macOS, an alpha version of which is already available for download. The second is a full-fledged multi-platform project covering Android, iOS, Web, and a server backend. They chose Kotlin Multiplatform as their technological foundation — a framework from JetBrains that promises the ability to write shared code for all target platforms. Promises — that's the operative word.
In practice, cross-platform development of AI-agents turned out to be a journey through a minefield. The main pain point became the expect/actual mechanism — the way Kotlin Multiplatform handles platform-specific differences. The idea is simple: you declare an expected interface in shared code, then implement it separately for each platform. In theory, this is elegant. In practice, when such declarations number in the dozens and hundreds, the project becomes a maze where every change to the shared logic requires synchronous fixes on all platforms. For AI-agents, where integration with native operating system APIs is inevitable, this creates cumulative complexity that grows exponentially.
A separate chapter in this story is deserved by the confrontation with XCode. Apple's development environment has long earned a mixed reputation among mobile developers, but when combined with Kotlin Multiplatform, it demonstrates particular ingenuity in creating problems. Compiling the iOS portion of the project through KMP adds an additional layer of abstraction that periodically breaks for reasons not always susceptible to rational explanation. The author doesn't shy away from calling things by their names, describing what's happening as "scenes of abuse to XCode" — and anyone who has worked with cross-platform development under Apple understands this is no exaggeration.
The third problem is macOS build notarization. Apple requires that all applications distributed outside the App Store pass automatic verification on the company's servers. For release builds, this process can take considerable time, and any failure sends the developer back to the start of the cycle. When it comes to a desktop AI-agent that needs deep system access to automate user actions, the notarization procedure becomes even more unpredictable. Apple strictly controls what permissions an application receives, and an agent claiming to control the interface on behalf of the user inevitably draws increased attention from the security system.
Despite all the difficulties, this project reveals an important trend. AI-agents — programs capable of autonomously performing tasks on behalf of a human — are becoming the next big direction in the industry. If 2024 and 2025 were marked by chatbots and generative models, then 2026 is increasingly defined by the concept of agency. Companies from Anthropic to Google are investing in agent frameworks, but the infrastructure for delivering them to end users across all platforms remains immature. This team's experience shows that creating an intelligent agent is half the challenge. The second half is making it work equally well on an Android smartphone, iPhone, in a browser, and on a desktop.
The author himself notes with self-irony that launching a KMP project across multiple platforms without prior consultation with a psychotherapist is not recommended. Behind this joke lies a real problem: multi-platform development tools still haven't caught up with the ambitions of those who use them. Kotlin Multiplatform has come a long way and graduated from experimental technology status, but when scaling to four or more platforms, it still requires teams to be prepared for unexpected engineering challenges.
This case is valuable precisely for its honesty. In an era when every other presentation promises "seamless multi-platform compatibility" and "AI that does everything itself," real development experience shows a completely different picture. AI-agents can indeed change how people interact with technology, but the path from prototype to a stable product on multiple platforms remains thorny. And so far, only those five percent of enthusiasts — whom the author delicately calls masochists — can traverse this path.
Want to stop reading about AI and start using it?
AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.