Tolkn
POCEarly access for design partners

One API for every web agent.

Run tasks on authenticated web portals through Browser Use, Browserbase and TinyFish. Tolkn routes on verified history, retries only when it is safe, and checks the portal before it reports success.

tsk_9c41e07a2b6f4d13
write_idempotentrunning
  1. 0.000task.createdacme · update_contact · write_idempotent
Illustrative trace. Events and fields follow the API.
Current integrations

One adapter per provider. Bring your own keys.

  • Browser Usebrowser_use · bu-4.0
  • Browserbasebrowserbase · stagehand-hybrid
  • TinyFishtinyfish · tinyagent

Every task follows the same path. Every attempt is recorded, with its provider, cost and verdict.

  1. 01
    Rank

    Filter unusable providers, score the rest on verified history.

  2. 02
    Attempt

    Run on the top provider with a fresh browser session.

  3. 03
    Verify

    Ask the portal what happened. Ignore the agent's own grade.

  4. 04
    Decide

    Succeed, fall back, or stop for review, by safety class.

01Routing

Ranked on verified results, per portal and task type.

The router skips providers that cannot run the task, then scores the rest on how often their work was confirmed on this portal, followed by cost and latency. GET /v1/route shows the ranking and the reason for every skip.

Skipped when
disabled
Turned off in the provider registry.
no API key configured
No platform or bring-your-own key for this client.
marked incompatible
Known not to work for this portal and task_type.
cooling down
Three consecutive provider errors. Skipped for five minutes.
Scored by
score = 1.0·success_rate − 0.3·cost − 0.2·latency

Cost and latency are normalised across candidates. Success rates are smoothed, so a new provider starts at 50% instead of 0. Demo and injected failures never count as evidence.

GET /v1/route?portal=acme&task_type=submit_po
1{2  "ranked": [3    {4      "provider": "browser_use",5      "score": 0.4357,6      "success_rate": 0.786,7      "avg_cost": 0.08,8      "avg_duration_s": 78.0,9      "samples": 12,10      "note": ""11    },12    {13      "provider": "browserbase",14      "score": 0.3571,15      "success_rate": 0.857,16      "avg_cost": 0.12,17      "avg_duration_s": 104.0,18      "samples": 12,19      "note": ""20    }21  ],22  "skipped": [23    {24      "provider": "tinyfish",25      "reason": "cooling down after repeated provider errors"26    }27  ]28}
02Safety model

Retries that know what is safe to repeat.

A failed lookup can be retried anywhere. A failed purchase order cannot. Every task_type carries a safety class, and the router decides what happens after a failure from that class and from what the portal says.

Retried only once the portal confirms the change did not happen.

example task_type: update_contact

  1. 1
    attempt.1
    Fails after the provider may have touched the portal.
  2. 2
    verify.portal
    Reads the portal state and returns done_count for the change.
  3. 3
    policy
    write_idempotent × touched portal → depends on done_count.
Outcome
  • done_count = 1succeededThe change is on the portal. Nothing to retry.
  • done_count = 0fallbackVerifier confirmed it was not applied, so retrying is safe.
  • cannot confirmneeds_reviewUnknown state is never retried automatically.

If the provider never reached the portal, every class falls back. A duplicate write (done_count > 1) always goes to review.

read
Never touchedfallbackMay have touchedfallback
write_idempotent
Never touchedfallbackMay have touchedfallback only if the verifier proves not done, otherwise needs_review
write_irreversible
Never touchedfallbackMay have touchedneeds_review, never repeated automatically
Fig. 1 — Fallback policyEvaluated after the verifier. A confirmed result always wins.
03Verification

Don't trust the agent.
Check the portal.

Agents grade their own work, and they are sometimes wrong. After every attempt, an independent verifier reads the portal's state and checks it against expected_outcome. Its verdict, not the agent's, decides the result. Verifiers are defined per portal and task type; without one, a result is reported as unverified.

Agent reported successverified: 0 → fallback
attempts[0]read · invoice_lookup
{  "attempt_no": 1,  "provider": "tinyfish",  "status": "failed",  "self_reported_success": 1,  "answer": "INV-1007 is Pending.",  "verified": 0,  "verification_checks": [    { "check": "payment status", "expected": "Paid",      "found": "INV-1007 is Pending.", "passed": false }  ],  "failure_class": "task_failure"}
Portal confirmed the answerverified: 1 → succeeded
attempts[1]read · invoice_lookup
{  "attempt_no": 2,  "provider": "browser_use",  "status": "succeeded",  "self_reported_success": 1,  "answer": "INV-1007 is Paid.",  "verified": 1,  "verification_checks": [    { "check": "payment status", "expected": "Paid",      "found": "INV-1007 is Paid.", "passed": true }  ],  "failure_class": null}
Claimed success, portal disagrees
Recorded as task_failure. The agent's claim is kept for audit.
Claimed failure, portal confirms
Succeeded. The change is on the portal, so it is not repeated.
Duplicate detected
done_count above 1 always goes to needs_review.
04API

One request. Any provider.

Submit a task in plain English with the facts to verify. Use ?wait=true to block until it finishes, or poll GET /v1/tasks/{id}.

1curl -X POST "$ROUTER_URL/v1/tasks?wait=true" \2  -H "Authorization: Bearer $ROUTER_API_KEY" \3  -H "Content-Type: application/json" \4  -d '{5    "portal": "acme",6    "task": "Find invoice INV-1007 and report its payment status.",7    "task_type": "invoice_lookup",8    "session_ref": "acme-buyer",9    "expected_outcome": {"invoice_id": "INV-1007"}10  }'
200 OKabridged
1{2  "id": "tsk_51b0d2e8c7a94f30",3  "portal": "acme",4  "task_type": "invoice_lookup",5  "safety_class": "read",6  "status": "succeeded",7  "verified": 1,8  "final_provider": "browser_use",9  "attempt_count": 1,10  "fallback_used": 0,11  "total_cost_usd": 0.06,12  "cost_basis": "actual",13  "duration_ms": 41870,14  "attempts": [15    {16      "attempt_no": 1,17      "provider": "browser_use",18      "engine": "bu-4.0",19      "status": "succeeded",20      "self_reported_success": 1,21      "verified": 1,22      "answer": "INV-1007 is Paid.",23      "verification_checks": [24        { "check": "payment status", "expected": "Paid",25          "found": "INV-1007 is Paid.", "passed": true }26      ]27    }28  ]29}
FieldDescription
portalstringPortal id from your portal registry.
taskstringPlain-English instruction for the agent.
task_typestringRegistered type. Sets the safety class: read, write_idempotent or write_irreversible.
session_refstringName of stored, encrypted portal credentials. Never the password.
expected_outcomeobjectFacts the verifier checks on the portal.
provider_preferencestringOptional. Tried first if available.
allow_fallbackbooleanDefault true. false runs on one provider only.
05Credentials

Built for portals behind a login.

Credentials by reference
Tasks name a session_ref. Passwords never appear in task requests.
Encrypted, then scrubbed
Portal credentials are encrypted at rest and removed from agent output before it is saved. Cookies are never stored.
Your provider keys
Use platform keys or bring your own, encrypted per client.
Honest cost records
Every attempt records its cost and whether it is actual, estimated or unknown.
—Early access

Tolkn is a working proof of concept.

We are looking for a small number of design partners running agents on authenticated portals. Tell us what you would run.

Or email tim@trytolkn.com

We only use this to contact you about early access. Privacy