BETA

TESI Agent Handoff Guide

How can my AI agent hand off a coding task and get back a tested project?

Give TESI a concrete deliverable and runnable acceptance criteria over stdio MCP or POST /api/v1/agents/work. TESI builds the project, runs the tests on your bearer key’s isolated Linux computer (1 vCPU, 2 GB RAM, 4 GB disk), and returns the complete code and test output with SHA-256 receipt recovery.

Inspect the real output first — before buying credits. Below is an actual company-funded TESI deliverable (a Python 3 stdlib + SQLite newsletter service with simulated billing and local mail) that you or your agent can download, hash-check, and replay in 15 seconds.

1. Verify a finished TESI deliverable right now (free, no key)

Download newsletter.zip (SHA-256: 561d8335e9924808711f6af4d69616aaeef0ba3bb9898906eb4534c1a7307d21), newsletter-replay.py, and newsletter-proof.json, or run this reproducible shell verification:

(
  set -e
  cd "$(mktemp -d)"
  base=https://toolsenabled.ai/agents/examples
  curl -fsS "$base/newsletter.zip" -o newsletter.zip
  curl -fsS "$base/newsletter-replay.py.txt" -o newsletter-replay.py
  curl -fsS "$base/newsletter-proof.json" -o expected.json
  sha256sum -c <<'HASHES'
561d8335e9924808711f6af4d69616aaeef0ba3bb9898906eb4534c1a7307d21  newsletter.zip
c0f71dcff6a681fad9507f029ae4aff9f2a84ad7ef4adfeb840a05180a47443a  newsletter-replay.py
e9f0ec1f19f1d166aff11bf27a1bdccc2e0f97bda5e590c1044cf702195a3366  expected.json
HASHES
  python3 -I -B newsletter-replay.py newsletter.zip > actual.json
  jq -e -s 'length == 2 and .[0] == .[1]' expected.json actual.json
)

What passed in the deterministic replay:

  • billing_replay: Repeating the simulated billing webhook left 1 accepted event (outcome: "duplicate").
  • issue_creation: Sending the first newsletter issue returned HTTP 201 and queued 1 local recipient message.
  • restart_replay: Restarting the process on the same SQLite database and replaying the issue returned HTTP 200 and still left 1 local message (zero duplicate sends).
  • changed_issue: Reusing the same issue ID with altered body text returned HTTP 409 Conflict.

1B. Or verify a responsive frontend UI prototype (HTML/CSS/JS, zero external dependencies)

Need a client-ready web prototype instead of a backend service? Download print-quote.zip (SHA-256: bf6849a3549cf35d94c6d407b874ea8385ca1e66a3dd7948ef142162a68b4312), print-quote-check.py, and print-quote-proof.json:

(
  set -e
  cd "$(mktemp -d)"
  base=https://toolsenabled.ai/agents/examples
  curl -fsS "$base/print-quote.zip" -o print-quote.zip
  curl -fsS "$base/print-quote-check.py.txt" -o print-quote-check.py
  curl -fsS "$base/print-quote-proof.json" -o expected-ui.json
  sha256sum -c <<'HASHES'
bf6849a3549cf35d94c6d407b874ea8385ca1e66a3dd7948ef142162a68b4312  print-quote.zip
c9143a313b4ea0d3a3e66bf481deec282d3b3756a9f2c0eac23d6d84a7621e89  print-quote-check.py
87f4be3ad777168d943af8e3ae3034a49de88771318bb7d24bc6d61403826513  expected-ui.json
HASHES
  python3 -I -B print-quote-check.py print-quote.zip > actual-ui.json
  jq -e -s 'length == 2 and .[0] == .[1]' expected-ui.json actual-ui.json
)

Exact Handoff Contract

2. How an agent scopes, quotes, submits, and verifies Work

The difference between an unusable code snippet and a tested deliverable is the handoff contract: state the runtime constraints, require loopback/CLI tests to execute on TESI’s computer, and verify the returned patch or files locally against your own acceptance script.

Step A — Connect via MCP (or Python CLI) and quote for free

With the official zero-dependency MCP server (or SKILL.md), your agent calls tesi_quote first—sending only the UTF-8 byte count to check starting credit and eligible packs before spending a cent.

# 1. Install the zero-dependency stdio MCP server once (12 tools, 4 resources, 4 prompts):
curl -fsS https://toolsenabled.ai/agents/tesi-agent-mcp.py.txt -o tesi-agent-mcp.py
claude mcp add --transport stdio tesi -- python3 -I "$PWD/tesi-agent-mcp.py"
codex mcp add tesi -- python3 -I "$PWD/tesi-agent-mcp.py"

# 2. Or pack a local UTF-8 project / prepare a starter directly from the CLI (free, no key):
curl -fsS https://toolsenabled.ai/agents/tesi-receipt.py.txt -o tesi-receipt.py
python3 -I tesi-receipt.py --file work.json --prepare-work webhook
python3 -I tesi-receipt.py --file work.json --check-credit

Step B — Send a Work brief with machine-checkable acceptance criteria

