Architecture Design and Security Practices for System-Level AI Phones
As mobile artificial intelligence evolves from basic Q&A to system-level task execution, robust architecture and security controls become critical. This article explores the design of system-level AI on smartphones, detailing a six-layer architecture and methods for converting natural language into verifiable, dependent task steps. It highlights strategies for cross-app execution using structured interfaces over UI automation, alongside essential security practices like least-privilege authorization, risk-based confirmation mechanisms, and defenses against malicious external instructions. Additionally, it covers the division of labor between on-device and remote computing, reliability through state management and verification, enterprise evaluation metrics, and a phased roadmap for expanding AI capabilities from low-risk closed loops.
1. From Smart Q&A to System-Level Task Execution
AI capabilities on mobile phones are evolving from “answering questions” to “helping users complete tasks.” The former primarily generates text, voice, or images, while the latter requires understanding user goals, reading necessary context, and operating device features or invoking app capabilities within permitted boundaries.
For example, if a user requests, “Organize tomorrow morning’s meetings into reminders and prepare travel arrangements,” the system must not only recognize the time and location but also distinguish between confirmed and missing information. It then needs to query the schedule, create reminders, and compile route information. If sending messages, booking services, or making payments is involved, the system should further require user confirmation.
The core of such capabilities is not merely adding a chat entry point, but establishing a reliable conversion mechanism from natural language to device actions. Its value should not be measured solely by “how many apps were operated,” but by whether the task was completed correctly, whether the user retains control, and whether recovery is possible upon failure.
Therefore, “unattended” execution is better suited as an automated method for restricted scenarios, rather than a universal promise for all phone operations. Permission conditions, app compatibility, network status, and business risk all determine the achievable scope of automation.
2. System-Level Capabilities vs. Regular App Assistants
Regular app assistants typically only access their own data and features. System-level AI, however, has the opportunity to coordinate device capabilities through controlled interfaces, such as reading authorized schedules, setting reminders, processing notifications, or invoking app-exposed actions.
It must be emphasized that system-level integration does not mean bypassing app permissions, accessing all data, or breaking business restrictions. A rational architecture should let the AI handle understanding and planning, while the permission system and execution components handle constraints and implementation.
The system can be divided into six layers:
- Interaction Entry Layer: Receives requests via voice, text, or other explicit triggers.
- Context Management Layer: Acquires task-related information within authorized boundaries.
- Intent Understanding and Planning Layer: Identifies goals, constraints, and execution steps.
- Policy Control Layer: Checks permissions, risk levels, and confirmation requirements.
- Tool Execution Layer: Implements device or app operations through controlled interfaces.
- Verification and Feedback Layer: Verifies execution results, records status, and explains the outcome to the user.
This layering prevents the model from directly holding all execution power. Even if the model generates an unreasonable action, the policy control layer should be able to prevent it from entering the actual execution flow.
3. Converting Natural Language into Verifiable Tasks
1. Define Goals Before Arranging Actions
Natural language often contains omissions and ambiguities. “Help me handle today’s messages” does not specify whether to summarize, archive, or reply, nor does it define the scope of processing.
A reliable system should first establish a task description, including the target object, expected outcome, time range, permission scope, and prohibited actions. If missing information could affect the result, it should be filled in by asking clarifying questions rather than guessing.
For low-risk tasks, reasonable defaults can be used but must be presented to the user. For example, when organizing notifications, the default could be to generate a summary without automatically deleting the original content. When it comes to funds, identity information, or external sending, vague defaults cannot be relied upon.
2. Split Tasks into Dependent Steps
Cross-app tasks should not be treated as a random string of generated click operations, but rather as a set of steps with prerequisites and completion conditions.
Taking a meeting reminder as an example:
- Retrieve authorized schedule information;
- Confirm meeting time and location;
- Check if a corresponding reminder already exists;
- Create or update the reminder;
- Read the final state and provide feedback.
Here, creating a reminder depends on the meeting time being confirmed; updating a reminder depends on the system recognizing an existing record. Explicitly expressing dependencies reduces duplicate creation and erroneous overwriting.
3. Perform Pre-Execution Checks on the Plan
Once a plan is generated, it should be checked to ensure it aligns with user authorization, contains no irreversible actions, invokes no unnecessary data, and has no lower-risk alternative paths.
For instance, if a user requests “prepare a reply,” the default output should be a draft, not a direct send. Generating content and submitting content are different actions and must be managed separately.
4. Cross-App Execution: Prioritizing Structured Interfaces
1. Structured Interfaces Have Clearer Engineering Boundaries
When an app provides callable controlled interfaces, the system clearly knows what inputs an action requires, what side effects it will produce, and how to determine success. Compared to UI operations, this approach is generally easier to verify, test, and maintain.
When designing interfaces, developers should follow these principles:
- Separate query and modification operations;
- Perform type and range validation on inputs;
- Define clear permission requirements for modification actions;
- Return execution results that can be used for verification;
- Design idempotent mechanisms for repeatable actions;
- Provide clear error classification for failure scenarios.
Idempotency is particularly important. After a network interruption, the system may not know if an action was completed. If a retry results in creating a duplicate schedule, submitting a duplicate order, or sending a duplicate message, it creates actual business risk.
2. UI Automation Should Be a Restricted Supplement
Some apps lack structured interfaces, requiring operations to be completed through UI recognition. However, layout changes, pop-up occlusions, loading delays, and content ambiguity all reduce the reliability of this method.
Therefore, UI automation should not be viewed as an unconditional replacement for interface integration. It requires a clear scope of application, pre-execution checks, and post-execution verification, and must stop if it cannot confirm the target control or page state.
Furthermore, the ability to recognize a UI does not imply the right to process all information within it. Captchas, identity profiles, and other sensitive content on a page must still be subject to independent data and permission rules.
5. Permissions and Security: Ensuring Controllable Automation
1. Least Privilege and On-Demand Authorization
The system should not acquire broad permissions all at once just for the convenience of executing tasks. A more reasonable approach is to request authorization when a specific task requires it, clearly stating the content being accessed, its purpose, and its duration.
Authorization can be categorized into single-task authorization, time-limited authorization, and long-term authorization. Long-term authorization should still allow users to revoke it at any time and provide an understandable usage log.
When the device is locked, the scope of capabilities should be further restricted. The risks of displaying summaries, modifying data, and executing external transactions differ and should not be subject to the same clearance conditions.
2. Set Confirmation Mechanisms Based on Action Risk
Risk assessment should not only look at which feature is called, but also consider data sensitivity, impact scope, and reversibility.
Generally:
- Querying public information or generating local drafts can be executed automatically under explicit authorization;
- Modifying personal schedules or archiving materials should provide a change preview or undo capability;
- Sending external content, submitting transactions, or deleting important data should require explicit confirmation;
- Operations involving authentication or sensitive credentials should follow independent security processes.
The confirmation interface should accurately display the action about to occur, rather than just a generic “Do you want to continue?” Key fields such as the recipient, sent content, amount, or deletion scope should be presented directly to the user.
3. Defend Against Malicious Instructions in External Content
When the system reads web pages, messages, or documents, it may encounter text disguised as operational requests. For example, a piece of content might instruct the system to ignore the user’s goal, export data, or perform extra operations.
Such content should be treated as data to be processed, not as a new source of authorization. User requests, system policies, and external materials must maintain architectural boundaries. Any action proposed by external text cannot independently expand permissions or alter the established task goals.
6. Division of Labor Between On-Device and Remote Computing
System-level AI can utilize on-device processing, remote processing, or a hybrid deployment, but it should not be assumed that one method is superior in all scenarios.
On-device processing reduces some data transmission and can support offline functionality within certain limits, but it is constrained by computing resources, memory, and battery. Remote processing easily handles more complex tasks but must consider network latency, transmission security, and data retention policies.
A common design approach is:
- Complete trigger evaluation, permission checks, and necessary data filtering on-device;
- Prioritize local processing for simple tasks that can be completed locally;
- Transmit only the information strictly necessary for complex reasoning;
- Continue to let device-side controlled components implement execution actions;
- Re-check permissions and risks for plans returned from the remote side.
Data minimization should run through the entire process. If a task requires a meeting time, it should not upload the entire schedule by default; if a task needs a message summary, it should not incidentally transmit irrelevant chat logs.
7. Reliability Through Verification, Not Just Generation
1. Distinguish “Requested” from “Completed”
A successful return from an execution component only indicates that an operation was accepted at a specific level, not necessarily that the user’s goal was achieved.
After creating a reminder, the system should check whether the reminder exists and if the time is correct; after submitting a modification, it should verify the final fields; for asynchronous tasks, it should wait for an explicit status or continuously query, rather than immediately declaring completion.
Result verification can combine interface return values, state reads, and user-visible evidence, but the verification process itself must also follow the principle of minimal data access.
2. Use State Management to Support Pause and Resume
It is recommended to maintain explicit states for tasks, such as pending clarification, pending authorization, executing, pending confirmation, completed, failed, and canceled. State transitions should be triggered by deterministic events and avoid repeated execution of completed steps.
Mobile apps may be reclaimed by the system, and devices may lose connectivity or restart. Therefore, task states need to be persisted according to risk and privacy requirements. Before resuming execution, the system should re-check whether authorization is still valid, whether context has expired, and whether external states have changed.
3. Not All Actions Can Be Rolled Back
Local drafts and some configuration modifications can usually be restored, but once a message is sent, it is impossible to guarantee that the recipient’s viewed content can be erased. Cross-app tasks also do not necessarily have a unified transaction mechanism.
Therefore, irreversible actions should be arranged after confirmation, and feasible validations should be completed before execution. In the event of a partial success, the system needs to report which steps have been completed, which have not, and whether compensatory measures exist. It cannot describe an overall failure as “nothing happened.”
8. How Developers and Enterprises Evaluate Implementation
1. Measure Quality by Complete Tasks
Model answer accuracy is not enough to represent system reliability. Evaluation should cover the complete chain from understanding requirements to result verification, including task completion rate, erroneous operation rate, manual takeover ratio, repeated execution instances, and exception recovery capability.
Simultaneously, unauthorized attempts, sensitive data misuse, and erroneous high-risk action clearance should be recorded separately. Such issues cannot be masked by a high overall completion rate.
2. Establish Reproducible Test Scenarios
Test sets should include normal flows as well as cover information omission, permission denial, app state changes, network interruptions, repeated requests, and external malicious text.
For modification operations, prioritize using isolated test environments and mock data. Testing should not only check the final result but also verify whether intermediate steps accessed unnecessary data, omitted user confirmation, and correctly stopped upon failure.
3. Enterprise Scenarios Require Independent Governance
Enterprise devices involve the boundary between organizational assets and personal information. During deployment, it must be clarified which data can be accessed, which actions require approval, and who views the task records.
Audit records should be able to answer “who authorized what operation when, what steps the system executed, and what the result was,” but should not save all original conversations or sensitive business content by default. Logs also require access control, retention periods, and necessary desensitization processing.
9. Expanding Capabilities from Low-Risk Closed Loops
A rational implementation roadmap is to first select tasks with clear goals, limited impact, and easy verification, such as schedule summaries, reminder organization, and local draft generation. Once permission governance, state management, and exception handling have been validated, the system can gradually expand to cross-app modifications and external submissions.
The long-term value of system-level AI phones is not to remove users entirely from the operation process, but to hand over repetitive labor to verifiable automation while leaving important decisions to the user. A truly mature system must know not only how to execute, but also when to clarify, when to pause, when to request confirmation, and when to refuse to proceed.
