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

# Create Agent

> Create an agent template (metadata only).

Creates a new agent template with metadata only.

Graph structure is mutated later via [POST /agent/{agent_id}/update](/api/agents/post-agent-update).

`POST /agent/create` does **not** accept graph fields (`graph`, `nodes`, `connections`, `create_video_input_node`). Sending them returns a validation error.

## Request

```bash theme={null}
curl -X POST "https://api.mosaic.so/agent/create" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "UGC Variants",
    "description": "Generate and caption UGC clips",
    "visibility": "private"
  }'
```

## Body Parameters

| Field          | Type   | Required | Description                                                        |
| -------------- | ------ | -------- | ------------------------------------------------------------------ |
| `name`         | string | No       | Agent name (`1-120` chars).                                        |
| `description`  | string | No       | Agent description (`<=5000` chars).                                |
| `visibility`   | string | No       | `public` or `private`.                                             |
| `workspace_id` | string | No       | Target workspace UUID. Defaults to organization primary workspace. |

## Response

```json theme={null}
{
  "success": true,
  "agent_id": "a7ac4cc6-2302-4b14-8fd1-a3287bfc7606",
  "operations_applied": 0,
  "created_nodes": []
}
```
