Skip to main content

HarmonyOS 7's AI Agents: A New Blueprint for Developer Collaboration

HarmonyOS 7 rethinks the OS around AI agents, merging dev-time and runtime tools. A deep look at how this shifts collaborative workflows for developers.

The Operating System as a Collaborator

When HarmonyOS 7's developer beta landed at HDC 2026, most coverage focused on speed boosts and feature lists. But for developers, the real story is deeper: the system is being rebuilt around AI agents. Instead of an OS that merely hosts apps, HarmonyOS 7 aims to understand intent—users state what they want, and the system orchestrates the right capabilities to get it done.

This shift might sound abstract, but it has concrete implications for how developers build and collaborate. If an OS can call your app's functions like a teammate, then your code needs to expose the right interfaces. That's a new kind of collaboration—not just between humans, but between human and machine, and between different AI agents.

Six Layers of Agent Architecture

At the heart of this is HMAF 2.0, HarmonyOS's agent framework. The architecture breaks down into six layers:

  • Xiaoyi, the system-level assistant that acts as the user's entry point.
  • HMAF 2.0, which decomposes requests into subtasks and manages inter-agent communication.
  • The AI foundation, including the open-source openPangu 2.0 model and an on-device 30B model.
  • System-level services like the Ark engine, Star Shield security, and cross-device connectivity.
  • Developer tools: DevEco Code and DevEco CLI.
  • Specific scenarios, such as spatial computing.

For developers, the key takeaway is that apps can now register as agents. A simple example: a marathon sign-up skill exposes its capabilities via declareCapabilities and receives structured tasks via onInvoke. The system matches the user's intent to your declared schema, then hands off a task—no natural language parsing on your end.

Dual-Track Tools: DevEco Code and DevEco CLI

Huawei's tooling strategy is a two-track approach. DevEco Code is the “co-pilot” that plans, writes, compiles, and debugs on its own. DevEco CLI, on the other hand, is a command-line interface that exposes HarmonyOS's atomic capabilities—like build, test, and deploy—so any external agent (Claude, Cursor, or your own) can plug in.

DevEco Code is built on Huawei's self-developed Bifang engine plus the open-source OpenCode framework. Bifang handles the agent's reasoning and tool use, while OpenCode provides the terminal UI and integration points. This hybrid approach lets Huawei optimize deeply for its own toolchain while staying compatible with the broader MCP ecosystem.

Inside DevEco Code, two agents collaborate: Plan Agent breaks down requirements into actionable steps, and Build Agent writes code, compiles, and fixes errors. The plan agent can even modify your UI code for responsive design—like adding breakpoint-based layouts automatically when you mention “works on phone and tablet.”

Real-World Pain: Fragmentation and Tooling Gaps

For smaller teams, the biggest headache is device fragmentation. HarmonyOS spans everything from budget phones to foldables, cars, and wearables. Testing on all of them is impractical, so bugs often surface after release—crashes, layout issues, or performance problems on specific devices.

Huawei offers tools like EasyGo to simplify foldable/tablet adaptation, and an automated UX checker that spots layout issues. But there are gaps. DevEco Code doesn't support Linux, which alienates some server-side developers. And ArkTS still has sparse training data in general-purpose AI models, so generated code often needs 15–20% manual fixes—compared to Swift or Kotlin, where AI is more reliable.

The community is stepping up. Projects like harmonyos-ai-skill pack thousands of lines of HarmonyOS knowledge into a single Markdown file, letting you plug that into Claude, Cursor, or Copilot for better ArkTS support.

How HarmonyOS Differs from Apple and Google

Apple, Google, and Huawei take different paths. Apple's Xcode integrates generic MCP tools via a bridge, letting third-party agents like Claude plug in. Google shut down its open-source Gemini CLI in favor of a closed-source Antigravity, tightly coupled to its own models. Huawei, meanwhile, uses a dual-track approach—DevEco Code for new projects, DevEco CLI for existing CI pipelines.

Pricing also varies. Apple lets you bring your own model (and pay for it), Google charges a per-user fee for enterprise AI, and Huawei offers free access with built-in GLM-5.1, plus the option to switch to DeepSeek or OpenAI. That free entry is a deliberate move to grow the developer base.

Development-Time and Runtime Agents: The Real Test

The ultimate test is whether development-time agents and runtime agents can work together seamlessly. Huawei's keynote put both sides in the same architecture diagram, which suggests they're treated as one strategy. That's a contrast to Apple, which keeps Xcode and Apple Intelligence as separate narratives.

Consider cross-device collaboration. HarmonyOS's distributed bus makes it a system-level feature—code can migrate a video stream to a nearby smart screen with a single call. Android requires stitching together multiple protocols, and Apple's Continuity works but only within its own ecosystem.

Kuaishou's case illustrates the potential. They already had an AI coding tool with 30–40% code generation, but delivery speed didn't improve. The bottleneck was the rest of the workflow—analysis, refactoring, verification. By building a specialized Skill for HarmonyOS concurrency safety, they automated that whole loop, cutting a week's work down to half a day.

What Developers Should Do Now

Here's practical advice for teams exploring HarmonyOS:

  • Decide early: DevEco Code for new projects, DevEco CLI for integrating into existing pipelines.
  • Explore the 70+ Skills available—they solve specific problems like concurrency safety, so you don't reinvent the wheel.
  • Use community knowledge packs like harmonyos-ai-skill to improve AI code quality on ArkTS.

HarmonyOS 7 isn't perfect—Linux support is missing, and AI-generated ArkTS still needs manual fixes. But the direction is clear: an OS where AI agents collaborate with developers and with each other. That's a new kind of collaboration tool, and it's worth watching.

Share this article:

Comments (0)

No comments yet. Be the first to comment!