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

# Create agent

> Create agent.

`createAgent(input: CreateProjectAgentInput!): ProjectAgentDocument!`

Requires project.agents.write.

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`CreateProjectAgentInput!`](https://veryfront.com/docs/cloud/graphql/types/createprojectagentinput) | Yes |

## Input fields

### input

[`CreateProjectAgentInput`](https://veryfront.com/docs/cloud/graphql/types/createprojectagentinput)

| Field | Type | Required |
| - | - | - |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `sourceTargetKind` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `targetBranchId` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No |
| `id` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes |
| `name` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes |
| `description` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `model` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `systemPrompt` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes |
| `thinking` | [`JSON`](https://veryfront.com/docs/cloud/graphql/types/json) | No |
| `temperature` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) | No |
| `maxSteps` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No |
| `allowedModels` | [`[String!]`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `skillIds` | [`[String!]`](https://veryfront.com/docs/cloud/graphql/types/string) | No |
| `skillSelection` | [`ProjectAgentSkillSelectionInput`](https://veryfront.com/docs/cloud/graphql/types/projectagentskillselectioninput) | No |
| `skills` | [`JSON`](https://veryfront.com/docs/cloud/graphql/types/json) | No |
| `allToolsEnabled` | [`Boolean`](https://veryfront.com/docs/cloud/graphql/types/boolean) | No |

[All fields of `CreateProjectAgentInput`](https://veryfront.com/docs/cloud/graphql/types/createprojectagentinput).

## Response

Returns [`ProjectAgentDocument!`](https://veryfront.com/docs/cloud/graphql/types/projectagentdocument). Open the type for its fields and nested types.

| Field | Type |
| - | - |
| `id` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) |
| `name` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) |
| `description` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) |
| `model` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) |
| `systemPrompt` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) |
| `thinking` | [`JSON`](https://veryfront.com/docs/cloud/graphql/types/json) |
| `temperature` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) |
| `maxSteps` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) |

[All fields of `ProjectAgentDocument`](https://veryfront.com/docs/cloud/graphql/types/projectagentdocument).

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation CreateAgent($input: CreateProjectAgentInput!) {
  createAgent(input: $input) {
    id
    name
    allowedModels
    allToolsEnabled
    avatar
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "projectReference": "00000000-0000-4000-8000-000000000001",
    "id": "example",
    "name": "example",
    "systemPrompt": "example"
  }
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.