AliasKit

Quickstart

AliasKit gives your AI agent a persistent digital identity so it can operate on the internet like a human remote worker. By the end of this guide, your agent will have a real email address, phone number, and the ability to sign up for services and retrieve verification codes programmatically.

One-prompt install (recommended)

If you're using Claude Code, OpenClaw, or any AI coding agent, paste this single prompt and your agent will set itself up:

Copy the prompt from aliaskit.com/install-prompt.txt and paste it into your agent. That's it.

The prompt is idempotent, so if setup is interrupted, just paste it again and it picks up where it left off.

If you prefer to integrate AliasKit manually using the SDK, follow the steps below.

Get an API key

1. Register at aliaskit.com/register. 2. Open the dashboard and copy your API key.

Your key starts with ak_live_ and looks like this:

ak_live_abc123...

Set it as an environment variable:

bash
export ALIASKIT_API_KEY="ak_live_your_key_here"
Keep your API key secret. Do not commit it to version control. Use a .env file or your CI provider's secrets manager.

Install the SDK

bash
npm install aliaskit

The SDK works in Node 18+, Bun, and Deno.

Initialize the client

typescript
import AliasKit from "aliaskit";

const ak = new AliasKit();

The client reads ALIASKIT_API_KEY from your environment automatically. You can also pass it explicitly:

typescript
const ak = new AliasKit({ apiKey: "ak_live_..." });

The client exposes resource namespaces for everything your agent needs:

  • ak.identities - create and manage persistent identities
  • ak.emails - read incoming emails and extract verification codes
  • ak.sms - read incoming SMS messages and extract verification codes
  • ak.cards - provision virtual payment cards

Create a persistent identity

An identity is a real digital persona with a generated name, working email inbox, phone number, and date of birth. You create it once during agent setup and reference it by ID from that point on.

typescript
const identity = await ak.identities.create();

console.log(identity.id);        // "id_8x2kf9a3..."
console.log(identity.name);      // "Jordan Mitchell"
console.log(identity.email);     // "jordan.mitchell.x7k2@aliaskit.com"
console.log(identity.phone);     // "+1 (555) 832-4091"
console.log(identity.dob);       // "1994-03-12"

Store the identity.id in your agent's configuration. You will use it every time the agent needs to check email, read an SMS, or make a purchase.

typescript
const identity = await ak.identities.create({
  metadata: { agent: "booking-assistant", owner: "team-ops" },
});
Creating an identity provisions a real phone number, which has an associated cost. Create identities once during agent setup, not on every run. See Plans and Limits for details.

Sign up for a service

Use the identity's email to sign up for any service. Here is an example with Supabase Auth:

typescript
import { createClient } from "@supabase/supabase-js";

const supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!);

const { error } = await supabase.auth.signUp({
  email: identity.email,
  password: "SecurePassword123!",
});

if (error) throw error;

The verification email lands in the identity's AliasKit inbox within seconds.

Retrieve the verification code

Wait for the verification email to arrive. waitForCode returns the full email so you can read the code from it:

typescript
const email = await ak.emails.waitForCode(identity.id, {
  timeout: 30_000,
});

console.log(email.body_text); // read the code from the email body

For SMS-based verification:

typescript
const sms = await ak.sms.waitForCode(identity.id, {
  timeout: 30_000,
});

console.log(sms.body); // read the code from the SMS body

Full example

Here is a complete flow: create a persistent identity for your agent, sign up for a service, and verify the account.

typescript
import AliasKit from "aliaskit";
import { createClient } from "@supabase/supabase-js";

const ak = new AliasKit();
const supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_ANON_KEY!);

// 1. Create a persistent identity for the agent
const identity = await ak.identities.create({
  metadata: { agent: "signup-assistant", owner: "team-ops" },
});

// Save this ID in your agent's config for future use
console.log(`Agent identity created: ${identity.id}`);

// 2. Sign up with the identity's email
const { error } = await supabase.auth.signUp({
  email: identity.email,
  password: "SecurePassword123!",
});
if (error) throw error;

// 3. Wait for the verification email
const email = await ak.emails.waitForCode(identity.id, {
  timeout: 30_000,
});

// 4. Extract the code from the email and verify
const code = email.body_text.match(/\d{6}/)?.[0];
const { error: verifyError } = await supabase.auth.verifyOtp({
  email: identity.email,
  token: code,
  type: "signup",
});
if (verifyError) throw verifyError;

console.log("Agent account verified and ready to operate.");

Next steps