Appfunctions
Android (Google)OfficialCreated by Google LLCDistributed by Android (Google)
- Skill
- Tool integration
- Software development
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The appfunctions skill provides a structured approach to exposing Android app workflows as AppFunctions. It covers the full development lifecycle, including feature discovery, Kotlin implementation using the androidx.appfunctions library, KDoc optimization for AI agents, and local testing via ADB. It ensures developers can build modular, secure, and discoverable tools that allow AI agents, voice commands, and system shortcuts to interact with app functionality without requiring the user to open the app UI.
What it does
- Analyzes Android codebases to identify workflows suitable for AppFunctions.
- Generates Kotlin code using the androidx.appfunctions library and KSP.
- Refines KDoc and app metadata to improve AI agent understanding and tool selection.
- Provides ADB commands for listing, executing, and managing AppFunction states.
- Supports migration from legacy AppFunction APIs to the modern Service Entry Point architecture.
- Enforces security constraints to ensure only safe, non-destructive tasks are exposed.
When to use it
- When you need to expose app features to AI agents or system-level voice commands.
- When implementing or upgrading to the latest androidx.appfunctions library.
- When you need to optimize existing function descriptions for better LLM or MCP compatibility.
- When testing or debugging AppFunction registration and execution on a local device or emulator.
- When migrating legacy AppFunction implementations to the current service entry point pattern.
Advantages
- Enables seamless, UI-less interaction between AI agents and Android applications.
- Standardizes the implementation process through clear, step-by-step development workflows.
- Improves discoverability and reliability of app tools for AI models.
- Provides robust testing capabilities via direct ADB command integration.
- Ensures backward compatibility through the use of Jetpack libraries.
Usage examples
- “Analyze my app to find features that should be exposed as AppFunctions.”
- The agent will perform a feature discovery analysis, identifying key user workflows and recommending which should be implemented as AppFunctions.
- “How do I implement a 'send message' AppFunction in my Kotlin project?”
- The agent will guide you through generating the necessary Kotlin code, configuring the service entry point, and adding the required annotations.
- “Optimize my AppFunction KDocs so an AI agent knows how to use them.”
- The agent will review your existing KDoc and app metadata, providing refinements to ensure clear, intent-based descriptions for AI models.
- “List all registered AppFunctions on my device for package com.example.app.”
- The agent will provide the specific ADB command to query and display the registered functions for your application.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/android/appfunctions/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip appfunctions.zip -d .agents/skills
Documentation by Google LLC
Analyzes Android apps to identify key user workflows to expose as AppFunctions, such as creating a note, playing media, or sending a message, for AI agents, voice commands, and system shortcuts to run without opening the app UI.
Generates Kotlin code to expose these workflows to the Android system, allowing agents to discover and execute them on-device.
Also refines KDoc documentation and the app description so AI agents correctly understand and use the provided functionality.
Prerequisites
The app must targetSdk 36 or newer and use compileSdk 37 or newer as
AppFunctions, part of the Android platform API, are available from Android 16
onwards.
Always use the Jetpack library because it handles backward compatibility.
Use androidx.appfunctions:appfunctions and the KSP compiler
androidx.appfunctions:appfunctions-compiler, version 1.0.0-beta01 or later.
Workflows
This skill enables the caller to discover features that will be provided to system agents, implement these with AppFunctions, improve function description for agents, and use ADB commands for local evaluation and testing.
The full AppFunction development flow consists of these four steps:
Step 1: Discovery: Analyze Android codebases to identify and recommend potential AppFunctions. Use this step when a user asks to "discover AppFunctions," "find features for AI," or "analyze my app for agentic tools."
Step 2: Implementation and configuration: Generate Kotlin implementations of AppFunctions, manage system-wide configuration, and configure build dependencies. Use this step when a user asks to "implement AppFunctions," "set up the AppFunctions framework," or "configure Hilt for AppFunctions."
Step 3: KDoc refinement: Optimize AppFunction KDoc and the app description for AI agents and Model Context Protocol. If a user asks to "write KDoc", "optimize for MCP", or "refactor tool descriptions for LLMs", use this step.
Step 4: Testing and debugging: Provide commands to interact with AppFunctions using ADB for testing and debugging. If a user wants to "list app functions", "invoke an app function", or "verify app function registration" on a device, use this step.
When the user asks for a subset of the steps, run those steps and any step that the critical constraints require. Then list the skipped steps and ask whether to run them.
If they apply, you must load the following references:
Context and terminology: Defines the ubiquitous language, architecture definitions, and design patterns across the AppFunctions skill suite. Load when you need to understand core architecture terminology or check the distinctions between modern and legacy AppFunctions APIs.
Migration to service entry point : Migrates apps on AppFunctions 1.0.0-alpha09 or lower to the
AppFunctionServiceEntryPointarchitecture from 1.0.0-alpha10, and upgrades apps to 1.0.0-beta01. Load it when a user asks to migrate or upgrade existing AppFunctions code. When you find legacyAppFunctionConfiguration.Providerimplementations,@AppFunctionannotations, orappfn:descriptionattributes, load it and ask the user before you migrate.
Critical constraints
Modular consistency: You must refine KDocs immediately after you generate AppFunction implementations.
Security: Expose only safe, non-destructive tasks that the app's UI already offers on that form factor. Never give agents wide-ranging access to user data or system resources. Never require or return passwords, financial details, private keys, or other highly sensitive personal information.
Descriptions: Describe what each function does, never how an agent must behave. Put call order across functions in the app description, not in function KDoc.
Troubleshooting
If you encounter build-time errors such as Kotlin Symbol Processing (KSP) issues, see Implementation and configuration.
If you encounter runtime errors such as missing services or execution failures, see Testing and debugging.
If you need architecture definitions and vocabulary, see Context and terminology.
If you encounter issues when upgrading AppFunctions, such as errors on
@AppFunction, which is no longer an annotation, see Migration to service entry point.
Files
- ATTRIBUTION.mdAdded by AutoGineer953 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md5.6 KiB
- references/adb-interaction-testing.md4.1 KiB
- references/context.md1.6 KiB
- references/feature-discovery-analysis.md3.2 KiB
- references/implementation-configuration.md13.2 KiB
- references/kdoc-refinement-optimization.md4.7 KiB
- references/migrate-to-service-entry-point.md11.6 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Google LLC
- Publisher
- Android (Google) (Official)
- Distributed by
- Android (Google)
- Source
- android/skills · device-ai/appfunctions · commit bf68e2d
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.txt)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google LLC or Android (Google).
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download appfunctions.zip