# Get the agent

> Resolve the agent behind the session token.

`GET /v1/agent-api/me`

## Responses

| Status | Description    |
| ------ | -------------- |
| `200`  | Agent identity |

## Response fields

| Field                  | Type                                                                                  | Required | Description |
| ---------------------- | ------------------------------------------------------------------------------------- | -------- | ----------- |
| `agent`                | object                                                                                | Yes      |             |
| `agent.id`             | string                                                                                | Yes      |             |
| `agent.name`           | string                                                                                | Yes      |             |
| `agent.status`         | `"pending_claim"` \| `"active"` \| `"suspended"` \| `"pending_policy"` \| `"revoked"` | Yes      |             |
| `agent.organizationId` | string                                                                                | Yes      |             |

## Example

### SDK

```ts
import { createCatenaClient } from "@catena/sdk"

// Reads CATENA_SECRET_KEY
const client = createCatenaClient()

const agent = await client.whoami()
```

### CLI

```sh
catena whoami
```

### Response `200`

```json
{
  "agent": {
    "id": "agent_01JC2Y4H8M3T9V6Q2X7R5N1KPB",
    "name": "Invoice agent",
    "status": "active",
    "organizationId": "org_01JC2X9V7T5R3P1N8L6J4G2E0C"
  }
}
```
