Documentation

REST API for creating review requests, collecting human feedback, and tracking approvals. Designed for AI agents and backend services.

Quickstart

Sign up to create a tenant admin user and receive admin and consumer API keys, or call the API directly:

curl -X POST "$AGENTFABRIC_API_URL/v1/signup" \
  -H "content-type: application/json" \
  -d '{"tenantName":"Acme Agents","ownerEmail":"ops@example.com","password":"change-me-now"}'

The response includes adminApiKey (manage users and keys) and consumerApiKey (create and read review requests). Pass keys as x-api-key.

MCP server (recommended for agents)

agentfabric.dev ships a native Model Context Protocol server. Point any MCP-compatible client (Cursor, Claude, or your own agent) at the endpoint and human review becomes a set of callable tools.

MCP endpoint: https://mcp.agentfabric.dev

{
  "mcpServers": {
    "agentfabric": {
      "url": "https://mcp.agentfabric.dev"
    }
  }
}

Available tools:

  • create_tenant — create a tenant and receive admin + consumer API keys (no auth required)
  • create_review_request — send content to human reviewers
  • get_review_request — poll a request for its current decision
  • list_review_requests — list review requests
  • list_comments — read reviewer feedback
  • add_reviewer — add a reviewer to an existing request

Authentication

  • App users — humans sign in with email and password to use the dashboard.
  • API keys — agents and backend services send x-api-key.
  • Email reviewers — reviewers use scoped auth codes in review links and do not have app accounts.

API keys

API keys have one scope:

  • Admin — can create users, create/revoke API keys, and manage review requests.
  • Consumer — can create and read review requests, but cannot manage users or keys.

Use consumer keys for agents by default. Use admin keys only for trusted automation that must manage the tenant.

Create review request

POST /v1/review-requests

curl -X POST "$AGENTFABRIC_API_URL/v1/review-requests" \
  -H "content-type: application/json" \
  -H "x-api-key: $AGENTFABRIC_API_KEY" \
  -H "idempotency-key: agent-run-123" \
  -d '{
    "title": "Approve landing page",
    "policy": { "type": "ALL_APPROVE" },
    "reviewers": [{ "email": "reviewer@example.com" }],
    "items": [
      { "title": "Preview", "document": { "type": "url", "url": "https://example.com/page" } }
    ]
  }'

Multi-item requests

This is the canonical multi-item flow for reviewing several generated assets together. One review request can include several assets. Use decisionScope: "item" for per-item approve/reject.

"policy": { "type": "ALL_APPROVE", "decisionScope": "item" },
"items": [
  { "title": "Landing page", "document": { "type": "url", "url": "https://..." } },
  { "title": "Creative PDF", "document": { "type": "pdf", "url": "https://..." } }
]

Comments

GET /v1/review-requests/{requestId}/comments — list feedback (optional ?itemId=... filter).

GET /v1/review/{requestId}/comments — reviewer-scoped comment list.

Reviewer links

Reviewers receive an email with a link containing an auth code. The review app exchanges it:

POST /v1/review/exchange

Then reviewers can comment, approve, or reject via the scoped token.

Policies

TypeBehavior
ALL_APPROVEEvery reviewer must approve; any rejection rejects
ANY_APPROVEFirst approval wins
ANY_REJECTFirst rejection wins
QUORUMMinimum approval count (set quorum)

Status states

Review requests return: pending, approved, rejected, cancelled, or expired.