By Andrey Kamensky · · 7 min read

Automating Partner Portals With No API: Why Browser+LLM Agents Crawl (and What Actually Scales)


Driving a headless browser + LLM per row takes ~20s/record and burns tokens. See when Playwright login-once + typed HTTP replay is 20x faster.

TL;DR

Automation pattern (500 authorized records/day)Typical speed per recordPer-run token & infra costReliability when UI tweaks happenBest operational fit
Per-row Browser + LLM agent15–30 s/record (~2–4 hrs for 500 rows)High (LLM vision/DOM tokens × every step)Low, silent mis-clicks or timeout drops mid-batchAd-hoc exploration only; never inner-loop production
Deterministic Playwright DOM script2–6 s/recordLow (CPU/memory for headless Chromium)Medium, resilient with getByRole/getByLabel + explicit assertionsLegacy HTML forms with dynamic ViewState / complex multi-step CSRF
Login-once storageState + HTTP/XHR replay<1 s/record (~5 min for 500 rows)Near zero (minimal HTTP worker; zero per-row LLM)High: strict JSON schema validation + SQL idempotencyAuthorized SPA/modern portals lacking official public APIs

Supplier portals, freight broker dashboards, warranty claim forms, and distributor billing hubs often come with a 2005 integration story: “No API, no SFTP, just log in on the web.”

When AI browser-agent demos went mainstream, dozens of operations teams wired an LLM vision or DOM-clicking agent straight into those portals, and immediately hit three surprises: 20-second record times, surprising monthly token invoices, and half-finished Friday batches where the dashboard reported success while 40 rows silently timed out.

First rule: scope, authorization, and checking official channels

This architecture pattern applies strictly to authorized business workflows: supplier purchasing portals, 3PL tracking consoles, carrier manifests, or accounting portals where your company holds valid user credentials and explicit permission to manage its own data.

Before inspecting a single network request:

  1. Ask the partner for SFTP, EDI, or an undocumented private API. Many mid-market wholesalers already run an SFTP nightly CSV drop or private webhook they only enable when an ops manager asks for it.
  2. Never build automation to bypass access controls, rate limits, or CAPTCHA challenges. If a portal enforces interactive human verification or forbids automated clients in its partner agreement, stop and request an official data feed or human-assisted queue instead.

Why Browser + LLM agents crawl in production

Using an LLM to read a webpage and decide which button to click is great for unscripted, one-off tasks. Inside a daily 300–2,000 row operational sync, putting an LLM in the per-record loop breaks unit economics and reliability:

  • Latency compounds across every page transition: Rendering React/Angular bundles, waiting on spinner hydration, capturing DOM trees or screenshots, waiting 2–4 seconds per LLM round-trip, and repeating across 4 form fields per SKU adds up to 15–30 seconds per record. Five hundred daily supplier acknowledgments take over two hours.
  • Silent-success failure modes multiply: If an agent fills three fields, misses a validation toast inside a custom dropdown, and hits Save, it often interprets the refreshed page as “Completed”, leaving your workflow showing green (see our Make/n8n silent-success teardown).
  • Brittle UI drift: Even slight modal changes shift element indexes, burning retries and token budgets silently in the background.

The 3-Tier Decision Ladder for No-API Portals

Treat browser automation as the last mile of session handling, not the engine driving every business row:

Comparison of per-row browser LLM agents versus login-once Playwright storageState and typed APIRequestContext HTTP replay

