AgentSIMOTP sessions for agents

Use case / Browser-agent OTP QA

Test SMS OTP flows without a human watching an inbox

AgentSIM gives browser agents a temporary US number, parses the OTP when SMS arrives, and records a delivery outcome when it does not.

Best fit: owned auth, CI/QA, controlled test tenants, and verified-compatible services. AgentSIM does not guarantee strict consumer-platform verification.

browser-agent-run.ts
import { provision } from "@agentsim/sdk";

const session = await provision({
  agentId: "browser-qa-runner",
  country: "US",
  serviceUrl: "https://staging.example.com/login"
});

try {
  await page.fill("input[name='phone']", session.number);
  await page.click("button[type='submit']");

  const otp = await session.waitForOtp({ timeout: 120 });
  await page.fill("input[name='otp']", otp.otpCode);

  recordDeliveryOutcome("otp_received");
} catch (error) {
  const messages = await session.getMessages();
  recordDeliveryOutcome(messages.length === 0 ? "no_sms" : "sms_no_otp");
} finally {
  await session.release();
}

Why agents stall

SMS OTP is a tiny step that can block the whole run

Browser agents can click, fill forms, and inspect pages. But when a flow asks for SMS, teams often fall back to a human, a shared inbox, or a brittle custom script.

Human relay

Someone watches a phone or inbox and pastes codes into CI or agent runs.

Silent waits

The target rejects the number or never sends SMS, but the automation only sees a timeout.

Raw inbox scraping

The agent gets message text but still needs parsing, matching, and cleanup logic.

Workflow

One temporary number, one OTP attempt, one outcome

AgentSIM wraps the SMS step in a session lifecycle your test harness can reason about: provision, wait, parse, classify, release.

01

Open a session

Your agent provisions a temporary US number only for the OTP step of the run.

02

Enter the number

Use the number in the browser flow just like a human tester would enter a phone field.

03

Wait with a timeout

AgentSIM watches inbound SMS, parses OTP candidates, and returns structured payloads.

04

Close with evidence

Release the number and record whether the run received an OTP, timed out, or hit a gate.

Delivery truth

The answer is not always a code. Sometimes the answer is why there is no code.

AgentSIM should make your QA run more truthful, not more magical. Destination support is empirical, so every run closes with an outcome your automation can act on.

View outcomes

otp_received

SMS arrived and AgentSIM parsed the code.

sms_no_otp

SMS arrived, but no parseable OTP was found.

phone_rejected

The target rejected the number before sending SMS.

no_sms

The target appeared to send, but no SMS arrived before timeout.

anti_bot_gate

CAPTCHA, puzzle, or risk gate blocked the run before phone verdict.

untested

No empirical run yet. Do not assume support.

Good fit

  • Playwright, Browserbase, Stagehand, Selenium, or custom browser-agent test runs
  • QA and CI workflows where SMS OTP is part of the acceptance test
  • Owned apps, staging tenants, and controlled auth providers
  • Services with dated evidence that AgentSIM's current number class works

Not the promise

  • Universal Google, Meta, Stripe, WhatsApp, bank, or crypto verification
  • Bulk account creation, ban evasion, or bypassing third-party anti-abuse systems
  • Assuming every service sends SMS to programmable numbers
  • Replacing a long-lived recovery phone number for one persistent account

Start with the workflow AgentSIM is built for

Give your browser agent a real OTP outcome to work with.

Start with programmable US OTP sessions. If your workflow needs higher-assurance number classes, treat that as a compatibility assessment, not a default guarantee.