Skip to main content
Using Claude, Cursor, Windsurf, Playwright, or an agent framework? Start with Integrations. MCP users do not need an SDK.
1
Get your API key
2
  • Sign in at console.agentsim.dev
  • Go to API KeysCreate key
  • Copy the key (starts with asm_live_)
  • 3
    Set it as an environment variable:
    4
    export AGENTSIM_API_KEY="asm_live_..."
    
    5
    Install the SDK
    6
    Python
    uv add agentsim-sdk
    # or: pip install agentsim-sdk
    
    TypeScript
    bun add @agentsim/sdk
    # or: npm install @agentsim/sdk
    
    7
    Provision a number and capture an OTP
    8
    Python
    import agentsim
    import os
    
    agentsim.configure(api_key=os.environ["AGENTSIM_API_KEY"])
    
    async with agentsim.provision(agent_id="stripe-onboarding") as num:
        print(f"Number: {num.number}")
        # Enter num.number on the website that will send the OTP...
        otp = await num.wait_for_otp(timeout=60)
        print(f"OTP: {otp.otp_code}")
    # Number is automatically released here
    
    TypeScript
    import { provision } from "@agentsim/sdk";
    
    // await using releases the number automatically (TypeScript 5.2+)
    await using num = await provision({ agentId: "stripe-onboarding" });
    
    console.log("Number:", num.number);
    // Enter num.number on the website that will send the OTP...
    const otp = await num.waitForOtp({ timeout: 60 });
    console.log("OTP:", otp.otpCode);
    
    9
    How it works
    10
    AgentSIM provisions a temporary programmable US phone number from a managed pool. When a service sends an SMS to that number, AgentSIM receives it, extracts the OTP automatically, and returns it to your code. If no SMS arrives, the session outcome gives you a clearer failure signal than a silent inbox wait. Service acceptance varies by provider and anti-abuse controls, so verify your target service before depending on it in production.

    Integrations

    Choose MCP, SDK, browser automation, controlled auth, or Agent Skills.

    Concepts

    Understand sessions, number lifecycle, outcomes, and billing.

    Supported Services

    Check empirical support before depending on a target service.

    API Reference

    Full endpoint documentation with request/response schemas.