Skill compilation

Compile once. Replay for almost nothing.

Most browser agents re-run the LLM on every execution, so cost scales with usage. Twin turns a successful run into a reusable skill, matches re-phrased requests to it semantically, and replays deterministically — so the curve bends the other way.

How it works

From a run to a replayable skill

The three moves that turn an unpredictable, LLM-driven browse into a deterministic, cacheable skill.

01

A run compiles into a skill

The first time a goal succeeds, the planner’s exploration is minimized into a deterministic skill — the essential steps over indexed DOM state, with the exploration noise stripped out.

02

The semantic cache dispatches

A new, differently-worded request is embedded and vector-matched to a skill compiled earlier for the same host, then adapted to the new values — no cold-start at full LLM cost.

03

Replay runs with no LLM

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

The cost ladder

Three tiers, each cheaper than the last

The same goal moves down the ladder as it repeats — from a one-time model cost to effectively free.

Full LLM

Cold compile

The first time a goal is seen, the planner discovers a path and minimizes it to the essential steps. You pay the model once — and get a reusable skill out of it.

~5× cheaper~0.2×

Dispatch cache hit

A differently-worded request is vector-matched to an existing skill for that host and adapted to the new values — far cheaper than recompiling, because the structure is already known.

~$0 LLM~0×

Deterministic replay

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

Cross-tenant corpus

The structure is shared. Your data never is.

A cross-tenant corpus of sanitized skill skeletons means your agents benefit from skills the whole network has already compiled — while your values, credentials, and exact paths stay yours alone.

What is shared
  • The host a skill was compiled for.
  • The ordered structure of the run — which kinds of elements, in what order.
  • A short description of the intent.
What never is
  • Any value you or your agent typed.
  • Credentials and secrets — they stay in your vault.
  • Results, page content, or your exact compiled path.

Read the full disclosure on the security page.

FAQ

Skill compilation, answered

How is the semantic cache different from exact-match replay?
Exact-match replay (which most competitors offer) only helps when the identical action repeats with known parameters. Twin’s dispatch cache vector-matches a semantically similar, re-worded request to an existing skill and adapts it — so variants hit the cache instead of cold-starting at full LLM cost.
What is the cross-tenant skill corpus?
When a task succeeds, its sanitized navigation skeleton — host and which kinds of UI elements were used, never your values or credentials — joins a shared library. Other tenants automating the same host can adapt that skeleton, so cache-hit rates climb as the network grows. Only you ever replay your own exact path.
Why does cost fall as usage grows?
Most browser infra bills up — per browser-hour, per step, per token, or per gigabyte. Twin front-loads the LLM cost into a one-time compile, then serves repeats from the semantic cache or deterministic replay. The more a workflow runs, the lower its average cost per run.
How do I compile and replay a skill?
Compile with POST /api/v1/skills (or the compile_skill MCP tool), which discovers and minimizes a path once for 50 credits. Replay with POST /api/v1/skills/:name/run (or run_skill) for a single credit, with no LLM in the loop. The dispatch endpoint combines both: cache-hit replay or cache-miss compile.

Stop paying the model twice for the same task.

Compile once, dispatch semantically, replay deterministically — the only browser infra where marginal cost trends to zero.