Skip to content

agent

Interface

The automation runtime. Every script drives a device through the global agent.

typescript
interface Agent {
  /** Typed inputs generated from your automation's schemas. */
  readonly arguments: AgentArguments;
  /** UI actions performed on the device. */
  readonly actions: AgentActions;
  /** Read device / screen state. */
  readonly info: AgentInfo;
  /** Flow control helpers. */
  readonly control: AgentControl;
}

Namespaces

agent.constants
Shared constants: swipe directions, key codes, wait timeouts.
agent.actions
All device UI actions, grouped by kind.
agent.actions.touch
Touch input: tap, hold, swipe.
agent.actions.navigation
System navigation: back, home, recents, open app.
agent.actions.text
Text input: type, clear, paste, and read fields.
agent.actions.apps
App management: launch, close, install, clear data.
agent.actions.screen
Screen operations: screenshot, wake, rotate, brightness.
agent.actions.files
Device file system: read, write, upload, download media.
agent.actions.network
Network control: airplane mode, wifi, proxy, IP rotation.
agent.actions.recognition
On-screen recognition: find text, images, and UI nodes.
agent.utils
Helpers, callbacks, job data, out-of-steps, and file utilities.
agent.utils.helpers
General helpers: sleep, random, retry, and formatting.
agent.utils.callbacks
Register lifecycle callbacks that run on automation events.
agent.utils.job
Read the current job, task, and worker context.
agent.utils.out-of-steps
Raise an out-of-steps when the screen is unexpected.
agent.utils.files
Per-automation key/value storage and the bucket store.
agent.info
Read device/screen state: log, screenshot, screenText.
agent.control
Flow control: wait, stop, fail, and complete the automation.
agent.display
Read display metrics: size, density, and orientation.
agent.email
Provision and read disposable inboxes for verification flows.
agent.sms
Provision numbers and read incoming SMS for OTP flows.
agent.notifications
Read and dismiss the device notification shade.