Developers

Integrate agents via MCP tools or REST APIs. Keep a Human‑in‑the‑Loop for safe decisions, with optional end‑to‑end encryption.

Architecture

Agents connect via MCP (Streamable HTTP) or REST; the Relay brokers requests and responses, and the mobile app handles secure notifications and approvals.

MOBILE CLIENTS (HITL mobile app)HITL MobileAndroid• Push Notifications•Auth (Oauth)HITL MobileiOS• Push Notifications• Auth (Oauth)RELAY SERVER (HITL MCP SERVER) HITL Relayhitlrelay.app/mcp • /api/v1/*WebSocket • RESTHITL-CLIProxy(E2EE)MCP CLIENTS (Use any compatible agent)AI Agent PlatformsClaude CodeGemini CLIChatGPTCursorCodex CLIWindsurfn8nAuthentication:• API Keys• OAuth/JWT TokensWebSocket + Push NotificationsMCP / HTTPE2EEReal-time communication (WebSocket/Push)MCP Protocol (HTTP/SSE)Optional E2EE via proxy

MCP Tools

HITL Relay MCP Server exposes three core MCP tools for agents to interact with the user. All human in hte loop interactions have a maximum wait time of 15 minutes for responses of the user

Note: E2EE versions (request_human_input_e2ee, notify_human_e2ee) available for sensitive data. Agent registration is automatic.

MCP Prompts

HITL Relay MCP server provides a useful starter prompt hitl_coms_only for commnicating to the agent/llm on how to use human loop tool for all further communications with the user

API Keys

Create agent-scoped API keys for programmatic access to HITL from your applications.

Via Mobile App

  1. Open HITL mobile app
  2. Go to Profile → API Keys
  3. Tap "Create New API Key"
  4. Select the agent (or create the agent) to scope the key to
  5. Copy the key (shown once only)

Via REST API

# Create a new API key
curl -X POST https://hitlrelay.app/api/v1/api-keys \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"description":"CLI key","agent_id":"<uuid>"}'

# Response
{"api_key":"mcp_pk_...","prefix":"mcp_pk_x"}

Pass API keys via Authorization: Bearer <api_key> header or HITL_API_KEY environment variable.

Key Endpoints

Production Relay: https://hitl-relay.app

Python API Integration

Integrate HITL capabilities directly into your applications using API keys:

import os
import requests

# Set API key via environment variable or directly
API_KEY = os.getenv("HITL_API_KEY", "mcp_pk_...")
BASE_URL = "https://hitlrelay.app/api/v1"
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Request human input
def request_approval(prompt, choices=None):
    payload = {
        "prompt": prompt,
        "choices": choices or ["Approve", "Deny"],
    }
    resp = requests.post(
        f"{BASE_URL}/hitl/request",
        headers=headers,
        json=payload
    )
    resp.raise_for_status()
    return resp.json()

# Send notification
def notify_completion(message):
    payload = {"message": message}
    resp = requests.post(
        f"{BASE_URL}/hitl/notify",
        headers=headers,
        json=payload
    )
    resp.raise_for_status()
    return resp.json()

# Usage
result = request_approval(
    "Deploy to production?",
    ["Deploy Now", "Run Tests First", "Cancel"]
)
print(f"User responded: {result['response']}")

Command Line Interface

Use the HITL CLI for quick integrations from shell scripts and terminal workflows:

# Install (coming soon to PyPI)
# pip install hitl-cli

# Set API key
export HITL_API_KEY="mcp_pk_..."

# Request human input
hitl request "Should I proceed with deployment?" \
  --choices "Yes,No,Ask me later"

# Send notification
hitl notify "Backup completed successfully"

# Notify task completion
hitl complete "Data processing finished" \
  --summary "Processed 10,000 records in 5 minutes"

#There is also a convenient hook for Claude Code to capture the Stop Hook to allow  long running sessions with Claude Code. you will need to add to your settings.json in claude code
hitl-hook-review-and-continue
 

Note: CLI is currently available via GitHub. PyPI package coming soon.

Start integrating in minutes

Request early access and get MCP credentials plus example configs for your favorite tools.

Loading form...