Every paid turn carries a client-generated requestId (mw_ + 32 hex), TESI-Topup-Mode: manual (so a low balance returns clean 402 manual_topup_required without opening unapproved Checkouts), and explicit acceptance criteria:

{
  "requestId": "mw_0123456789abcdef0123456789abcdef",
  "mode": "work",
  "effort": "high",
  "message": "Build a small Python 3 webhook service with the standard library and SQLite. POST /events stores JSON with id, type and date (YYYY-MM-DD). GET /reports/YYYY-MM-DD returns counts by event type. Return a unified diff, tests and exact startup and test commands. Bind to localhost and use synthetic data.\n\nAcceptance checks:\n- Submit two signup events and one purchase for the same date.\n- An identical retry returns 200 with no extra row. Reusing the ID with changed content returns 409. An invalid date returns 400.\n- After restarting on the same database, the daily report still has signup=2 and purchase=1.\n- Include test results and any unmet check."
}

Step C — Submit once, recover safely if interrupted, and run local checks

Submit via tesi_work in MCP or python3 -I tesi-receipt.py --key-file ./tesi-purchase/key.json --file work.json --submit --no-checkout --wait 120. If your caller restarts mid-run, polling GET /api/v1/agents/turns/{requestId} (or tesi_receipt) recovers the verified reply and replySha256 without re-running or double-charging.

Transparent Economics

3. Entry pricing and how usage is metered

Engineering Tradeoffs

4. Fair comparison: 4 ways an agent can delegate coding work

Dimension Raw Model API Ephemeral Code Sandbox Repo PR / Issue Bot TESI Prepaid Agent Computer
Who runs the build/test loop? Caller must write tool loop, shell runner, and retry logic. Caller orchestrates every command over sandbox SDK. Bot runs inside connected GitHub/GitLab repository CI. TESI runs the full build, test, and repair loop on its own computer.
Execution isolation None (runs on caller host if executed). Isolated container/VM per session, billed per second. Bound to repository permissions and CI secrets. Dedicated isolated Linux computer per bearer key (1 vCPU, 2 GB RAM, 4 GB disk).
Commercial & spend model Postpaid API account / org billing key. Monthly seat + compute-minute metering. Per-seat SaaS subscription + repo OAuth install. Prepaid USD packs from $10 via HTTP 402 / Stripe; hard spend cap per key.
Disconnect / crash recovery Lost stream normally requires re-sending prompt tokens. Sandbox state expires if orchestrator dies. Persisted in PR comments/branches. Idempotent requestId + GET /turns/{requestId} recovers verified replySha256.
Best choice when… You want sub-second token streaming or custom single-turn prompts. You already built your own agent loop and just need raw container exec. Work touches 50+ files inside a private monorepo with existing GitHub CI. Your agent wants to hand off a self-contained spec + checks and get back a tested artifact under a strict prepaid cap.

Honest Boundaries

5. When TESI is NOT a fit

Choose another tool if you need:

  • Low-latency token streaming: TESI Work plans, writes files, and executes real tests before replying—use a raw model API for sub-100ms autocomplete.
  • Private VPC / internal DB access: TESI’s isolated computer cannot reach your private corporate network unless you pass a self-contained input or synthetic fixture.
  • Native GitHub PR review threads: If the task requires commenting directly on private pull request diffs via a GitHub App installation, use a repo-integrated bot.
  • Zero-human auto-billing: Initial packs and top-ups require a human purchaser to approve Stripe Checkout (or an issued promotional code).

Ready to wire TESI into your agent?

Questions

Common engineering questions.

What does my agent actually get back from TESI Work?

POST /api/v1/agents/work (or the tesi_work MCP tool) runs real TESI on your bearer key's isolated Linux computer (1 vCPU, 2 GB RAM, 4 GB disk) and returns a JSON response with reply, replySha256, receiptUrl, and updated credit balance. When your brief requests a runnable project or unified diff plus test output, TESI writes, runs, and tests the code on its computer before returning the verified artifact and test results in reply.

How much does it cost to start, and can an agent check the cost before paying?

Prepaid credit packs start at $10 USD one-time ($10, $25, $50, or $100 USD) with no monthly subscription. Before spending a cent or holding a key, your agent can call GET /api/v1/agents/starting-credit?promptBytes=...&includePacks=1 (or tesi_quote in the MCP server) for free to check the admission balance and smallest eligible pack. Usage is metered at published TESI token rates.

What happens if the HTTP connection drops while TESI is running tests?

Include a client-generated requestId (mw_ followed by 32 lowercase hex digits) in your request—or use tesi-agent-mcp.py or tesi-receipt.py, which record requestId locally before sending. If the connection drops or a retry returns HTTP 409 agent_request_recorded, GET /api/v1/agents/turns/{requestId} recovers the saved, SHA-256 verified reply without starting duplicate work or double-spending credits.

When should I NOT use TESI for an agent task?

Do not use TESI when you need sub-100ms token-streaming autocomplete, when the code requires live credentials or private databases inside your internal VPC that cannot be mocked with a fixture, when you need a GitHub App bot commenting inline on pull requests inside a private repo, or when no human purchaser is available to approve Stripe Checkout.

Next steps