A Browser Use agent that navigates to a signup page, provisions a real carrier-grade phone number via AgentSIM, fills the form, waits for the OTP, and completes registration.
- The Browser Use agent navigates to a signup page
- When a phone number is needed, it calls
provision_agentsim_numbervia the SDK - The agent enters the real T-Mobile number in the form and submits
- It calls
wait_for_agentsim_otpto receive the verification code - The OTP is entered and the form is submitted
- The number is released back to the pool
pip install browser-use agentsim-sdk
playwright install chromiumexport AGENTSIM_API_KEY="asm_live_..."
export OPENAI_API_KEY="sk-..." # Required for Browser Use LLM calls# Standalone SDK demo (no browser or LLM needed)
python browser_use_verify.py
# Full Browser Use agent (requires OPENAI_API_KEY + Playwright)
# Uncomment the run_browser_agent() call in browser_use_verify.py- Uses
agentsim.provision()async context manager (not raw HTTP) Tools()container with@tools.action(description=...)decorator- Returns
ActionResultwithinclude_in_memory=Trueso the agent remembers session IDs across steps - Async actions (
async def) for non-blocking provisioning and OTP waits OtpTimeoutErroris caught and reported to the agent for retry logic