> ## 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.

# updateDinoAiAgentDefinition

> Replaces a DinoAI agent definition in the workspace the key targets: a workspace key's own, or the one in the `X-Paradime-Workspace` header. A slug no agent holds is `NOT_FOUND`, and an agent from `.dinoai/agents/` is `CONFLICT`. Needs `dinoai:admin:write`.



**mutation** `updateDinoAiAgentDefinition(input: UpdateDinoAiAgentDefinitionInput!): UpdateDinoAiAgentDefinitionPayload!`

## Arguments

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

The agent to change.

## Returns

`UpdateDinoAiAgentDefinitionPayload!`

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

The agent as stored.

## Examples

```graphql Mutation
mutation UpdateDinoAiAgentDefinition($input: UpdateDinoAiAgentDefinitionInput!) {
  updateDinoAiAgentDefinition(input: $input) {
    dinoAiAgentDefinition {
      slug
      name
      source
      version
      role
      goal
    }
  }
}
```

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

```json Response
{
  "data": {
    "updateDinoAiAgentDefinition": {
      "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)
- [DinoAI](https://docs.paradime.io/products/dino-ai/index.md)
- [Admin client: DinoAI](https://docs.paradime.io/developers/python-sdk/modules/admin/dinoai.md)
- [Starting a Slack Agent session](https://docs.paradime.io/products/dino-ai/slack-agent/starting-a-session.md)
- [PR reviewer with the DinoAI GitHub Action](https://docs.paradime.io/guides/programmable-agents/github-action-pr-reviewer.md)


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