appfunctions

Expose Android app workflows as AppFunctions for AI agent execution.

6.6k|388|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/android/skills --skill appfunctions-android
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appfunctions
Source: https://github.com/android/skills/tree/main/device-ai/appfunctions
Command: npx skills add https://github.com/android/skills --skill appfunctions-android

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify valuable in-app user workflows and expose them as AppFunctions so LLM agents can discover and execute them on-device without relying on UI navigation.

Core Features & Use Cases

  • Workflow Discovery for AppFunctions: Analyze an app’s codebase to recommend high-value AppFunctions (e.g., creating notes, playing media, sending automated/AI-triggered messages, voice commands, and system shortcuts).
  • Implementation & System Configuration: Generate Kotlin AppFunction implementations with the required Gradle/KSP setup and app metadata configuration so the system can index and surface functions.
  • KDoc Refinement for Agent Compatibility: Refine function and serializable documentation to produce agent-usable descriptions (including MCP alignment) so the model invokes tools correctly.
  • Testing & Debugging via ADB: Provide commands to list, invoke, enable/disable, and validate AppFunctions on a connected device or emulator.

Quick Start

Ask an AI to analyze your Android app for AppFunctions by targeting workflows you want agents to perform (like sending a message or creating a note), then generate the required Kotlin implementations and ADB test steps so you can verify registration on a device.

Frequently Asked Questions about appfunctions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Android app workflows as on-device agent actions?

To expose Android app workflows as on-device agent actions, identify high-value user tasks in your codebase and implement them as AppFunctions using Kotlin with the required KSP and Gradle configurations. This allows LLM agents to discover and execute functions without UI navigation.

What SDK versions are required to implement and test AppFunctions?

AppFunctions require a targetSdk of 36 or higher and a compileSdk of 37 or higher. You must also configure the correct KSP and Gradle dependencies, enable aggregation settings, and wire the app metadata XML so the Android system can properly index and surface your functions.

How do I use ADB to test and invoke AppFunctions on a connected device?

You can use ADB commands to list, invoke, enable, disable, and validate AppFunctions on a connected Android device or emulator. The Skill provides JSON-safe ADB execution patterns to test common scenarios like media playback and automated message actions across your registered functions.

How should I write KDoc for Kotlin AppFunctions to ensure agent compatibility?

Refine your Kotlin AppFunction and AppFunctionSerializable KDoc to produce agent-usable descriptions aligned with MCP standards. Clear documentation ensures the LLM correctly understands the tool's purpose, parameters, and expected behavior, allowing the model to invoke functions accurately during on-device execution.

What are the best workflows to expose from an Android app for AI agents?

High-value workflows to expose as AppFunctions include creating notes, playing media, sending automated or AI-triggered messages, executing voice commands, and triggering system shortcuts. Analyzing your app's codebase helps recommend the most useful actions for an agent to perform without relying on UI navigation.

Why are my Kotlin AppFunctions not being discovered by the Android system?

AppFunctions may fail discovery if strict @AppFunction and @AppFunctionSerializable conventions are not followed, or if KSP/Gradle aggregation settings are misconfigured. Ensure your targetSdk is 36+, compileSdk is 37+, and app metadata XML is correctly wired for system indexing.