---
title: "Agent Control Protocol upgrade"
url: https://hexelstudio.com/docs/api/titan-agent/agent-control/control
---

# Agent Control Protocol upgrade

**GET** `/titan/agent/control`

Public Titan area path of GET /control (served as api.hexelstudio.com/v1/titan/agent/control, /v1 stripped at the edge); a device proof signs this path. Upgrades to a WebSocket with subprotocol titan.acp.v1 (ACP v1, chosen when offered) or titan.acp.v0 (ACP v0) on the Gateway control listener (:8063, HTTP/1.1). Authentication runs before the handshake checks: the runtime token (and device proof over GET, the received path, and an empty body) is verified first, and any failure, including unavailable local state, is 401. A client that does not offer the subprotocol is upgraded and then closed with 1008 subprotocol. After 101 the client sends attach first; x-websocket gives the closed frame schemas. The channel signals only and never authorizes an action.

## Headers

- `Authorization: string`

  `Bearer <token>`. Runtime identity token from the identity exchange. Through the public edge, device-bound callers (titand) and workloads of the deployment's attached customer Kubernetes clusters are served. A device-bound caller's requests also carry a Titan-Device-Proof over the path below /v1 (or below the cell prefix), i.e. the /titan/agent/... path; an attached cluster's carry none.

- `Titan-Device-Proof: optional string`

  Required for a titan_device_key binding: proof over GET, the received path, and an empty body.

- `Connection: string`

  Must contain the token Upgrade.

- `Upgrade: string`

  Must contain the token websocket.

- `Sec-WebSocket-Version: string`

  WebSocket version 13.

  One of: `"13"`

- `Sec-WebSocket-Key: string`

  Base64 of 16 random bytes.

- `Sec-WebSocket-Protocol: string`

  Must offer titan.acp.v1 or titan.acp.v0. v1 adds the lifecycle signals and the versioned config frames; the server sends them only on a v1 connection.

- `Origin: optional string`

  If present, its host must equal the request host.

## Errors

- `101` Switched to the control protocol.
- `400` Sec-WebSocket-Version is not 13 (the response then carries Sec-WebSocket-Version: 13) or Sec-WebSocket-Key is missing, repeated, or not 16 base64 bytes.
- `401` Authentication failed or local state is unavailable; the body is "unauthorized" and a newline.
- `403` The Origin host is not the request host.
- `426` Not an HTTP/1.1 WebSocket upgrade (Connection or Upgrade missing); the response carries Connection: Upgrade and Upgrade: websocket.

## Example

```bash
curl --request GET \
  --url 'https://api.hexelstudio.com/v1/titan/agent/control' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Connection: CONNECTION' \
  --header 'Upgrade: UPGRADE' \
  --header 'Sec-WebSocket-Version: SEC_WEBSOCKET_VERSION' \
  --header 'Sec-WebSocket-Key: SEC_WEBSOCKET_KEY' \
  --header 'Sec-WebSocket-Protocol: SEC_WEBSOCKET_PROTOCOL'
```

### Response (400)

```json
"string"
```

### Response (401)

```json
"string"
```

### Response (403)

```json
"string"
```

### Response (426)

```json
"string"
```
