The execution layer

From a goal to deterministic action.

Agents reason brilliantly but break the moment they touch the live web. Twin Browser is the engine they call to act — token-efficient, authenticated and audited, and built so repeated work gets cheaper instead of more expensive.

billing.acme.com
  1. Open billing.acme.comdone
  2. Read DOM → indexed state (42 elements, ~3k tokens)done
  3. Plan: log in → open invoices → pick latestdone
  4. Act: fill #user · fill #pass · click “Sign in”running
  5. Compile run into a deterministic skillqueued

One run: open the page, read it as indexed state, plan, act, and compile the path into a skill the next run can replay for free.

The cost wedge

Marginal cost trends toward zero

Most browser infra re-runs the LLM on every execution, so cost climbs with usage. Twin compiles a task once, matches re-phrased requests with a semantic cache, and replays deterministically — so the curve bends the other way.

Cold compile

The first time a goal is seen, the planner discovers a path and minimizes it into a deterministic skill. You pay the model once.

Semantic cache hit~0.2×

A re-phrased request is vector-matched to a compiled skill for that host and adapted — far cheaper than recompiling.

Deterministic replay~0×

Call a skill by name and it blind-replays with no model in the loop. The most-repeated workflows trend toward zero marginal LLM cost.

A cross-tenant skill corpus compounds the savings: a skill compiled once can be safely reused across tenants. See how the cache and corpus fit together on the why-Twin page and the skills page.

How it works

Observe, plan, compile, replay

The loop that turns an unpredictable LLM-driven browse into a repeatable, low-cost skill.

  1. 01

    DOM → indexed state

    A compiler turns the live page into a compact, numerically-indexed map of interactive elements under a token budget — not raw HTML. The model spends tokens on the decision, not the markup (a 50-step flow → ~3k tokens, illustratively).

  2. 02

    Plan → act

    The planner picks actions against the indexed state — click element 14, type into element 7, submit — and drives the browser until your structured success condition is met. This is the only stage that needs an LLM.

  3. 03

    Compile → skill

    A successful run is minimized into a reusable, deterministic skill: the essential steps, no exploration noise, keyed to the page’s structure and stored in your skill library.

  4. 04

    Dispatch → replay

    Re-runs hit the semantic dispatch cache and replay deterministically with zero LLM calls — or compile fresh and cache for next time. Blocked steps hand off to a human, then resume.

Want the full eight-stage mechanism, end to end? Read how it works →

Capabilities

Everything an authenticated task needs

Not a screenshot tool — a full execution engine, with the security, control, and observability real workflows demand. Every capability below is shipped; open one for the deep dive.

In code

Compile once, replay for free

The first call discovers a path and compiles a skill. The next similar call — even re-worded — replays it deterministically with near-zero LLM tokens. Same key, same audit log, same vault.

run-then-dispatch.shbash
# 1 — cold run: the planner compiles a reusable skill
curl -X POST https://twin-browser.com/api/v1/run \
  -H "Authorization: Bearer $TWIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Log in and download this month'\''s invoice",
    "url": "https://billing.acme.com"
  }'
# -> { "result": {...}, "skill_id": "sk_9f2c", "llm_tokens": 3120 }

# 2 — dispatch a re-phrased request: semantic cache HIT -> replay
curl -X POST https://twin-browser.com/api/v1/dispatch \
  -H "Authorization: Bearer $TWIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "goal": "Grab the latest invoice PDF", "url": "https://billing.acme.com" }'
# -> { "result": {...}, "replayed": true, "llm_tokens": 0 }

Full reference on the API page, or drive the same engine from your editor over the MCP server and one-line LangChain / AutoGen adapters.

At a glance

A plain headless browser vs. Twin

Same browser underneath — but Twin adds the skill layer that makes the second run nearly free, observable, and safe to run at volume.

AspectPlain headless browserTwin Browser
Cost of the next identical runFull LLM cost again~0 LLM — deterministic replay
Page representationRaw HTML / pixelsIndexed-state map under a token budget
Re-phrased requestCold startSemantic cache hit, adapted
Reuse across teamsNoneCross-tenant skill corpus (sanitized)
2FA / blocked stepRun failsAuto-fill code, else HITL handoff
ObservabilityLogs, if anyLive view + durable session video + audit log
BillingOpaqueUsage credits; LLM metered, passed through at 1×

Illustrative engine behavior. See the line-by-line breakdown on the compare pages.

Native to your stack

Call it from MCP, the API, or your framework

The same engine behind a versioned REST API, an MCP server for Claude and Cursor, and one-line LangChain and AutoGen adapters.

REST API

Bearer-authenticated endpoints under /api/v1/* — run a goal, dispatch to the cache, or replay a compiled skill.

API reference

MCP server

Tools run, compile_skill, run_skill for Cursor, Claude Desktop, Claude Code, and Cline.

MCP server

LangChain & AutoGen

One-line tool adapters drop the same engine into your existing agent framework — no replay logic to reimplement.

Adapters in the docs
Authorization

Automate the web where you’re authorized

Twin runs first-party sites, operator-approved automation, internal RPA, accessibility, and authorized testing. The run’s target URL is the authorization signal — and auth, billing, and audit logging run on every call.

  • Per-tenant API keys, stored only as a hash.
  • Default-deny RLS on a multi-tenant Supabase backend.
  • An audit log and credential vault on every run.

It is not a CAPTCHA-bypass-for-hire or anti-bot evasion service. Read the full disclosure on the security page.

FAQ

The product, answered

What is Twin Browser?
The browser execution layer for LLM agents — a token-efficient browser API that turns a goal into deterministic, replayable action. It compiles a task once, matches re-phrased requests to it with a semantic dispatch cache, and replays with zero LLM calls, so marginal cost trends toward zero the more your agents run.
How is this different from a headless-browser API?
A plain headless browser re-runs the LLM on every execution, so cost climbs with usage. Twin adds a skill layer: a DOM→indexed-state compiler, compiled skills, a semantic dispatch cache, and deterministic replay — plus a cross-tenant corpus that compounds the savings. Cost falls as usage grows instead of rising.
What does the indexed-DOM compiler actually do?
It serializes a live page into a compact, numerically-indexed map of interactive elements (roles, text, positions) under a token budget, instead of raw HTML. The planner reasons over that compact state, and the indices stay stable enough to replay deterministically later.
Where is Twin authorized to automate?
Twin automates the web where you are authorized — first-party sites, operator-approved automation, internal RPA, accessibility, and authorized testing. The run’s target URL is the authorization signal; auth, billing, and audit logging run on every call. It is not a CAPTCHA-bypass-for-hire or anti-bot evasion service.
How do I call it?
A REST API under /api/v1/* with Bearer-key auth, an MCP server (tools: run, compile_skill, run_skill) for Cursor, Claude Desktop, Claude Code and Cline, and one-line LangChain and AutoGen tool adapters.
What does it cost?
Free to start, then usage-based credits from $29/mo. A read is roughly 1 credit and a solved goal roughly 10; once you compile a skill, every later run drops back toward ~1. LLM cost is metered and passed through at 1× — see the live rate card at /api/v1/pricing.

Give your agent a browser it can trust.

Free to start. Usage-based credits from $29/mo, with LLM cost passed through at 1×.