Use case
AI agents
Give your AI agent a real browser it can drive — reach any site, act under your guardrails, and let repeated work replay at near-zero cost.
The problem
What the status quo costs you.
Autonomous agents need to click, type, log in, and read live pages, not just call APIs. The usual fix is to hand the agent a raw cloud browser and let the LLM reason over raw HTML on every step. That works in a demo and falls apart in production: each run re-pays the model, raw DOM blows the context window, and the same task costs the same every time no matter how often it runs.
See how Twin works- Receive goal from your agentdone
- Compile DOM → indexed staterunning
- Match semantic dispatch cachequeued
- Replay skill — zero LLM callsqueued
- Return structured resultqueued
The wedge
Compile once. Replay forever.
Twin is the browser execution layer for LLM agents. It compiles a goal into a deterministic, replayable skill the first time, fuzzy-matches the next re-phrased request to that skill with a semantic dispatch cache, and replays it with zero LLM calls. Your agent keeps a clean, token-efficient view of the page instead of raw HTML, so marginal cost per run trends toward zero as your agents run more.
- 1Point your agent at POST /api/v1/run with a natural-language goal; Twin returns a token-efficient, numerically-indexed map of the page instead of raw HTML.
- 2The first successful run compiles into a skill — the planned action path, generalized and stored.
- 3The next, differently-worded request hits the semantic dispatch cache and matches that skill, so it runs without re-invoking the planner LLM.
- 4Matched skills replay deterministically; blocked steps (approval, MFA on an authorized flow) pause for human-in-the-loop handoff, then resume.
- 5A cross-tenant skill corpus means a skill compiled once can be safely reused, so your hit rate climbs as the network runs.
Outcome · A repetitive, authenticated agent task that costs the full model bill every run on raw-browser infra instead settles to a cache hit — illustratively ~5x cheaper per run after warmup — while staying fully observable through live view and session video.
In practice
The actual call, and what it returns.
Your agent sends a goal in words. Dispatch matches it against the skills this key has already compiled — a hit replays the compiled path, so the planner model is never invoked.
# Same body as /run, fronted by the semantic cache.
curl https://twin-browser.com/api/v1/dispatch \
-H "Authorization: Bearer $TWIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://app.acme.com/orders",
"prompt": "what is the status of the latest order?",
"success": { "kind": "textVisible", "value": "Order #" }
}'
# → 200
# {
# "mode": "cache-hit", <- "cache-miss-compiled" on the first run
# "skill": "acme-order-status",
# "version": 3,
# "success": true,
# "steps": 4,
# "runId": "…",
# "credits_charged": 2 <- the compile that seeded it charged 10
# }What this call does
- The tenant is derived from the Bearer key, never from the body.
- "success" is a structured condition — textVisible, urlIncludes, statusText, extracted, or allOf/anyOf of those.
- A miss plans once and compiles the result into a named skill; the next differently-worded request matches it.
- Matching is on meaning, so “latest order status” and the sentence above land on the same skill.
Under the hood
The machinery under every run.
Every use case runs on the same primitives: a token-efficient view of the page, deterministic replay, and a checkpoint where a person decides.
Semantic dispatch cache
Re-phrased requests fuzzy-match a skill you already compiled, so they skip the planner LLM entirely.
Read the mechanism — Semantic dispatch cacheDeterministic replay
Matched skills replay the same way every time — a pass is a pass, and the marginal cost trends toward zero.
Read the mechanism — Deterministic replayToken-efficient DOM state
A live page becomes a compact, numerically-indexed map of interactive elements instead of raw HTML.
Read the mechanism — Token-efficient DOM stateHuman-in-the-loop handoff
Blocked steps — approvals, MFA on an authorized flow — pause for a person, then resume cleanly.
Read the mechanism — Human-in-the-loop handoffFAQ
AI agents on Twin — common questions.
How is this different from giving my agent a raw cloud browser?
Which agent frameworks does Twin work with?
Does my agent still control the browser step by step?
Related
More ways teams use Twin.
RPA replacement
Replace brittle, selector-keyed RPA bots with skills that adapt to the page — you authorize the run, the agent does the work.
Internal workflow automation
Automate the internal tools and vendor portals that have no API — with audit logging and human approval built in.
Data extraction at scale
Extract from authenticated, multi-step pages you're authorized to reach — the agent signs in, does the work, and replays repeat pulls at near-zero cost.
Put ai agents on autopilot.
Start free, hand your agent the work under your guardrails, and let the runs you repeat replay from a compiled skill.