Kotlin Multiplatform and AI Agents: Four Platforms, One Nervous Breakdown
A developer on Habr has shared his experience building AI agents for Android, iOS, Web and the backend at once with Kotlin Multiplatform. In parallel, the team released a macOS desktop app with an alpha version of an agent meant to "replace users." Over six months, the authors ran into a long list of problems, from endless expect/actual declarations to painful notarization of macOS builds and conflicts with Xcode. The case shows that cross-platform development of AI applications remains a serious engineering challenge, even in 2026.
AI-processed from Habr AI; edited by Hamidun News
While the tech industry debates when exactly artificial intelligence will replace programmers, one developer decided to turn that idea on its head. Instead of building an AI that writes code for people, he built an AI agent meant to replace the users themselves. It sounds paradoxical, but it is one of the more interesting practical cases of multiplatform AI application development, and it appeared on Habr in February 2026.
The story began six months ago, when a small team took on an ambitious task: building two products at once. The first is a desktop app for macOS, whose alpha version is already available for download. The second is a full multiplatform project covering Android, iOS, Web and a server backend. The team chose Kotlin Multiplatform, a framework from JetBrains that promises to let developers write shared code for all target platforms. "Promises" is the key word.
In practice, cross-platform development of AI agents turned out to be a walk through a minefield. The main pain point was the expect/actual mechanism, the way Kotlin Multiplatform handles platform differences. The idea is simple: you declare an expected interface in shared code, then implement it separately for each platform. In theory, that is elegant. In practice, once such declarations number in the dozens or hundreds, the project becomes a maze in which every change to shared logic requires synchronized edits on all platforms. For AI agents, where integration with native operating system APIs is unavoidable, this creates cumulative complexity that grows exponentially.
The fight with Xcode deserves a chapter of its own. Apple's development environment has long had a mixed reputation among mobile developers, but paired with Kotlin Multiplatform it shows a special talent for creating problems. Compiling the iOS part of the project through KMP adds a layer of abstraction that periodically breaks for reasons that do not always lend themselves to rational explanation. The author does not shy away from calling things by their names, describing what happens as "scenes of cruelty to Xcode," and anyone who has done cross-platform work on Apple's stack knows this is no exaggeration.
The third problem is notarization of macOS builds. Apple requires all apps distributed outside the App Store to pass an automated check on the company's servers. For release builds, this process can take a significant amount of time, and any failure sends the developer back to the start of the cycle. For a desktop AI agent that needs deep system access to automate user actions, notarization becomes even less predictable. Apple tightly controls which permissions an app receives, and an agent that claims to operate the interface on the user's behalf inevitably draws extra scrutiny from the security system.
Despite all the difficulties, the project reveals an important trend. AI agents, programs able to perform tasks autonomously in place of a human, are becoming the next big direction in the industry. If 2024 and 2025 were defined by chatbots and generative models, 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 on every platform is still immature. This team's experience shows that building a smart agent is only half the job. The other half is making it work the same way on an Android smartphone, an iPhone, in a browser and on a desktop.
The author notes with self-irony that launching a multi-platform KMP project without first consulting a psychotherapist is not recommended. Behind the joke lies a real problem: multiplatform tooling has still not caught up with the ambitions of those who use it. Kotlin Multiplatform has come a long way and has moved beyond experimental status, but when scaled to four or more platforms, it still demands that a team be ready for unexpected engineering challenges.
This case is valuable precisely for its honesty. In an era when every second presentation promises "seamless multiplatform" and "AI that does everything on its own," real development experience paints a very different picture. AI agents really can change how people interact with technology, but the road from prototype to a stable product on several platforms remains thorny. And for now, only those same five percent of enthusiasts, whom the author delicately calls masochists, can walk it.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
