# Create agent

```http
POST /projects/{project_reference}/agents
```

Create agent. Requires project.agents.write.

## Parameters

| Name                 | In    | Required | Description                                                |
| -------------------- | ----- | -------- | ---------------------------------------------------------- |
| `project_reference`  | path  | Yes      | Project slug, UUID, or domain that identifies the project. |
| `source_target_kind` | query |          |                                                            |
| `target_branch_id`   | query |          |                                                            |

## Request body

| Field                 | Type         | Required | Description                                                                                                                                                                                                                                    |
| --------------------- | ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                  | string       | Yes      |                                                                                                                                                                                                                                                |
| `name`                | string       | Yes      |                                                                                                                                                                                                                                                |
| `description`         | string,null  |          |                                                                                                                                                                                                                                                |
| `model`               | string,null  |          |                                                                                                                                                                                                                                                |
| `system_prompt`       | string       | Yes      |                                                                                                                                                                                                                                                |
| `thinking`            | object       |          |                                                                                                                                                                                                                                                |
| `temperature`         | number,null  |          |                                                                                                                                                                                                                                                |
| `max_steps`           | integer,null |          |                                                                                                                                                                                                                                                |
| `allowed_models`      | array        |          |                                                                                                                                                                                                                                                |
| `skill_ids`           | array        |          |                                                                                                                                                                                                                                                |
| `skill_selection`     | object       |          |                                                                                                                                                                                                                                                |
| `skills`              |              |          |                                                                                                                                                                                                                                                |
| `all_tools_enabled`   | boolean      |          |                                                                                                                                                                                                                                                |
| `tool_ids`            | array        |          | Project tools, platform tools, and integration catalog tools returned by get\_integration. Use exact names from the agent tool references search.                                                                                              |
| `tools`               |              |          | Callable host-tool selector. Use false to disable all host tools, including skill and delegation tools. An empty array or map selects no project tools but preserves legacy runtime essentials. Provider-native tools use provider\_tool\_ids. |
| `tool_loading`        | string       |          |                                                                                                                                                                                                                                                |
| `tool_result_context` |              |          |                                                                                                                                                                                                                                                |
| `knowledge`           |              |          |                                                                                                                                                                                                                                                |
| `provider_tool_ids`   | array        |          | Provider-native model tools only. Never put tool references from tool\_ids here.                                                                                                                                                               |
| `suggestions`         | array,null   |          |                                                                                                                                                                                                                                                |
| `avatar`              | object,null  |          |                                                                                                                                                                                                                                                |
| `avatar_url`          | string,null  |          |                                                                                                                                                                                                                                                |
| `security_enabled`    | boolean      |          |                                                                                                                                                                                                                                                |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 201    | Agent created                                                                                               |
| 400    | Bad request                                                                                                 |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden                                                                                                   |
| 404    | Not found                                                                                                   |
| 409    | Conflict                                                                                                    |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
