Automation API

Android device automation

Automation API Documentation

Complete reference for automating Android devices. Build powerful automation scripts with full access to device controls, screen content, file operations, and more.

Quick Links

Getting Started

The automation API is accessed through the global agent object. Here's a simple example:

// Get the current screen content
const screen = await agent.actions.screenContent();

// Find a button with text "Submit"
const submitBtn = screen.findTextOne("Submit");

// Tap the button
if (submitBtn) {
  const { left, top, right, bottom } = submitBtn.boundsInScreen;
  await agent.actions.tap(
    (left + right) / 2,
    (top + bottom) / 2
  );
}