---
title: "getHarness"
---

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

# getHarness

Path: agenthold API › sessions

`GET /agents/{agentId}/harness`

URL: `/api/v1/agents/{agentId}/harness`

The agent's harness. With connect=true the harness is started (waking the agent) to discover login methods.

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `agentId` (`getHarness.path.agentId`; string, required)

## Query parameters

- `connect` (`getHarness.query.connect`; boolean, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/agents/<agentId>/harness' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/agents/<agentId>/harness';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/agents/<agentId>/harness"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Harness state.

#### Example

```json
{
  "harness": "string",
  "connected": true,
  "agentName": "string",
  "agentVersion": "string",
  "loadSession": true,
  "authMethods": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "string"
    }
  ]
}
```

- `harness` (`getHarness.response.200.harness`; string, required)
- `connected` (`getHarness.response.200.connected`; boolean, required)
- `agentName` (`getHarness.response.200.agentName`; string, required)
- `agentVersion` (`getHarness.response.200.agentVersion`; string, required)
- `loadSession` (`getHarness.response.200.loadSession`; boolean, required)
- `authMethods` (`getHarness.response.200.authMethods`; array of object, required)
  - `id` (`getHarness.response.200.authMethods.id`; string, required)
  - `name` (`getHarness.response.200.authMethods.name`; string, required)
  - `description` (`getHarness.response.200.authMethods.description`; string, required)
  - `type` (`getHarness.response.200.authMethods.type`; string, required) — "terminal": run it in the agent terminal (terminal?auth=<id>).

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getHarness.response.404.error`; string, required)

### 409

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getHarness.response.409.error`; string, required)


Source: https://agenthold.dev/api/get-harness/index.md
