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

# Agent-created canvases

> Let an agent create a temporary Chatblocks workspace first, then have a human claim it.

Most Chatblocks setup starts human-first: a user signs in, creates a workspace, and copies a `cb_live_*` key into an agent. Agent-created canvases invert that flow. The agent asks Chatblocks for a temporary workspace and MCP key, edits the canvas immediately, and sends the human a claim link.

## Flow

<Steps>
  <Step title="Agent creates a bootstrap workspace">
    The agent calls `POST /api/agent/bootstrap` with the human's email address and optional labels:

    ```bash theme={null}
    curl -s https://chatblocks.ai/api/agent/bootstrap \
      -H "Content-Type: application/json" \
      -d '{
        "humanEmail": "owner@example.com",
        "agentName": "OpenClaw",
        "workspaceName": "Launch dashboard",
        "canvasName": "Launch dashboard canvas"
      }'
    ```
  </Step>

  <Step title="Chatblocks returns MCP setup details">
    The response includes:

    ```json theme={null}
    {
      "apiKey": "cb_live_...",
      "mcpUrl": "https://chatblocks.ai/api/mcp/v1",
      "claimUrl": "https://chatblocks.ai/claim/cb_claim_...",
      "canvasUrl": "https://chatblocks.ai/canvas/<canvasId>",
      "limits": { "buildsPerDay": 10 }
    }
    ```

    The agent can connect to the hosted MCP endpoint with the returned key and start editing the temporary canvas. The `claimUrl` is the ownership handoff; the `canvasUrl` opens after the human claims the workspace.
  </Step>

  <Step title="Human claims the workspace">
    Chatblocks emails the human a magic link. Existing users land on `/claim/<token>` and claim into their account. New users land on `/setup`, create a profile, and claim the same workspace during profile creation.
  </Step>
</Steps>

## Temporary workspace behavior

Agent-created workspaces use the same `anon` workspace plan as the public playground:

* 24 hour expiration if unclaimed
* hosted MCP only
* anonymous build cap of 10 builds per day
* no AI generation or paid data-source access
* garbage collection through the anonymous workspace sweeper

After claim, the workspace becomes a normal free workspace. The bootstrap MCP key is kept active, converted to a visible connected-agent key, and attached to the claiming user's account for revocation and status display.

## Request fields

| Field           | Required | Description                                                                                                 |
| --------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `humanEmail`    | Yes      | Email address that receives the claim magic link.                                                           |
| `agentName`     | No       | Display name for the connected agent. Known names like OpenClaw and Poke map to first-party agent profiles. |
| `workspaceName` | No       | Name for the temporary workspace before and after claim.                                                    |
| `canvasName`    | No       | Name for the seeded canvas.                                                                                 |

## When to use it

Use agent-created canvases when the agent is the first actor in the workflow: background research, demos, marketplace recipes, or "make a canvas for this user" automations. For normal interactive setup, use the in-app connect overlay from the canvas or [MCP setup](/mcp/setup).
