HarmonyOS 7: DevEco Code & CLI Enable AI Agent-Driven App Development

HarmonyOS 7 introduces DevEco Code, an AI agent that plans and generates code, and DevEco CLI, which executes build, deploy, and test commands, together enabling a goal-oriented development loop with knowledge bases and reusable Skills for verified app delivery.

51CTO HarmonyOS Developer Community
51CTO HarmonyOS Developer Community
51CTO HarmonyOS Developer Community
HarmonyOS 7: DevEco Code & CLI Enable AI Agent-Driven App Development

HarmonyOS 7 introduces two new tools — DevEco Code and DevEco CLI — that together shift HarmonyOS app development from single-point AI assistance to a complete AI Agent development workflow. The core paradigm is: humans set goals, AI decomposes tasks, CLI executes engineering actions, a knowledge base supplies domain knowledge, Skills reuse expert experience, and a verification system provides continuous feedback.

DevEco Code: The AI Agent for HarmonyOS Development

DevEco Code replaces the earlier CodeGenie assistant. It is not merely a code completion tool; it attempts to cover the entire development chain:

Requirement understanding
Solution design
Code generation
Syntax checking
Compilation and build
Package deployment and run
Functional verification
Bug fixing
Log analysis

The goal is to move developers from manually reading documentation, writing code, and debugging errors toward stating a goal and letting the AI handle decomposition and execution.

Three Working Modes: Build, Plan, Goal

1. Build Mode: Direct Execution

Suitable when the developer knows exactly what needs to be done and only needs the AI to implement it. Examples:

Fix this compilation error

Implement this page

Add a feature based on existing code

This mode acts as an execution-oriented assistant.

2. Plan Mode: Plan First, Then Execute

The AI first understands the requirement, breaks down tasks, generates a plan, and then enters the execution phase. Suitable for moderately complex features such as:

Add a login flow

Refactor a page structure

Add multi-device adaptation capability

Plan mode reduces the risk of the AI going off track by clarifying the approach before writing code.

3. Goal Mode: Goal-Oriented Closed Loop

This is the highest-level automation mode. Given a requirement or spec document, the AI automatically performs:

Requirement analysis
Acceptance criteria confirmation
Solution design
Task decomposition
Code generation
Syntax checking
Build and packaging
Simulator/real-device run
Functional verification
Bug fixing

Goal mode can be understood as a more advanced autopilot: it iterates continuously around the final objective rather than completing a single step.

DevEco CLI: The Execution Layer for AI Agents

If DevEco Code is the brain, DevEco CLI is the hands and feet. AI agents must be able to invoke real tools. DevEco CLI encapsulates common HarmonyOS development actions into stable commands that the AI can call reliably.

Key commands include: devecocli create — create project devecocli build — compile and build devecocli device — get device list devecocli emulator — get emulator list devecocli run — deploy and run

This enables the AI to participate in the actual engineering process: creating projects, checking syntax, compiling apps, connecting devices, running apps, viewing logs, and analyzing errors.

Why CLI Matters for AI Agents

Many AI coding tools can write code but do not know how to run the project. DevEco CLI solves the execution-layer problem by breaking the HarmonyOS development flow into stable commands, upgrading the AI from answering questions to participating in the development workflow.

Knowledge Base and Skills: Making AI HarmonyOS-Savvy

Two key capabilities complement the agent:

Knowledge Base — covers HarmonyOS development guides, API references, best practices, version notes, and FAQs. It addresses whether the AI knows the rules.

Skills — reusable expert-experience packages that address whether the AI can perform specific tasks. Examples include:

ArkTS syntax checking
ArkUI development skills
Multi-device adaptation
Log analysis
Automatic bug fixing
Device verification
Local testing
Instrumented testing

Skills act as reusable expert-experience packs. When the AI invokes them, it generates code grounded in real HarmonyOS development rules and practices.

GeWu Platform: The Skills Marketplace

The GeWu platform serves as a HarmonyOS Skills square, solving three problems:

Skills are scattered and hard to discover

Skill quality varies and needs management

Excellent experience is difficult to reuse and share

By platformizing Skills, developers can discover, use, manage, and co-build them. For the ecosystem, this is more important than any single tool because it turns individual experience into reusable assets.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ai-codingHarmonyOSAI AgentArkUIArkTSSkillsDevEco CLIDevEco Code
51CTO HarmonyOS Developer Community
Written by

51CTO HarmonyOS Developer Community

The HarmonyOS Developer Community is a learning-oriented community for developers to learn, communicate, ask questions, and share.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.