All work

Mobile AI agents

A model can suggest an action. The system decides whether it is allowed.

Mobile automation app showing personalized feeds, profile, and insights
3Independent safety boundaries

Read-only constraints are enforced at separate layers.

An action has to earn execution.

  1. 01

    Observe

    Read the current UI and discover the actions it actually exposes.

  2. 02

    Authorize

    Check the model's structured output against the current account and action permissions.

  3. 03

    Execute

    Acquire the shared lease, dispatch the job, and retain its state.

  4. 04

    Confirm

    Verify the matching job's terminal state before releasing its execution fence.

The challenge.

Mobile automation is stateful. Screens change, model outputs can be malformed, and external text can contain instructions the agent must ignore.

The engineering challenge was to connect clients, an API orchestrator, and execution workers without letting model uncertainty become unrestricted device input.

The newer desktop implementation adds persistent account profiles, isolated workers, and durable job state alongside the Android system.

The boundaries.

  • Treat screen content as data, never instructions.
  • Discover action candidates from the live UI rather than guessing labels.
  • Enforce read-only boundaries independently in three places.
  • Escalate challenges to a human instead of trying to bypass them.
  • Keep account authority, device ownership, and job state separate.

How it fits
together.

An Expo client connects to a NestJS orchestrator and paced BullMQ jobs. Android execution runs through FastAPI and live UI discovery, with structured outputs checked against context-specific permissions. A newer desktop path adds persistent per-account browser profiles, isolated worker identities, and durable snapshots. Shared device leases prevent overlapping execution; ambiguous requests remain quarantined until their outcome can be resolved. Desktop integration is merged, with live capacity acceptance kept separate from configured worker limits.

The decisions
behind the details.

01

Capabilities before actions

The visible screen determines a temporary set of allowable actions. Model suggestions are checked against those capabilities.

Tradeoff
More observation and validation work on each execution step.
02

Recovery that fails closed

Malformed outputs and uncertain states should stop execution and allow operator review.

Tradeoff
Some sessions need human intervention instead of automatic completion.
03

Evaluate against a control

Frozen ground-truth metrics, a measured noise floor, and never-dosed controls separate intervention effects from feed drift.

Tradeoff
Experiments require additional control runs; results need their limits stated.
04

One execution owner

Authentication and platform operations share a device lease. Independent guards cannot prevent two different operations from reaching the same device together.

Tradeoff
Contention becomes an explicit wait or rejection rather than overlapping device input.
05

Stopping needs confirmation

A stop request is not proof that work has stopped. The matching job must be terminal before the backend releases its run fence.

Tradeoff
An ambiguous result can hold the boundary until reconciliation finishes.

Research assistant

Next case study