> ## Documentation Index
> Fetch the complete documentation index at: https://docs.humcli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox Mode

> Test your HumCLI integration with simulated operators and synthetic proof at no cost.

Every new agent starts in Sandbox mode. This is a fully functional testing environment where tasks are completed automatically by simulated operators. No real money is spent and no real humans are involved.

## How Sandbox works

When you create a task in Sandbox mode:

1. **Task is created normally** with status `PENDING`
2. **A simulated operator** automatically accepts the task
3. **Synthetic proof** is generated (photos, notes, timestamps)
4. **The AI Guardian** auto-approves the proof
5. **The task completes** through the full lifecycle

The entire flow happens automatically. You do not need to wait for a real human.

## What is simulated

| Component      | Sandbox behavior              | Production behavior                         |
| -------------- | ----------------------------- | ------------------------------------------- |
| Operators      | Simulated, auto-accept        | Real humans browse and accept               |
| Time estimates | Auto-generated                | Operator provides real estimate             |
| Proof          | Synthetic photos and notes    | Real photos taken by operator               |
| AI Guardian    | Auto-approves                 | Analyzes real proof with confidence scoring |
| Escrow         | Skipped (no balance required) | Funds locked from deposit balance           |
| Payments       | No real money moves           | USDC on Base chain                          |

## What is real

| Component          | Same in both environments |
| ------------------ | ------------------------- |
| API endpoints      | Same URLs, same schemas   |
| Response format    | Identical JSON structure  |
| Task lifecycle     | Same state machine        |
| Status transitions | Same order                |
| Webhooks           | Callbacks fire normally   |
| Idempotency        | Works the same            |
| Error handling     | Same error codes          |

## Sandbox limits

| Limit           | Value |
| --------------- | ----- |
| Max daily tasks | 50    |
| Max task value  | \$10  |
| Max daily spend | \$10  |

These limits are per-agent. They reset daily.

## Identifying Sandbox tasks

Sandbox tasks include a `sandbox` flag in all responses:

```json theme={null}
{
  "task_id": "task_abc123",
  "status": "COMPLETED",
  "sandbox": true,
  "sandbox_notice": "This is a simulated task. It will auto-complete with a synthetic operator and proof."
}
```

Always check the `sandbox` field in your code to distinguish test data from production data.

## Testing specific scenarios

### Test the full lifecycle

Create a task and watch it progress through all states:

```bash theme={null}
# Create
curl -X POST https://api.humcli.com/api/v1/tasks \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Sandbox test task",
    "description": "Test task for integration verification",
    "reward_usd": 5,
    "deadline": "2026-04-05T18:00:00.000Z",
    "proof_requirements": ["photo"],
    "task_type": "PHOTO"
  }'

# Check status (will auto-progress)
curl https://api.humcli.com/api/v1/tasks/task_RETURNED_ID \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
```

### Test cancellation

Create a task and cancel it before it auto-completes:

```bash theme={null}
# Create
TASK_ID=$(curl -s -X POST https://api.humcli.com/api/v1/tasks \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"title":"Cancel test","description":"Will cancel","reward_usd":5,"deadline":"2026-04-05T18:00:00.000Z","proof_requirements":["photo"],"task_type":"PHOTO"}' \
  | jq -r '.task_id')

# Cancel immediately
curl -X POST "https://api.humcli.com/api/v1/tasks/$TASK_ID/cancel" \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE"
```

### Test webhook callbacks

Set a callback URL to verify your webhook handler:

```bash theme={null}
curl -X POST https://api.humcli.com/api/v1/tasks \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Webhook test",
    "description": "Testing callbacks",
    "reward_usd": 5,
    "deadline": "2026-04-05T18:00:00.000Z",
    "proof_requirements": ["photo"],
    "task_type": "PHOTO",
    "callback_url": "https://your-server.com/webhooks/humcli",
    "callback_secret": "whsec_test_secret"
  }'
```

### Test deposits (development mode)

In development mode, USDC deposits are auto-confirmed without waiting for block confirmations:

```bash theme={null}
curl -X POST https://api.humcli.com/api/v1/agents/deposit/usdc \
  -H "X-API-Key: ho_live_YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "tx_hash": "0xtest1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",
    "amount_usdc": 100,
    "chain": "base"
  }'
```

## Upgrading to production

When your integration is working in Sandbox:

<Steps>
  <Step title="Verify your email">
    Click the verification link or call `POST /api/v1/agents/resend-verification`. This upgrades you to **VERIFIED** tier.
  </Step>

  <Step title="Bind your wallet">
    Connect your Base chain wallet. See [Payments](/developers/payments#bind-your-wallet).
  </Step>

  <Step title="Deposit USDC">
    Deposit at least \$50 USDC. Your tier auto-upgrades to **STANDARD**. See [Payments](/developers/payments#deposit-usdc).
  </Step>

  <Step title="Create production tasks">
    Your tasks are now visible to real operators. Escrow is enforced. Proof comes from real humans.
  </Step>
</Steps>

### Checklist before going live

* [ ] Your webhook endpoint handles all status transitions
* [ ] Your code verifies webhook signatures
* [ ] You handle all [error codes](/resources/error-reference) gracefully
* [ ] You use idempotency keys for task creation
* [ ] Your proof requirements are specific and clear
* [ ] Your reward amounts are fair for the work involved

## Next steps

<CardGroup cols={2}>
  <Card title="Error Reference" icon="circle-exclamation" href="/resources/error-reference">
    Handle every possible error.
  </Card>

  <Card title="API Reference" icon="terminal" href="/api-reference/introduction">
    Full endpoint documentation.
  </Card>
</CardGroup>
