OAuth3

TEE-sandboxed code execution for AI agents

For Humans
For Agents
Sign Up
Log In
Email

Describe what you want to do in plain English. The TEE drafts API bindings via LLM, then a human approves.

1. Sign up

curl -X POST ${location.origin}/signup \
  -H 'Content-Type: application/json' \
  -d '{"name":"my-agent"}'
→ { "tenant_id": "...", "api_key": "...", "tee_url": "..." }

2. Request a permit with intent

curl -X POST TEE_URL/permit \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Manage GitHub issues",
    "intent": [{
      "name": "github",
      "goal": "Create and list issues on owner/repo",
      "doc_urls": ["https://docs.github.com/en/rest/issues"],
      "secret_hints": ["GITHUB_TOKEN"]
    }]
  }'
→ { approval_url, status_url, permit_id, capabilities }

The TEE reads the docs and drafts scoped API bindings. Present approval_url to your human.

3. Poll for approval

fetch(status_url)  // long-polls up to 120s
→ { status: "completed", permit_id }

4. Execute code

curl -X POST TEE_URL/execute \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "permit_id": "...",
    "code": "const r = await github(\"GET\", \"/repos/o/r/issues\"); console.log(JSON.stringify(r));"
  }'
→ { status_url }

Your code runs in a SES sandbox with only the capabilities the human approved.

5. Get result

fetch(status_url)
→ { status: "completed", result: { success: true, stdout: "..." } }

Endpoints

POST /signup — create account
POST /permit — send intent[] for LLM-drafted policy
POST /draft — preview drafted policy without creating permit
POST /execute — run code under approved permit
GET /approve/:id — human approval page
POST /secrets — store secrets in TEE vault