> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Identity stack

> Give your agent a real identity with an API-first, plug-and-play stack.

Give your agent a real identity: its own phone, IP, phone number, inbox, and app logins, with a payment
card coming soon. The stack is API-first and plug and play. Each phone gets its own network and contact
details that your agent can reuse across tasks.

The layers of a phone identity

Explore the identity layers

One identity = phone + IP + number + inbox + logins + card

## API-first, plug and play

* Each live layer is an API resource with TypeScript and Python SDKs. Cards are coming soon.
* One API key, `MOBILERUN_API_KEY`, gives you access to all available layers.
* Create or load a layer with one call, then connect it to your phone's workflow.
* Use only the layers you need, from your own code or [any agent framework](https://docs.mobilerun.ai/integrations/overview.md).

## How the layers fit

* **Phone:** runs your apps and agent tasks on Cloud Android or iOS.
* **Proxies:** give the phone a network location and residential IP.
* **Cloud Numbers:** receive and send SMS for the account's phone number.
* **Mailboxes:** receive email and extract one-time verification codes.
* **Logins:** keep app credentials available to your agent without putting secrets in task prompts.
* **Cards (Soon):** give agents payment cards with spend limits.

> [card] [Proxies](https://docs.mobilerun.ai/proxies.md)
>
> Choose a network for your phone.

> [card] [Cloud Numbers](https://docs.mobilerun.ai/identity/numbers.md)
>
> Send and receive SMS.

> [card] [Mailboxes](https://docs.mobilerun.ai/identity/mailboxes.md)
>
> Read email and wait for an OTP.

> [card] [Logins](https://docs.mobilerun.ai/credentials.md)
>
> Store and use app credentials.

> [card] [Cards · Soon](https://docs.mobilerun.ai/identity/cards.md)
>
> Payments with spend limits.

## Build a full identity

Load your phone and mailbox, then let the agent sign up with them.
Install the [SDK](https://docs.mobilerun.ai/guides/sdk-objects.md) (6.2.1 or later) and set `MOBILERUN_API_KEY` in your environment.

```typescript TypeScript theme={null}
import { MobilerunSDK } from '@mobilerun/sdk';

const mobilerun = new MobilerunSDK(); // Reads MOBILERUN_API_KEY.

const phone = await mobilerun.devices.get('DEVICE_ID');
const mailbox = await mobilerun.mailboxes.get('MAILBOX_ID');

// Sign up: the agent uses the mailbox address on the phone.
const since = new Date().toISOString();
const signup = await mobilerun.tasks.run({
  deviceId: phone.id,
  task: `Open Example Shop and sign up with ${mailbox.address}. Stop at the code screen.`,
});
await signup.wait();

// Verify: read the email code and let the agent finish.
const otp = await mailbox.waitForOtp({ after: since });
const verify = await mobilerun.tasks.run({
  deviceId: phone.id,
  task: `Enter the verification code ${otp.code} and finish the signup.`,
});
await verify.wait();
```

```python Python theme={null}
from datetime import datetime, timezone
from mobilerun_sdk import MobilerunSDK

mobilerun = MobilerunSDK()  # Reads MOBILERUN_API_KEY.

phone = mobilerun.devices.get("DEVICE_ID")
mailbox = mobilerun.mailboxes.get("MAILBOX_ID")

# Sign up: the agent uses the mailbox address on the phone.
since = datetime.now(timezone.utc)
signup = mobilerun.tasks.run(
    device_id=phone.id,
    task=f"Open Example Shop and sign up with {mailbox.address}. Stop at the code screen.",
)
signup.wait()

# Verify: read the email code and let the agent finish.
otp = mailbox.wait_for_otp(after=since)
verify = mobilerun.tasks.run(
    device_id=phone.id,
    task=f"Enter the verification code {otp.code} and finish the signup.",
)
verify.wait()
```

To give the phone a network location, connect a proxy first, see [Proxies](https://docs.mobilerun.ai/proxies.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.