Tier 1: Negotiate an official CSV/SFTP/API export (Always #1)

Spend ten minutes emailing the vendor’s technical support first. Even a nightly CSV dropped into an S3 bucket or SFTP directory eliminates login session fragility completely.

Tier 2: Login-once Playwright storageState + Typed HTTP/XHR Replay (APIRequestContext)

Almost every modern B2B web portal is a JavaScript frontend talking to clean internal JSON/REST or GraphQL endpoints using session cookies or bearer headers.

Playwright documents this exact separation natively (playwright.dev/docs/auth and playwright.dev/docs/api-testing):

  1. Authenticate cleanly once: Run a short Playwright setup step against your authorized account login, verify landing state, and call storageState() to persist the authenticated cookies/session tokens.
  2. Replay validated HTTP calls instead of clicking UI DOM elements: Initialize Playwright’s APIRequestContext (or standard Node fetch using those verified session headers) with the persisted storageState, throttle concurrency gently (e.g., 1–2 requests/second within normal human bounds), validate every response payload with Zod, and verify every write returned the updated entity ID.
  3. Wrap writes in SQL natural-key idempotency: Before posting a shipment acknowledgment or invoice entry, check Check → Act → Record in your operations database (portal_sync_events keyed by (portal_name, po_number, delivery_id)) so re-runs after a session expiry never duplicate submissions.

What changed? Instead of spinning up Chromium tabs per SKU at 20 seconds each, 500 structured JSON submissions complete reliably in minutes with zero LLM tokens in the hot loop.

Tier 3: Deterministic Playwright DOM (zero inner-loop LLM) + Quarantine

Some older enterprise portals render classic server HTML (ASP.NET ViewState, rotating hidden CSRF form tokens, multi-frame tables) where direct XHR replay is more brittle than clicking form controls.

Even there, skip per-row LLM agents in production:

  • Write deterministic Playwright locators (getByRole, getByLabel, getByTestId) with strict timeout and post-submit DOM confirmation (await expect(confirmationBanner).toContainText(poNumber)).
  • Route any unexpected modal, expired session, or validation message into a Dead-Letter Quarantine table with screenshot evidence so an operator reviews only the 2 exceptions instead of babysitting 500 rows.
  • Reserve LLMs strictly for offline work (parsing inconsistent supplier PDFs into JSON before the portal step, or helping a developer inspect broken selectors during maintenance), never let an autonomous model click unverified production forms row by row.

Throughput and risk comparison (500 daily records)

MetricPer-Row Browser + LLM AgentDeterministic Playwright DOMPlaywright storageState + Typed HTTP Replay
Runtime for 500 rows~120–250 min~20–45 min~3–8 min (rate-limited politely)
Variable LLM cost$3–$15+/run (~$100–$450/mo)$0 per row$0 per row
Write verification confidenceLow (heuristic visual guess)Medium-High (explicit assertion checks)High (HTTP status + typed JSON ID check)
Idempotency on session expiryRisky without external DB keyRequires external SQL ledgerBuilt cleanly around SQL natural-key gate

When manual entry or simple scripts still win

Don’t build custom portal automation when:

  • Under 20 portal entries per week: Fifteen minutes of human copy-paste every Friday costs less than maintaining session adapters when a vendor refreshes their login screen twice a year.
  • Zero structured validation available: The portal provides an official bulk CSV upload screen and your real bottleneck is cleaning messy vendor sheets first, fix the pre-flight normalization step instead (Messy Supplier Spreadsheets to Shopify CSV).
  • Legal or partner-term restrictions: Automated portal access violates the partner contract; push for SFTP or EDI as part of the vendor relationship.

Move off Browser+LLM clickers the moment batches exceed 30–60 minutes, fail silently without alerts, or burn predictable monthly money re-reading identical web tables every day.

Replace fragile browser bots with deterministic operations pipelines

Andrey Kamensky (kamensky.dev) brings 17 years of purchasing, reporting, and operations systems work to turning fragile AI/RPA prototypes into testable TypeScript pipelines with idempotency, structured logs, and Dead-Letter quarantine queues (learn more about production guardrail design in AI Agents in Production and When Zapier Costs More Than Writing the Integration).

Start with a scoped Operations & Data Audit on your highest-friction portal sync, or book a 20-minute fit call →.

Sources & further reading

Frequently asked questions

Why are Browser plus LLM agents so slow for automating vendor portals?

Running a full Chromium instance and sending DOM snapshots or screenshots to an LLM on every row routinely takes 15 to 30 seconds per record, consumes recurring token costs on every run, and risks silent click-errors whenever a portal updates minor CSS classes or loading timings.

How does Playwright storageState plus APIRequestContext speed up authorized portal syncs?

Instead of keeping a browser UI clicking through hundreds of forms, Playwright handles login once inside an authorized company session and saves authenticated cookies via storageState. A lightweight script then sends validated HTTP or JSON requests directly through APIRequestContext at sub-second speed with zero per-row LLM cost.

Is automating a third-party web portal compliant and safe?

Automate only partner, supplier, carrier, or regulatory portals where your business holds valid account credentials and clear authorization to sync its own records, always check first whether SFTP, EDI, or a private API exists, and never bypass security gates or CAPTCHAs.

When should an operations script fall back to deterministic Playwright DOM steps?

Use typed HTTP replay when the portal exposes clean JSON or XHR form endpoints behind its browser UI. Fall back to deterministic Playwright DOM locators without an inner-loop LLM only when legacy server-rendered forms require multi-step dynamic CSRF or ViewState hidden fields, backed by write assertions and a dead-letter queue.