# Get the routed AMS agent

Operation ID: `patient.getAgentAgent`

Return the AMS agent id to route the caller to. Unauthenticated callers get the public agent id; authenticated callers are routed to the insurance-scan agent until they have insurance on file, then to the symptom-checker agent. No authentication is required, but a Bearer JWT refines the routing when present.

## Public method

`getAgent`

Signature: `patient.getAgent()`

Return type: `Promise<JsonValue>`

## Authentication

Classification: **PUBLIC**

## Prerequisites

None documented.

## HTTP

`GET /agent`

## Path parameters

None.

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`GetAgentAgentResponse`](../models/GetAgentAgentResponse.md) | application/json | Routed AMS agent id |

## Success response examples

### 200

```json
{
  "agentId": "2233445566778899aabbccddeeff0011",
  "ok": true
}
```

## Common errors

None declared in canonical OpenAPI.

## Error examples

None declared in canonical OpenAPI.

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const result = await patient.getAgent();
```

## cURL

```bash
curl -X GET \
  'https://dev-api-patient.health.cloud/agent'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
