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

# createDinoAiAgentDefinition

> Creates a DinoAI agent definition in the workspace the key targets: a workspace key's own, or the one in the `X-Paradime-Workspace` header. An agent that holds the slug with the same settings is returned unchanged; with other settings, or from `.dinoai/agents/`, it is `CONFLICT`. Needs `dinoai:admin:write`.



**mutation** `createDinoAiAgentDefinition(input: CreateDinoAiAgentDefinitionInput!): CreateDinoAiAgentDefinitionPayload!`

## Arguments

**`input`**: `CreateDinoAiAgentDefinitionInput!` (required)

The agent to create.

## Returns

`CreateDinoAiAgentDefinitionPayload!`

**`dinoAiAgentDefinition`**: `DinoAiAgentDefinition!`

The agent as stored.

## Examples

```graphql Mutation
mutation CreateDinoAiAgentDefinition($input: CreateDinoAiAgentDefinitionInput!) {
  createDinoAiAgentDefinition(input: $input) {
    dinoAiAgentDefinition {
      slug
      name
      source
      version
      role
      goal
    }
  }
}
```

```json Variables
{
  "input": {
    "name": "string",
    "spec": {
      "role": "string",
      "goal": "string",
      "backstory": "string"
    }
  }
}
```

```json Response
{
  "data": {
    "createDinoAiAgentDefinition": {
      "dinoAiAgentDefinition": {
        "slug": "string",
        "name": "string",
        "source": "YAML",
        "version": 1,
        "role": "string",
        "goal": "string"
      }
    }
  }
}
```


## Related topics

- [Administration API: DinoAI](https://docs.paradime.io/developers/graphql-api/admin-api/dinoai.md)
- [Admin client: DinoAI](https://docs.paradime.io/developers/python-sdk/modules/admin/dinoai.md)
- [Build a custom bot on the agent API](https://docs.paradime.io/guides/programmable-agents/build-a-custom-bot.md)
- [Linear intake agent](https://docs.paradime.io/guides/programmable-agents/linear-intake-agent.md)
- [Jira intake agent](https://docs.paradime.io/guides/programmable-agents/jira-intake-agent.md)


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