Mlkit Agent API
Builds autonomous on-device agentic workflows in Android apps using the ML Kit GenAI Agent API powered by Gemini Nano and AICore. Use this skill when implementing conversational agents, multi-turn chat with AgentSession in a ViewModel, autonomous tool calling using Android AppFunctions (@AppFunctionDeclaration and AppFunctionAgentTools.discover), ephemeral single-turn execution with runner.runSingleTurnAsync, or handling GenAiException error resilience. It solves the problem of orchestrating local reasoning loops, typed tool dispatch, and session persistence on-device with zero cloud latency a
Install
npx skills add PanPanFR/oh-my-openkilo --skill mlkit-agent-apigit clone --depth 1 https://github.com/PanPanFR/oh-my-openkilo.git /tmp/oh-my-openkilo
mkdir -p ~/.claude/skills
cp -r /tmp/oh-my-openkilo/archive/skills/android/mlkit-agent-api ~/.claude/skills/mlkit-agent-apiPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
Targeting **AICore Developer Preview**. This skill provides authoritative
execution patterns and failure-prevention rules for on-device agentic workflows
in Android apps.
*** ** * ** ***
## 1. Prerequisites and setup
### Gradle dependencies
// app/build.gradle.kts
dependencies {
// Core ML Kit GenAI Agent API
implementation("com.google.mlkit:genai-agent:1.0.0-alpha1")
// Android AppFunctions dependency for on-device tool declarations
implementation("androidx.appfunctions:appfunctions:1.0.0-alpha13")
}
> \[!IMPORTANT\] Always use official SDK interfaces from
> `com.google.mlkit.genai.agent.*`, `androidx.appfunctions.*`,
> `com.google.mlkit.genai.prompt.*`, and `com.google.mlkit.genai.common.*`.
> Never declare local placeholder interfaces or fallback mocks.
*** ** * ** ***
## 2. Minimal agent and runner initialization
Configure an `Agent` with `Agent.builder` and wrap execution in `AgentRunner`:
import com.google.mlkit.genai.agent.Agent
import com.google.mlkit.genai.agent.AgentRunner
val agent = Agent.builder()
.setName("OnDeviceAssistant")
.setInstructions("You are a helpful on-device assistant.")
.build()
val runner = AgentRunner(agent)
- `Agent.builder` defaults to `maxTurns = 10` automatically to prevent infinite tool loops.
- `AgentRunner` defaults to greedy decoding (`temperature = 0.0f`) for deterministic tool selection and schema compliance.Details
- Skill name
mlkit-agent-api- Repository
- PanPanFR/oh-my-openkilo
- Path
archive/skills/android/mlkit-agent-api/SKILL.md- License
- MIT
- Repo updated
- 2 November 2026
FAQ
What does the Mlkit Agent API skill do?
Builds autonomous on-device agentic workflows in Android apps using the ML Kit GenAI Agent API powered by Gemini Nano and AICore. Use this skill when implementing conversational agents, multi-turn chat with AgentSession in a ViewModel, autonomous tool calling using Android AppFunctions (@AppFunctionDeclaration and AppFunctionAgentTools.discover), ephemeral single-turn execution with runner.runSingleTurnAsync, or handling GenAiException error resilience. It solves the problem of orchestrating local reasoning loops, typed tool dispatch, and session persistence on-device with zero cloud latency a
How do I install the Mlkit Agent API skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add PanPanFR/oh-my-openkilo --skill mlkit-agent-api. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Mlkit Agent API popular?
It lives in PanPanFR/oh-my-openkilo, which has 9 GitHub stars and 1 forks.
Related skills
Adaptive
9PanPanFR/oh-my-openkilo
Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto, and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API, and how to preserve UI, navigation, scroll, and media playback state across configuration changes (such as folding/unfolding a foldable, rotating a device, or resizing a window). It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as button
Agentmemory
9PanPanFR/oh-my-openkilo
Index for agentmemory internals: how it is wired into a host agent, its architecture and ports, configuration flags, capture hooks, MCP tool surface, and REST fallback. Use when installing or debugging agentmemory itself, when a memory tool name or parameter is unclear, or when capture is not recording. For normal recall and save work, use agentmemory-ops instead.
Agentmemory History
9PanPanFR/oh-my-openkilo
Read past work: resume the last session, recap recent sessions, list agent-linked commits, trace a line back to the session that wrote it, or compact the current conversation for handoff. Use when the user says "where were we", "resume", "recap", "session history", "what did we do", "why is this code here", "who wrote this", or "handoff".
Orchestration
9PanPanFR/oh-my-openkilo
Use Orca orchestration for structured multi-agent coordination: threaded messages, blocking ask/reply flows, task dispatch, worker_done/escalation waits, task DAGs, decision gates, coordinator loops, or decomposing work across agents. Use `orca-cli` instead for full ownership handoffs, including requests phrased as "hand off", "handoff", "handover", "give this to another agent", or "another worktree" when the user did not explicitly ask to supervise, monitor, wait for results, or coordinate a DAG. Use `orca-cli` for ordinary terminal control, lightweight terminal prompts, shell commands, Orca
Ml Kit Genai Prompt API
9PanPanFR/oh-my-openkilo
Analyzes Android codebases to implement ML Kit GenAI Prompt API. Use this skill to send natural language requests on-device to Gemini Nano, use structured output with Prompt API, implement prefix caching, optimize the current prompt, or apply best practices.
Model Update Check
9flurdy/agent-skills
Audit Pi startup defaults, model routing, discovery and coordinated migration previews across second-opinion and pi-spend; read-only by default, with separately confirmed native catalog refresh.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.