TEE-sandboxed code execution for AI agents
Describe what you want to do in plain English. The TEE drafts API bindings via LLM, then a human approves.
curl -X POST ${location.origin}/signup \
-H 'Content-Type: application/json' \
-d '{"name":"my-agent"}'
→ { "tenant_id": "...", "api_key": "...", "tee_url": "..." }
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.
fetch(status_url) // long-polls up to 120s
→ { status: "completed", permit_id }
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.
fetch(status_url)
→ { status: "completed", result: { success: true, stdout: "..." } }
POST /signup — create accountPOST /permit — send intent[] for LLM-drafted policyPOST /draft — preview drafted policy without creating permitPOST /execute — run code under approved permitGET /approve/:id — human approval pagePOST /secrets — store secrets in TEE vault