artemis-ondevice

agent
Guvenlik Denetimi
Basarisiz
Health Uyari
  • License — License: Apache-2.0
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Basarisiz
  • rm -rf — Recursive force deletion command in scripts/fetch-voice.sh
  • network request — Outbound network request in scripts/fetch-voice.sh
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Phone agent that runs on an Android phone: reads the screen and taps, swipes and types to finish a task

README.md

Artemis On-Device

English | 简体中文

A phone agent that runs entirely on an Android phone (Android 11+). You describe a task in plain
language ("open Settings and tell me the battery level"), and the agent reads the screen and taps,
swipes and types until the task is done. Only the model call goes online, to an OpenAI-compatible
or Anthropic endpoint you configure.

This project is an independent Android port developed with reference to
ARTEMIS by Google (Apache-2.0). It is for learning and
research only and is not affiliated with Google; see Disclaimer.

Demo

Adding a model service, running a task, the run details and switching the app language
(also in the repo as docs/demo.mp4):

https://github.com/user-attachments/assets/de1a104c-70e2-4eec-8132-3c98319e0f43

What's new

Voice calls. Say the wake word and talk: what you say is recognized on the phone, a realtime
voice model answers aloud and hands phone work to the agent, and the result is read back. A panel
shows what is heard and said; during the task it shrinks to a small pill (left: Chinese UI).
Direct answers. Time, battery, network and similar questions are answered from the phone's
state in one step, without opening an app (right).

Voice call: the wake word, a task, the agent working in Settings and the answer read back Asking for the time: answered in one step without opening an app

In calls, each finished sentence is recognized again by a bigger on-phone model (Paraformer,
78 MB, downloaded when you set up voice calls rather than bundled), and
the caption is then corrected by your task model with your installed apps' names as context
("高的地图" becomes 高德地图) without slowing the answer.

Clearer screens. Settings opens on six groups (models, running tasks, voice, skills and
experience, connecting other tools, general), each showing what it is set to now (left). Voice holds
the wake word, sensitivity, wake test, keeping wake-up running, the voice call model, the sentence
recognizer download, the voiceprint and web search (right). Home shows today's tasks, success rate,
tokens and cost in one card and the latest five tasks; all limits (steps and tokens) are on the
usage screen; Export logs is under General.

Settings start page: six groups, each with its current state Voice settings: wake-up and voice calls

Download

