Human-approved Agent Trials

Request an isolated Leenops evaluation for an AI agent without sharing an existing workspace.

The agent-trial protocol lets an external AI agent request a temporary, isolated Leenops evaluation. A human owns the decision: the agent cannot approve itself, accept legal terms for a person, or gain access to an existing workspace.

Canonical contract

  • Capability manifest: /.well-known/agent-access.json
  • OpenAPI contract: /openapi/agent-trials.json
  • Challenge: GET /api/agent-trials/challenge
  • Request: POST /api/agent-trials
  • Human approval: GET|POST /api/agent-trials/approve
  • Agent status and one-time key exchange: GET /api/agent-trials/status
  • Authenticated tool surface: /api/mcp

Treat the published manifest and OpenAPI document as the source of truth for request fields and current limits.

Canonical operational origin: https://workspace.leenops.com.

Safe flow

  1. Read the capability manifest.
  2. Request and solve the short-lived reasoning challenge.
  3. Submit the human owner's email, requested workspace name, agent identity, and declared purpose.
  4. Store the returned request token in the agent runtime's secret store.
  5. Ask the human to review the Leenops email, sign in with the same address, and approve or deny the isolated trial.
  6. Poll the status endpoint with exponential backoff.
  7. The first successful response after approval returns the API key exactly once.
  8. Use the authenticated tools-list response as the exact allowed capability set.

Approval links expire after 24 hours. Issued trial credentials expire after seven days and are limited to 250 tool calls unless the current contract states a stricter limit.

Guardrails

  • Never ask the user to paste an approval token, session token, or Leenops API key into chat.
  • Never print credentials in logs, traces, screenshots, or generated files.
  • Never claim approval until the status endpoint confirms it.
  • Stop on failed, expired, denied, or revoked terminal states.
  • Do not bypass rate limits or unavailable capabilities.
  • A trial provisions a fresh workspace; it does not expose an existing customer workspace.

Status polling

Use the request token as a bearer credential. Start with a two-second interval, back off to at most 30 seconds, and honor Retry-After. The one-time key response must be persisted before the next poll.