# diagrid agent update

Update an Agent

### Description

Update an Agent in a project.

```
diagrid agent update <agent> [flags]
```

### Examples

```

  # Set or update the Agent endpoint
  diagrid agent update my-agent --project my-project --endpoint https://myagent.myorg.com/

  # Remove the Agent endpoint (make it identity-only)
  diagrid agent update my-agent --project my-project --endpoint ""

  # Stop archiving failed workflows, leaving the other archive settings untouched
  diagrid agent update my-agent --disable-workflow-archive failed

  # Replace the Agent's workload labels (self-hosted regions only)
  diagrid agent update my-agent --label team=payments

  # Disable workflow-history archiving
  diagrid agent update my-agent --archive-binding-name ""

```

### Options

```
  -p, --project string                     Name of existing project
  -e, --endpoint string                    Endpoint used to establish outbound connectivity from the Agent to your external application. Pass an empty value to remove it
  -t, --endpoint-token string              Token used to secure calls from the Agent to your provided endpoint
      --endpoint-protocol string           Protocol used to interact with the endpoint: http (default) or grpc
      --regenerate-api-token               Regenerate the API token for this Agent's backing App ID
  -w, --wait                               Wait for long-running resource update to finish
      --archive-binding-name string        Output-binding component name to write archived workflow history through. Setting this enables archiving. Pass an empty value to disable archiving
      --archive-binding-type string        Binding component type for the archive destination (e.g., "bindings.aws.s3")
      --enable-workflow-archive strings    Workflow statuses to start archiving: COMPLETED, FAILED, TERMINATED. Comma-separated or repeated. Statuses not listed keep their current setting
      --disable-workflow-archive strings   Workflow statuses to stop archiving: COMPLETED, FAILED, TERMINATED. Comma-separated or repeated. Statuses not listed keep their current setting
      --label stringToString               Label (key=value) applied to the Agent's workload pod and service account. Repeatable; replaces existing workload labels. Only supported in self-hosted regions (default [])
      --annotation stringToString          Annotation (key=value) applied to the Agent's workload pod and service account, e.g. for managed identity. Repeatable; replaces existing workload annotations. Only supported in self-hosted regions (default [])
  -h, --help                               help for update
```

### Options inherited from parent commands

```
      --api-key string   Diagrid Cloud API key
```

### SEE ALSO

- [diagrid agent](./agent.md)	 - Manage Agents
