Skip to main content

Assistant

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Ask the platform's assistant in typed text, and report what came back: Gemini or Google Assistant on Android, opened with the assist key, its field typed into and sent; Siri on a real iPhone. These call app_assistant.

Assistant​

public IDictionary<string, object?> Assistant(string request, string? app = null, double timeoutSeconds = 0)

Asks the platform's assistant in typed text: Gemini or Google Assistant on Android, Siri on a real iPhone. The answer holds the assistant, the answer text it showed (empty when it showed none a screen read can see), the app in front afterward, typed (always true) and closed. app names the app expected to come forward, and reached says whether the assistant handed the request to it; a request that acts for the owner — a call, a message, a purchase — throws without it.

Examples​

Ask the assistant to open an app, and check that it came forward​

var got = device.Assistant("Open Clock", app: "com.google.android.deskclock");
if (!(got["reached"] is bool reached && reached)) throw new Exception($"in front: {got["front"]}");

The same call from the command line, mobium assistant "Open Clock" --app com.google.android.deskclock, printed on an Android 15 emulator:

asked Google Assistant (typed, not spoken): "Open Clock"
it showed no text a screen read can see
in front: com.google.android.deskclock
com.google.android.deskclock came forward

mobium assistant &quot;Open Clock&quot; --app com.google.android.deskclock on an Android 15 emulator

mobium assistant "Open Clock" --app com.google.android.deskclock on an Android 15 emulator

Ask a question, and read the answer it showed​

var got = device.Assistant("What is 15 times 3", timeoutSeconds: 20);
Console.WriteLine(got["answer"]);