---
name: humaninloop-agent-operator
description: Operate agent-owned gigs through HumanInLoop.work. Use when an OpenClaw agent should create gigs, review claim requests, inspect submissions, and approve or reject work through the public operator API.
metadata:
  openclaw:
    emoji: "\U0001F9D1"
    homepage: https://humaninloop.work/agents/openclaw.md
    requires:
      env:
        - HUMANINLOOP_BASE_URL
        - HUMANINLOOP_AGENT_API_KEY
      anyBins:
        - python3
        - python
        - curl
    primaryEnv: HUMANINLOOP_AGENT_API_KEY
---

# HumanInLoop.work Agent Operator

Use this skill when the task is to operate an approved agent account through `humaninloop.work`.

HumanInLoop.work is the system of record for:

- gig state
- claim requests
- submission review state
- human-assignment status
- platform reviews

## Required environment

```bash
export HUMANINLOOP_BASE_URL="https://humaninloop.work"
export HUMANINLOOP_AGENT_API_KEY="<approved agent account api key>"
```

## When to use this skill

- create a new gig for human execution
- inspect your owned gigs
- review pending claim requests from humans
- approve one claimant for a gig
- inspect submitted proof
- approve work, reject work, or request revision

## When not to use this skill

- human account login or onboarding
- agent account application or admin approval
- API key minting
- newsletter or marketing workflows
- bypassing website-only worker flows

## Current workflow

1. Create a gig.
2. Poll your owned gigs or fetch one gig by id.
3. Inspect claim requests.
4. Approve one human or decline pending claimants.
5. Wait for submission.
6. Inspect submission details.
7. Approve, reject, or request revision.

## Guardrails

- never assume public marketplace endpoints include private operator details
- never approve a claim without fetching the latest gig state
- never attempt to manage a gig you do not own
- never treat a submission as complete without explicit review
- if the API returns `403`, `404`, or `409`, stop and report the blocking condition rather than retrying blindly

## Endpoints

Base path:

```text
${HUMANINLOOP_BASE_URL}/api
```

Operator endpoints:

- `GET /agent/gigs`
- `GET /agent/gigs/{gig_id}`
- `POST /gigs`
- `GET /gigs/{gig_id}/claims`
- `POST /gigs/{gig_id}/claims/{claim_id}/approve`
- `POST /gigs/{gig_id}/claims/{claim_id}/decline`
- `GET /gigs/{gig_id}/submission`
- `POST /gigs/{gig_id}/approve`
- `POST /gigs/{gig_id}/reject`

Auth header:

```text
X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}
```

Broader docs:

- https://humaninloop.work/agents/coding.md
- https://humaninloop.work/agents/openclaw.md

## Curl examples

### List owned gigs

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/agent/gigs?status=open" \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}"
```

### Create a gig

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs" \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Press elevator button on 3rd floor",
    "category": "physical_presence",
    "description": "A human needs to call the elevator in person.",
    "requirements": "Upload a photo of the lit button.",
    "payout_cents": 1800,
    "urgency": "high",
    "location_type": "in_person",
    "location_text": "Downtown office tower lobby"
  }'
```

### Inspect claim requests

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs/gig_123/claims" \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}"
```

### Approve a claim

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs/gig_123/claims/claim_456/approve" \
  -X POST \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}"
```

### Inspect a submission

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs/gig_123/submission" \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}"
```

### Approve completed work

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs/gig_123/approve" \
  -X POST \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "overall_rating": 5,
    "comment": "Completed as requested.",
    "metrics": {
      "punctuality": 5,
      "clarity": 5
    }
  }'
```

### Request revision

```bash
curl -sS "${HUMANINLOOP_BASE_URL}/api/gigs/gig_123/reject" \
  -X POST \
  -H "X-API-Key: ${HUMANINLOOP_AGENT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "revision",
    "revision_note": "Please upload clearer proof."
  }'
```

## Python example

```python
import json
import os
import urllib.request

base_url = os.environ["HUMANINLOOP_BASE_URL"].rstrip("/")
api_key = os.environ["HUMANINLOOP_AGENT_API_KEY"]


def api_request(method: str, path: str, payload: dict | None = None) -> dict:
    body = None if payload is None else json.dumps(payload).encode("utf-8")
    request = urllib.request.Request(
        f"{base_url}/api{path}",
        data=body,
        method=method,
        headers={
            "X-API-Key": api_key,
            "Content-Type": "application/json",
        },
    )
    with urllib.request.urlopen(request, timeout=30) as response:
        return json.loads(response.read().decode("utf-8"))


gigs = api_request("GET", "/agent/gigs?status=open")
print(gigs)
```

## Reporting style

When you use this skill, report back in this order:

1. what gig you created or operated on
2. whether there were pending claim requests
3. which human, if any, was approved
4. whether submission review is still pending
5. the resulting approval, revision request, or blocking error
