Everything to ship your first run.
Authenticate, run a goal, then drop the engine into your agent over the REST API, MCP, LangChain, or AutoGen. Start with the quickstart below, then dig into concepts and reference.
From key to first run in five minutes
Create a per-tenant key, run a goal with POST /api/v1/run, then compile it into a skill so later replays cost a single credit.
# 1. Authenticate with a per-tenant Bearer key (created in the dashboard, shown once).
# 2. Run a goal: pass a url, a prompt, and a structured success condition.
curl https://twin-browser.com/api/v1/run \
-H "Authorization: Bearer ab_live_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://app.acme.com/invoices",
"prompt": "export last month as CSV",
"success": { "kind": "urlIncludes", "value": "/exports" }
}'
# → 200 { "success": true, "path": [ … ], "credits_charged": 10 }
# Compile it into a skill once, and later replays cost a single credit:
# POST /api/v1/skills → { "name": "acme-export", "credits_charged": 50 }
# POST /api/v1/skills/acme-export/run → { "success": true, "credits_charged": 1 }The core ideas, in order
Four concepts cover how Twin turns a goal into deterministic, replayable action.
Indexed DOM state
How a live page becomes a compact, numerically-indexed map of interactive elements under a token budget — the input the planner reasons over.
Skills & the semantic cache
Compile a goal once, then fuzzy-match re-phrased requests to it and replay deterministically with no LLM.
Sessions & jobs
Synchronous runs, async jobs you submit and poll, live SSE screencasts, and durable session video.
Human-in-the-loop handoff
How a blocked step — approval, or MFA on an authorized flow — pauses the run for a human, then resumes.
Pick how you’ll call it
Each surface wraps the same authenticated, audited engine.
REST API
The full /api/v1 surface: auth, run, dispatch, jobs, skills, observe, live view, and the rate card.
API referenceMCP server
Expose the engine to Cursor, Claude Desktop, Claude Code and Cline — set up in two minutes.
MCP setup guideSkills & cache
How compilation, the semantic dispatch cache, and the cross-tenant corpus bend the cost curve.
Skill compilationSecurity & authorization
Per-tenant keys, default-deny RLS, the credential vault, audit log, and the authorization model.
SecurityLangChain & AutoGen adapters
makeTwinBrowserTools() returns framework-agnostic tool descriptors over the same REST engine — one line, no replay logic to reimplement.