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

# Health & version

> Probe whether an instance's agent is ready, and read the gateway build.

Both endpoints live on the instance URL, not the Sandbox API: the base is `https://{instanceId}.agent37.app`, with the same `sk_live_` key sent as the `X-Agent37-Key` header. See [Instance and preview URLs](https://www.agent37.com/docs/agents-api/urls.md).

## Health

`GET /v1/health` returns `{ "ok": true, "agent": "hermes", "healthy": true, "hermes": true }`. `ok` is true whenever the gateway is up; `agent` is the harness that was probed, and `healthy` reports whether that harness behind it is reachable. By default it probes the instance's configured harness; pass `?agent=`, `hermes`, `openclaw`, `claude-code`, `codex`, `grok`, `opencode`, or `pi`, to probe a specific one (an unknown value is `400 validation_error`, and an empty value is the same as omitting it). An unreachable or unprovisioned harness reports as `healthy: false` with a `200`; so does `claude-code` until a [Claude account is connected](https://www.agent37.com/docs/agents-api/claude-code.md#connect-your-claude-account), `codex` until an [OpenAI account is connected](https://www.agent37.com/docs/agents-api/codex.md#connect-your-openai-account), and `grok` until an [xAI key is set](https://www.agent37.com/docs/agents-api/grok.md). When Hermes is probed, the body also carries a `hermes` field mirroring `healthy`, kept for backward compatibility; other harnesses omit it. Use it as a readiness probe after [create or start](https://www.agent37.com/docs/agents-api/instances.md): the create call returns as soon as the instance's computer is up, while the agent inside is still booting, and a start that boots the instance fresh (a stopped instance, or a [wake](https://www.agent37.com/docs/agents-api/instance-auto-sleep.md) that has to rebuild it because the checkpoint could not be restored or the instance was moved to another host or to cold storage) returns `running` the same way, before the agent is ready. Poll until `healthy` is `true` before sending work; `ok` alone only tells you the gateway is answering.

```bash curl wrap theme={null}
curl -X GET \
  https://ab12cd34ef.agent37.app/v1/health \
  --url-query "agent=hermes" \
  -H "X-Agent37-Key: sk_live_..."
```

```python Python wrap theme={null}
import requests

response = requests.get(
    "https://ab12cd34ef.agent37.app/v1/health",
    headers={
        "X-Agent37-Key": "sk_live_..."
    },
    params={
        "agent": "hermes"
    },
)
response.raise_for_status()
print(response.json())
```

```javascript Node wrap theme={null}
const query = new URLSearchParams({
  "agent": "hermes"
});

const response = await fetch(
  "https://ab12cd34ef.agent37.app/v1/health" + "?" + query,
  {
    method: "GET",
    headers: {
      "X-Agent37-Key": "sk_live_..."
    },
  },
);
if (!response.ok) {
  throw new Error(await response.text());
}
console.log(await response.json());
```

```json response wrap theme={null}
{ "ok": true, "agent": "hermes", "healthy": true, "hermes": true }
```

## Version

`GET /v1/version` returns the gateway build as `{ "name": "agent37-gateway", "version": "<semver>" }`, where `version` is the gateway release pinned in the instance's image.

```bash curl wrap theme={null}
curl -X GET \
  https://ab12cd34ef.agent37.app/v1/version \
  -H "X-Agent37-Key: sk_live_..."
```

```python Python wrap theme={null}
import requests

response = requests.get(
    "https://ab12cd34ef.agent37.app/v1/version",
    headers={
        "X-Agent37-Key": "sk_live_..."
    },
)
response.raise_for_status()
print(response.json())
```

```javascript Node wrap theme={null}
const response = await fetch(
  "https://ab12cd34ef.agent37.app/v1/version",
  {
    method: "GET",
    headers: {
      "X-Agent37-Key": "sk_live_..."
    },
  },
);
if (!response.ok) {
  throw new Error(await response.text());
}
console.log(await response.json());
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.