Get Started With the @autenai/sdk in 5 Minutes
Install the SDK, connect a device, and run your first natural-language task on a real Android phone. Includes CLI and code examples, polling, credentials, and webhooks.
Auten Team

The fastest way to drive an Android phone from your own code is the official SDK. Here is the entire loop — install, connect, run, and handle results — in about five minutes, with copy-paste examples.
1. Install the CLI + SDK
npm i -g @autenai/sdk
auten login sk_live_... # your API key from auten.ai2. Connect a device
Pair your own Android over USB, or provision a hosted virtual device from the dashboard. The CLI walks you through accessibility and input-method setup automatically, including the quirks of vendors like Xiaomi/MIUI.
auten add-phone # interactive USB pairing
auten devices # list your connected devices3. Run your first task from the CLI
auten task "open the calculator and compute 7 x 8"4. Drive it from your code
The SDK is a thin, typed wrapper over the REST API:
import { Auten } from '@autenai/sdk';
const auten = new Auten({ apiKey: process.env.AUTEN_API_KEY });
// pick the first online device
const device = await auten.devices.firstOnline();
// send a natural-language task
const task = await auten.tasks.create({
device: device.serial,
prompt: 'check my unread email count and report the number',
});
console.log(task.task_id);5. Poll for the result
let t = await auten.tasks.get(task.task_id);
while (t.status === 'running') {
await new Promise(r => setTimeout(r, 1500));
t = await auten.tasks.get(task.task_id);
}
console.log(t.status, t.result?.summary);6. Handle logins with stored credentials
For tasks that need to sign in, store credentials encrypted per device once, then reference them by service name in your prompt — never embed passwords in the prompt itself. The agent decrypts and types them only at the moment of login.
7. Use webhooks for long tasks
Instead of polling, pass a webhook URL when you create a task and get notified when it finishes — handy for long or scheduled jobs running on hosted virtual devices.
Repeat tasks are free
Where to go next
- Read the full REST + SDK reference in the docs
- Learn prompt techniques in automating any app with natural language
- Decide between physical and hosted devices in cloud Android devices
Frequently asked questions
What runtime does the SDK need?
Node 18+ for the @autenai/sdk. Any language can use the REST API directly.
Do I need a physical phone to start?
No — the free tier includes a physical phone slot, but you can also provision a hosted virtual device and never touch hardware.
How do I keep API keys safe?
Store them in environment variables or a secret manager, never in source control, and rotate them from the dashboard if exposed.
Try Auten
Share this article