Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 3 min read

Human-like gestures and identity reset on Phonebox

Human-like gestures and identity reset on Phonebox A parked Phonebox phone already keeps its apps, files and signed-in accounts, and parking is free. Today those same phones can move the way a person would β€” and, when

Human-like gestures and identity reset on Phonebox

A parked Phonebox phone already keeps its apps, files and signed-in accounts, and parking is free. Today those same phones can move the way a person would β€” and, when you need it, take a new device identity without reinstalling anything.

Both features are live, on the REST API, the TypeScript SDK and the CLI.

Human-like gestures

Pass "humanize": true to tap, double_tap, swipe and scroll, or use --humanize on the CLI. The SDK takes the same option as humanize: true. It is off by default, so existing gestures stay exact. Long press does not support it.

On phones that support it, a humanized gesture is human-like input rather than an exact path. A phone that cannot do human-like input still runs the gesture as asked.

curl

curl https://phonebox.dev/v1/phones/ph_7kx2m6q4v3ta/actions \
  -H "Authorization: Bearer $PHONEBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"actions":[{"type":"tap","target":{"text":"Sign in"},"humanize":true},{"type":"swipe","from":{"x":540,"y":1700},"to":{"x":540,"y":700},"duration_ms":400,"humanize":true},{"type":"scroll","direction":"down","humanize":true}]}'

double_tap takes the same "humanize": true field.

SDK

The package is phonebox: npm install https://phonebox.dev/downloads/phonebox-0.1.0.tgz.

import { Phonebox } from "phonebox";

const pb = new Phonebox(); // reads PHONEBOX_API_KEY
const phone = await pb.phones.get("ph_7kx2m6q4v3ta");
if (phone.status !== "ready") await phone.waitUntil("ready");

await phone.tap({ text: "Sign in" }, { humanize: true });
await phone.tap({ text: "Open" }, { double: true, humanize: true });
await phone.swipe({ x: 540, y: 1700 }, { x: 540, y: 700 }, 400, { humanize: true });
await phone.scroll("down", { humanize: true });

CLI

phonebox tap ph_7kx2m6q4v3ta --text "Sign in" --humanize
phonebox tap ph_7kx2m6q4v3ta --text "Open" --double --humanize
phonebox swipe ph_7kx2m6q4v3ta 540 1700 540 700 --ms 400 --humanize
phonebox scroll ph_7kx2m6q4v3ta down --humanize

Do not combine --humanize with --long. Long press does not support human-like input.

Docs: Human-like input.

Identity reset

POST /v1/phones/{id}/reset with {"mode":"identity","preserve":["location","locale","timezone"]} gives the phone a new device identity and keeps installed apps, files and accounts. preserve puts back only the settings you name. The clipboard is cleared. Device info such as the model or screen may change, but a change is not guaranteed. Apps that tie an account to the device may ask for a sign-in again.

A full reset still wipes everything. Both resets need an Admin key and are sent once and never retried.

The request answers 202 Accepted. Wait until the phone is ready before you use it. The session stays open, so the reset's time is billed like any other.

curl

Use an Admin key. Send this once. If the outcome is unknown, wait for ready instead of sending a second reset.

curl -X POST https://phonebox.dev/v1/phones/ph_7kx2m6q4v3ta/reset \
  -H "Authorization: Bearer $PHONEBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"identity","preserve":["location","locale","timezone"]}'

curl "https://phonebox.dev/v1/phones/ph_7kx2m6q4v3ta?wait=ready" \
  -H "Authorization: Bearer $PHONEBOX_API_KEY"

If you omit preserve, those settings go back to the phone's defaults. Name every setting you want to keep: location, locale and/or timezone.

SDK

import { Phonebox } from "phonebox";

const pb = new Phonebox(); // Admin key in PHONEBOX_API_KEY
const phone = await pb.phones.get("ph_7kx2m6q4v3ta");

await phone.reset({
  mode: "identity",
  preserve: ["location", "locale", "timezone"],
});
await phone.waitUntil("ready");

reset() returns without waiting. A full reset is still the default: await phone.reset() wipes apps, files, accounts and the clipboard.

CLI

phonebox reset ph_7kx2m6q4v3ta --yes --mode identity --preserve location,locale,timezone

--yes is required. The command waits until the phone is ready unless you pass --no-wait.

Docs: Identity reset.

Why this matters for agents

Agents already know how to read a screen and choose a tap. The useful part is a phone that stays around: parked between tasks, signed in, with the app still installed, costing nothing while it waits. Human-like gestures make those sessions look less like a scripted path. Identity reset lets you keep that work and still present a new device identity.

A full reset is still there when you want a clean phone.

I work on Phonebox. Feedback is welcome: [email protected], or the docs.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.