mika
它能做什么
它通过 USB 或 Wi-Fi 把你的智能体连接到手机上的 Mika 应用,以便发送、跟踪和回复任务。适合希望电脑上的智能体替自己操作手机的人。
适用场景
- ✓当你想让 Mika 在已连接的 Android 手机上操作应用时。
- ✓当你想让 Mika 在手机上浏览网页或处理文件时。
- ✓当你想查看交给 Mika 的任务进度时。
技能链接
https://github.com/wangzan101/Mika/blob/main/tools/mika/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请让手机上的 Mika 找到我拍的最后三张照片,并列出它们的文件名。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体把你的完整目标和限制发送给 Mika,由 Mika 自行选择手机上的操作。随附的工具让你的智能体可以跟踪进度并获取结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Mika on your phone
Mika runs its own agent on Android. Give it the user's complete goal, target and constraints; it chooses the phone actions. The bundled CLI talks directly to Mika's task API. No MCP client or MCP configuration is required.
Quick start / first connection
Do these in order, without asking the user unless a step says so.
- Pick the command. If
mika --versionworks, usemika. Otherwise use the bundled script (skill-dir = the folder containing this SKILL.md; Python 3.10+): POSIXpython3 <skill-dir>/scripts/mika_cli.py, Windowspy -3 <skill-dir>\scripts\mika_cli.py. Below,mikameans whichever you chose. - Use the connection method the user picked on the phone. You cannot see the phone: if the user has not said which one, ask once.
- USB/ADB:
mika devices --jsonlists ADB phones; runmika connect --device SERIAL --jsonfor the chosen one. This enables computer access through Mika's official bootstrap script. With several phones online, ask the user which one, then keep that device for the whole task. mika doctor --device SERIAL --jsonchecks connection and phone state. Only then submit tasks.
Wi-Fi/private VPN: use --url http://PHONE:8765 --token-file /path/to/token-file (both from the user) instead of --device. Never print, read aloud or put token contents in a command, goal or reply.
Notes:
- ADB mode needs Android platform-tools; the APK must include task API v1 (an older MCP-only APK is insufficient). Humans can run
mika uifor a local task desk; agents should use the commands below.
Common failures
| Symptom | Action |
|---|---|
Device shows unauthorized |
Ask the user to accept the USB debugging prompt on the phone, then rerun devices. |
adb_unavailable |
Install Android platform-tools or pass --adb PATH. |
device_selection, device_offline |
Run devices, choose --device SERIAL; replug or reconnect if offline. |
stale_connection, credentials |
Phone rebooted or token changed: rerun connect. |
connection_info |
Mika's connection information could not be read or is invalid: ask the user to unlock the phone and open Mika once, then rerun connect. |
incompatible_api |
Update the Mika APK on the phone. |
adb / connection errors, phone locked |
Ask the user to unlock the phone and open Mika, then rerun connect. |
Delegate and follow the task
Use a UTF-8 file or stdin for goals and answers containing multiline text. Installation or connectivity does not authorize additional phone actions: preserve the user's requested scope when writing the goal.
mika --device SERIAL task run --goal-file /path/to/goal.txt --json
mika --device SERIAL task wait TASK_ID --timeout 45 --json
mika --device SERIAL task status TASK_ID --json
For a recoverable submission, generate and save a lowercase UUID before the call and pass --request-id UUID. On a compatible phone this is also the task ID. The CLI generates one automatically when the phone advertises task_recovery.
Keep the returned task ID and conversation ID. A successful submission only means that Mika accepted the task.
Wait rule: call task wait --timeout 45 (allowed 1-50) in the foreground, one call at a time, and re-check the returned state each time. A wait never cancels or resubmits; a timeout is not a failure, so never resubmit on timeout. Stop and report to the user when the task needs an answer or phone takeover, or after a reasonable budget (for example 10-15 waits, longer if progress is clearly advancing). Do not build a background polling loop.
| Returned state | Next action |
|---|---|
starting, queued, running, paused |
Read progress; wait again within the active task when appropriate. |
waiting_for_answer |
Inspect question and options. Answer from known user instructions, or ask the user for missing information. |
waiting_on_phone |
Tell the user what needs attention on the phone; an answer command cannot approve or complete this step. |
done |
Report the answer and its actual verification fields. Missing verified means unknown. |
failed, cancelled |
Report the recorded outcome; do not silently start the task again. |
mika --device SERIAL task answer TASK_ID --text-file /path/to/answer.txt --json
mika --device SERIAL task steer TASK_ID --text-file /path/to/additional-instructions.txt --json
mika --device SERIAL task cancel TASK_ID --json
mika --device SERIAL task list --json
Cancellat
常见问题
我需要先做什么设置吗?
需要。手机必须运行 Mika,并能通过 USB 调试或 Wi-Fi 连接,连接方式由你选择。
智能体能看到我的手机屏幕吗?
不能。智能体无法看到手机,所以它会询问你使用哪种连接方式。
需要设置 MCP 吗?
不需要。随附的命令行工具直接与 Mika 的任务接口通信,因此无需 MCP 配置。
详情
作者的原始描述
Delegate tasks to Mika on a connected Android phone, follow progress, add instructions to running tasks, answer task questions, and retrieve results through the bundled CLI. Requires an Android phone running Mika, reachable by USB ADB or Wi-Fi. Use when the user wants Mika to operate phone apps, browse, or work with phone files.
repo: wangzan101/Mika
热度
- GitHub 星标
- 5.2k
- 排名
- #15032
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …