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

# Delete an Agent

> Uninstall a managed agent from its GPU node and remove the agent record from Aria Compute PIN.

Delete an agent and clean up its resources. For managed agents, this remotely uninstalls the agent from the host GPU node over SSH. All associated training jobs are cascaded and removed before the agent record is deleted.

## Endpoint

**DELETE** `/v1/agents/:id`

Authorization: Bearer API key required.

## Path parameters

<ParamField path="id" type="string" required>
  Agent identifier, e.g. ag\_7f8e9d0c.
</ParamField>

## Response

On success, the response shape returned by the handler is consistent with other success patterns.

<ResponseField name="ok" type="boolean">
  True when the deletion succeeds.
</ResponseField>

## Example

```bash theme={null}
curl -s -X DELETE http://<pin-host>:8001/v1/agents/ag_7f8e9d0c \
  -H "Authorization: Bearer $ARIA_PIN_KEY"
```

```json theme={null}
{
  "ok": true
}
```

Remove an agent from the PIN control plane. The agent stops appearing in fleet listings and no new jobs are scheduled to it. In-flight jobs are not force-stopped by this call.

## Endpoint

```http theme={null}
DELETE /v1/agents/{id}
```

## Authentication

`Authorization: Bearer <api_key or JWT>` with an account that manages the target agent.

## Path parameters

<ParamField path="id" type="string" required>
  Agent identifier returned by the fleet listing endpoints.
</ParamField>

## Response

<ResponseField name="code" type="integer">
  `0` on success. Non-zero indicates an error; see `message`.
</ResponseField>

<ResponseField name="data" type="object">
  Deletion result envelope, typically `{ "ok": true }`.
</ResponseField>

## Example

```bash theme={null}
curl -X DELETE https://ariapin.example.com/v1/agents/ag_01H7Z... \
  -H "Authorization: Bearer $ARIAPIN_API_KEY"
```

```json theme={null}
{
  "code": 0,
  "data": { "ok": true },
  "message": ""
}
```

<Warning>
  Deleting an agent does not cancel jobs it currently owns. Call the job control endpoints first if you need a graceful stop.
</Warning>


## Related topics

- [Delete an Aria Agent Cloud Agent Definition](/api-reference/agent/agents/delete.md)
- [Delete an Aria Agent Cloud Session by ID](/api-reference/agent/sessions/delete.md)
- [Delete a GPU Node](/api-reference/pin/gpu-nodes/delete.md)
- [Delete or cancel a training job](/api-reference/pin/jobs/delete.md)
- [PIN Delete API Key](/api-reference/pin/apikeys/delete.md)
