# OSH-2026 Agent Runtime: A Structured Execution System for Android On-Device Agents

> A course project from the University of Science and Technology of China's OSH-2026 program, this work builds an Agent Runtime deployable locally on Android, featuring a DAG-driven Action Fabric execution framework and on-device LLM inference capabilities, enabling a complete pipeline from model planning to system tool execution.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-06-12T06:15:40.000Z
- 最近活动: 2026-06-12T06:21:08.568Z
- 热度: 143.9
- 关键词: Android, Agent, LLM, 端侧推理, DAG, Rust, Kotlin, gRPC, Action Fabric
- 页面链接: https://www.zingnex.cn/en/forum/thread/osh-2026-agent-runtime-android
- Canonical: https://www.zingnex.cn/forum/thread/osh-2026-agent-runtime-android
- Markdown 来源: floors_fallback

---

## OSH-2026 Agent Runtime: Guide to the Structured Execution System for Android On-Device Agents

This article introduces the OSH-2026 Agent Runtime, a course project from the University of Science and Technology of China's OSH-2026 program. It is an agent execution system deployable locally on Android, with core components including a DAG-driven Action Fabric execution framework and on-device LLM inference capabilities. It enables a complete pipeline from model planning to system tool execution, aiming to build a locally deployable, structured-execution, observable, and extensible on-device agent technology stack.

## Project Background and Overview

**Original Authors/Maintainers**: OSH-2026 Course Organization
**Source**: GitHub (Link: https://github.com/OSH-2026/agent_runtime)
**Release Date**: June 12, 2026
This project is a major assignment for the OSH-2026 course, aiming to build a locally deployable, structured-execution, observable, and extensible Agent Runtime for Android on-device agents. It centers on two subsystems: Action Fabric (structured execution system) and the on-device LLM inference framework, forming a complete technology stack.

## Core Architecture Design and Methodology

### Action Fabric: Explicit DAG Execution System
Traditional agent execution processes are implicit in dialogue contexts, making them difficult to track and debug. Action Fabric innovatively represents the execution process explicitly as a Directed Acyclic Graph (DAG). It validates dependencies before execution, computes the set of ready nodes at runtime, and uniformly controls state, error recovery, and side effects.
### Rust Scheduling Kernel Capabilities
- **DAG Construction and Validation**: Load ActionFlow YAML, automatically establish dependencies, detect duplicate nodes, cyclic dependencies, etc.;
- **Scheduling Strategy**: Compute the set of ready nodes, support batch asynchronous execution of independent nodes, and apply serial constraints to non-idempotent Actions;
- **Fault Tolerance and Recovery**: Support risk levels, confirmation gating, timeout retries, implement bounded recovery mechanisms, and record state transitions and audit logs.

## Android-side Action Runtime Implementation

The Kotlin Runtime has implemented and registered 59 Android Actions, covering device status, app management, network, file, media, and other categories. Examples include:
| Category | Example Action |
|------|------------|
| Device & System | device_info, power_status |
| Network & Connection | network_status, wifi_toggle |
| App & Intent | launch_app, intent_show_map |
| Data & File | read_file, clipboard_copy |
| Personal Info | search_contacts, read_sms |
| Media & Sensors | take_photo, screenshot |
| System Interaction | set_alarm, media_play_pause |
The Android Runtime runs a gRPC Server as a foreground service, with supporting functions such as permission application and Intent Host.

## Cross-Language Execution Chain and Demo Application

### Cross-Language Execution Chain
Rust-Kotlin communication is implemented via Protocol Buffers and gRPC:
1. Rust RemoteAction forwards tool nodes to the Kotlin Runtime;
2. On the Kotlin side, input decoding, execution, and result encoding are completed via ActionExecutor + JsonCodec + ActionRegistry;
3. The network layer uses Rustls, and cross-compilation verification for Android aarch64 has been completed.
### Tauri Demo Application
A Tauri 2 Android application is provided, supporting: editing ActionFlow YAML, automatic DAG scheduling parsing, calling local/LAN Kotlin Runtime, displaying execution status and results, etc., to verify the complete scenario pipeline.

## Technical Significance and Conclusion

OSH-2026 Agent Runtime demonstrates an engineering path for on-device agents:
1. **Structured Execution**: Convert implicit processes to explicit DAGs, improving observability and controllability;
2. **On-Device Deployment**: Local operation protects user privacy;
3. **Extensible Architecture**: Registry mechanism supports dynamic addition of new Actions;
4. **Cross-Language Collaboration**: Rust's high-performance scheduling complements Kotlin's Android ecosystem.
This project provides a reference architecture paradigm for on-device agent engineering implementation, with practical value in execution reliability, error recovery, and system capability invocation.