Get the APK from Releases and install it on an
Android 11+ phone. On Android 13 and later, the accessibility switch may be greyed out ("Restricted
setting") for an app installed outside an app store: open Settings > Apps > Artemis On-Device, tap
the ⋮ menu, choose Allow restricted settings, then turn the service on.

How it works

Each step: screenshot + indexed UI element list (accessibility service) -> one model call with
tools -> the tool calls run on the phone (tap / long_press / type_text / swipe / back /
home / open_app / wait / finish). The element index is used first, with 0-1000 normalized
coordinates as the fallback. There is no step cap by default; the last few steps are kept as text
history and only the latest screenshot is sent.

Features

  • Floating bubble (accessibility overlay, no extra permission): live step and phase. Tap it to
    pause the run, stop it, open details, start a new task or run the last one again.
  • History: every run is stored with per-step screenshots, actions, reasoning, timings and
    tokens (files/runs/<id>/, newest 100 kept).
  • Run details: result, total and per-step time, model median / P90 / max, model share of time,
    screen-read and action averages, tokens in / out, failed actions, a per-step timing chart and
    the step-by-step record.
  • Skills (record and replay): save a completed run as a skill; the same task then replays the
    recorded steps without model calls, with one final model call to check the screen and answer.
    If a recorded target is missing, the model takes over from there.
  • Confirmation: before sending, calling, paying, buying, deleting, posting, inviting or changing a
    setting, the agent asks you at the bottom of the screen (Allow / Allow for this task / Don't allow).
    It can also ask you to choose when the task leaves something open.
  • Usage and limits: token use per day, model and purpose, with an estimated cost from a built-in
    price list (LiteLLM, about 1,800 models) or a price you enter; a per-task and a daily token limit keep a run from burning tokens.
  • Experience: after each task the model reviews which steps were wasted and distills lessons
    (principles, patterns for kinds of screens, facts about one app). A lesson reaches later tasks once
    two tasks drew or confirmed it, or you approve it in Settings > Experience; lessons whose tasks keep
    failing drop back. Lessons stay on the phone and leave out personal data.
  • Model services: built-in presets or a custom OpenAI-compatible / Anthropic endpoint. The
    model list can be fetched from the service, and the connection can be tested.
  • Privacy: API keys are encrypted with an Android Keystore AES-GCM key and never logged. The
    base URL is masked on screen by default (tap the eye icon to show it) and removed from error
    messages. No network port is opened unless you turn on the MCP server. Logs carry states,
    timings and names only; keys, addresses and phone numbers are masked.
  • MCP server (optional, off by default): AI tools on your computer, such as Claude Code or
    Cursor, can give the phone tasks or operate it directly over MCP; see docs/mcp.md.
  • Language: Settings > Language switches the app between Simplified Chinese and English, or
    follows the system.
  • Voice wake-up (optional, Mandarin only): say "小特小特" (changeable), then say the task. Wake word,
    recognition and speech run offline on the phone; see docs/voice-design.md.
  • Voice calls (optional, online): pick a realtime voice model (for example Qwen-Audio realtime)
    as the voice call model, and the wake word starts a call instead: talk back and forth, interrupt
    at any time, confirm sensitive actions by voice, and hear the result. Speech is recognized on the
    phone and only text is sent; say "停下" to stop a task or "结束对话" to hang up. The wake word can be
    changed, and a voiceprint makes calls ignore other people nearby.
  • Direct answers: the agent and voice calls see the phone's state (time, battery, network,
    Wi-Fi / Bluetooth / airplane, ringer and do not disturb, volume, brightness, screen timeout,
    storage, device), so such questions are answered in one step without opening an app. Apps are
    used when the task needs one or names one ("open Clock and tell me the time").
  • Voice wake-up that stays up: it checks itself every 30 s and says so in the notification when
    Android takes the microphone away; Settings shows whether battery optimization may stop it.
  • Logs: every flow is logged to a file on the phone (7 days, no private content); Settings > General >
    Export logs shares them for troubleshooting. See docs/logging.md.
  • Money is off limits: banking, payment, wallet, securities and crypto apps (including WeChat, QQ
    and Alipay) are never operated, tasks about transfers, payments or purchases are refused, and
    buttons that pay, transfer or buy are never tapped. This avoids account bans and misuse for fraud,
    and cannot be turned off.

Requirements

  • JDK 17 (Android Studio's bundled JDK works)
  • Android SDK with platform 35 (sdk.dir in local.properties)
  • A phone or emulator on Android 11 (API 30) or later

Build and install

scripts/fetch-voice.sh            # once: voice library and offline models (git-ignored)
scripts/dev-install.sh            # build, install on emulator-5554, re-bind accessibility
scripts/dev-install.sh <serial>   # another device
python3 scripts/regression.py     # regression run on a connected phone or emulator (debug build)

./gradlew assembleDebug -Partemis.abi=arm64-v8a builds for one ABI only (a smaller APK for
quick installs).

The APK alone: ./gradlew assembleDebug -> app/build/outputs/apk/debug/app-debug.apk.

Reinstalling unbinds the accessibility service; the script removes and re-adds it. On a phone you
can also turn it on in Settings > Accessibility > Artemis On-Device.

Getting started

  1. Turn on the accessibility service when the home screen asks for it.
  2. Tap Add model, pick a preset or enter your own base URL, API type and API key, then
    Fetch from service or type a model ID, and Save.
  3. Type a task on the home screen and tap Start. Follow it in the floating bubble; the run
    details open when it ends.

For voice calls: turn on Voice wake-up, add a service that has a realtime voice model (for
example Qwen-Audio realtime; enter its Realtime voice URL, such as
wss://<host>/api-ws/v1/realtime), and pick it as the Voice call model. Optionally change the
wake word and record a voiceprint in the same section.

A model service can also be added over adb (only adb shell / system can send this broadcast):

adb shell am broadcast -a com.artemis.ondevice.IMPORT_PROVIDER -n com.artemis.ondevice/.ProviderImportReceiver \
  --es id my-llm --es name "My LLM" --es base_url https://example.com/v1 --es api openai-completions \
  --es models "model-a,model-b" --es active_model model-a --es api_key <key>

Emulator tips

  • If the emulator can reach IP addresses but not domain names, start it with explicit DNS servers:
    emulator -avd <name> -dns-server 8.8.8.8,1.1.1.1.
  • adb shell am force-stop com.artemis.ondevice turns the accessibility service off; run
    scripts/dev-install.sh again to turn it back on.

Contributing

See CONTRIBUTING.md and CHANGELOG.md.

Commit checks

.githooks/ rejects commit messages with a co-author or "generated with" attribution line, and
commits whose author or added lines match a pattern in .git/info/blocked-patterns (local, never
pushed; one extended regex per line). Turn the hooks on once per clone:

git config core.hooksPath .githooks

Known limits

  • Screens with FLAG_SECURE (payments, passwords) give no screenshot; the model then only gets the
    element list.
  • takeScreenshot is rate-limited by Android (~3/s); one retry is built in.
  • Some apps hide controls from accessibility services; the model locates those from the
    screenshot.
  • Aggressive OEM battery savers may stop the run in the background; allow the app to run
    unrestricted there.
  • Voice recognition and the wake word are Mandarin only.
  • Voice calls need a realtime voice model service (Qwen-Audio realtime protocol); with web search
    on, that service sometimes takes 10-30 s to answer.

Acknowledgements

  • google/artemis (Apache-2.0): the design this project follows,
    including the Flash observe-and-act loop, the tool set, element-index-first targeting with
    normalized-coordinate fallback, and the model provider registry. This project re-implements
    them in Java to run on the phone itself through an accessibility service, rather than on a
    host computer over adb.
  • sherpa-onnx (Apache-2.0): offline wake word, speech
    recognition and speech synthesis. The voice models remain under their authors' licenses.
  • AndroidX AppCompat and Material Components for Android (Apache-2.0).

Disclaimer

  • Learning and research only. This is an experimental project for studying mobile GUI
    agents. It is not a product, is not production-ready, and must not be used for commercial
    purposes, automated abuse, bypassing app or platform rules, or anything unlawful.
  • Not affiliated with Google. "ARTEMIS" refers to Google's open-source project, which this
    work references. This project is not developed, endorsed or supported by Google or the
    ARTEMIS authors.
  • The agent can make mistakes. A language model decides every tap, swipe and text entry,
    and it can act on the wrong element or misunderstand the task. Use a test device or test
    accounts, watch the run, and keep it away from payments, transfers, messages to real
    people, deletions and account or system settings. You are responsible for any action it
    takes on your device.
  • Your data goes to your model provider. Screenshots and the on-screen element list are
    sent to the model service you configure, and may include personal information shown on the
    screen. Only use providers you trust, and follow their terms. Nothing is sent to the
    authors of this project.
  • Respect third-party terms. Automating other apps may break their terms of service and
    get accounts restricted. WeChat, QQ and Alipay are blocked for this reason; check the rules
    of any other app before automating it.
  • No warranty. The software is provided "as is", without warranties or conditions of any
    kind, as stated in the Apache License 2.0. The authors are not liable for any damage, data
    loss or account restrictions that result from using it.

License

Apache License 2.0. See NOTICE for attribution and third-party components.

Yorumlar (0)

Sonuc bulunamadi