Labsco
zmarten logo

MeatSpace

from zmarten

Human-in-the-loop for AI agents. Submit content + 2โ€“4 choices, get a structured human decision back.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

MeatSpace

Human-in-the-loop service for AI agents. When an agent hits a subjective, high-stakes, or ambiguous decision, MeatSpace routes it to a human who picks one of 2โ€“4 options and returns a structured result.

Live at meatspace.run

What it does

An agent posts a title, optional content (text, markdown, HTML, or an image), and 2โ€“4 labeled choices. A human reviewer is shown the request, picks one, and the API returns the selected id and label. The agent waits via long-poll or webhook.

Typical use cases:

  • Approval gates before destructive or irreversible actions (deploys, deletes, payments).
  • Subjective tie-breaks where the model is below its confidence threshold.
  • Tasteful judgment calls โ€” copy choices, design preferences, ranking ties.
  • Escalation when an agent has run out of deterministic checks.

Don't use it when the task is deterministic, automatically verifiable, or low-stakes and easily reversible.

Three integration methods

MethodEndpointBest for
REST APIPOST /api/requestsAny HTTP client, custom agent frameworks, server-to-server.
MCPPOST /api/mcp (Streamable HTTP)Claude, Claude Code, MCP-compatible clients.
Browser SDK/sdk/meatspace.jsAgents running in a browser tab.

All three sit on the same backing API and accept the same Bearer token.

MCP

MeatSpace implements MCP over Streamable HTTP at https://meatspace.run/api/mcp. The server exposes three tools:

  • get_service_status โ€” availability and escalation guidance. No auth.
  • provision_api_key โ€” mint a Bearer token. No auth, rate-limited.
  • ask_human โ€” submit a decision. Requires Bearer auth.

Claude Code config:

{
  "mcpServers": {
    "meatspace": {
      "type": "url",
      "url": "https://meatspace.run/api/mcp",
      "headers": {
        "Authorization": "Bearer <your-api-key>"
      }
    }
  }
}

ask_human long-polls for up to 20 seconds. If the human hasn't responded by then, the tool returns status: "pending" with a review_url (for the human) and a poll_url (for the agent).

Browser SDK

For agents running in browser contexts:

<script type="module">
  import { MeatSpace } from 'https://meatspace.run/sdk/meatspace.js';

  const ms = new MeatSpace();
  await ms.getKey({ name: 'browser-agent', email: 'agent@example.com' });

  const result = await ms.ask({
    agentName: 'browser-agent',
    title: 'Which option?',
    choices: [
      { id: 'a', label: 'A' },
      { id: 'b', label: 'B' },
    ],
  });
  console.log(result.selected);
</script>

Methods: getKey(), createRequest(), pollResult(), waitForResult(), ask() (create + wait).

Webhooks

If callback_url is set on the request, MeatSpace POSTs the result when the human responds:

{
  "event": "request.completed",
  "request_id": "uuid",
  "selected": "ship",
  "selected_label": "Ship it",
  "responded_at": "2026-04-23T18:10:00.000Z",
  "metadata": {}
}

callback_url must be https:// and the hostname must be explicitly allowlisted by the operator. If no allowlist is configured, request creation rejects callback URLs. Each delivery is signed with X-HITL-Timestamp and X-HITL-Signature headers.

Discovery endpoints

PathFormatPurpose
/.well-known/mcp.jsonJSONMCP server manifest
/.well-known/agent.jsonJSONA2A Agent Card
/api/openapiJSONOpenAPI 3.1 spec
/api/mcp (GET)JSONMCP server info, no auth
/api/statusJSONHealth check + agent guidance
/sdk/meatspace.jsJavaScriptBrowser SDK
/llms.txtTextLLM-readable summary
/llms-full.txtTextFull API documentation
/agents.mdMarkdownFull integration guide
/sitemap.xmlXMLSitemap
/robots.txtTextCrawler directives + discovery pointers

Errors

All errors return:

{
  "success": false,
  "error": "Human-readable message",
  "code": "machine_readable_code"
}

Common codes: agent_name_required, invalid_choice_count, content_too_large, callback_url_not_allowed, request_create_failed.

Local development

This repo is a Next.js 14 app deployed on Cloudflare Pages.

npm install
npm run dev          # local dev at http://localhost:3000
npm run test         # integration tests
npm run build:cf     # build for Cloudflare Pages
npm run deploy:cf    # build and deploy

Supabase is the system of record for keys and requests; Resend handles transactional email.