# PATCH /agent-ops/runs/:id

**Resource:** [Agent Ops](./agent-ops.md)  
**Scopes:** `agent-ops:write`  
**Write operation:** yes

Update an agent run by UUID or eve_id. Automatically updates agent registry stats on completion or failure.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | string | yes | Run UUID or eve_id (numeric string) |
| `status` | body | string | no | completed \| failed \| skipped |
| `duration_ms` | body | number | no | Run duration in milliseconds |
| `output_summary` | body | string | no | Human-readable summary of what the agent did |
| `error_message` | body | string | no | Error message if run failed |

## Response example

```json
{ "data": { "id": "run-uuid", "status": "completed", "duration_ms": 12400 } }
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`