> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.navalabs.ai/api/mcp` to find what you need.

# Agents

Manage a consented user's agents within your integration.

## List a partner user's agents

`GET /integrator/agents`

Requires integrator:agents:write in the integration, key and active user grant, even for this read.

### Query parameters

- `partnerUserRef` `string` _(required)_: Partner-side user reference bound during consent. Derive it from your authenticated session and encode query values.

### Header parameters

- `x-app-id` `string` _(required)_: Your integration's public app ID (NAVA_APP_ID), not its internal integration ID.
- `x-api-key` `string` _(required)_: Your integration API key (NAVA_INTEGRATION_KEY). Server only.

### Responses

#### `200`: The user's agents and registered wallets. The SDK unwraps the agents array.

Body (`application/json`):

- `agents` `object[]` _(required)_
  - `id` `string <uuid>` _(required)_
  - `name` `string` _(required)_
  - `metadata` `object | null` _(required)_
  - `wallets` `object[]` _(required)_
    - `id` `string <uuid>` _(required)_
    - `address` `string` _(required)_: EVM wallet address; registering it is not proof of signer authority.
    - `chainId` `integer | null` _(required)_: Null means all chains.
    - `label` `string | null` _(required)_
    - `verificationStatus` `string` _(required)_
    - `verifiedAt` `string | null` _(required)_
    - `createdAt` `string <date-time>` _(required)_
  - `createdAt` `string <date-time>` _(required)_
  - `updatedAt` `string <date-time>` _(required)_

#### `400`: Invalid body, partnerUserRef or resource UUID, a duplicate wallet on the same agent, or an agent/wallet limit reached.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `401`: Missing or invalid x-app-id or x-api-key.

#### `403`: grant_revoked means the user revoked access; ask for consent again. Plain forbidden means a missing key scope and requires a configuration change.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `404`: No active grant covers this user/scope, the integration no longer allows it, or a requested agent/wallet is inaccessible. Do not treat every resource 404 as missing consent.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `429`: Rate limited (120 requests per minute).

### Example request

```bash
curl 'https://internal.navalabs.dev/api/integrator/agents?partnerUserRef=partner-user-42' \
  --header 'x-app-id: <NAVA_APP_ID>' \
  --header 'x-api-key: <NAVA_INTEGRATION_KEY>'
```

```ts
fetch('https://internal.navalabs.dev/api/integrator/agents?partnerUserRef=partner-user-42', {
  headers: {
    'x-app-id': '<NAVA_APP_ID>',
    'x-api-key': '<NAVA_INTEGRATION_KEY>'
  }
})
```

## Create an agent for a partner user

`POST /integrator/agents`

Requires integrator:agents:write in the integration, key and active user grant. Names are not unique and no Idempotency-Key is supported. Serialize creation and persist the returned ID. After an uncertain write, read to recover a committed result; an empty read does not rule out an in-flight write. Creation does not activate a policy.

### Header parameters

- `x-app-id` `string` _(required)_: Your integration's public app ID (NAVA_APP_ID), not its internal integration ID.
- `x-api-key` `string` _(required)_: Your integration API key (NAVA_INTEGRATION_KEY). Server only.

### Request body (required) (`application/json`)

- `partnerUserRef` `string` _(required)_: Stable partner-side user identifier; constraints apply after trimming.
- `name` `string` _(required)_
- `metadata` `object | null`: Optional partner-defined non-secret context. SDK callers omit rather than pass null.

### Responses

#### `201`: The created agent.

Body (`application/json`):

- `id` `string <uuid>` _(required)_
- `name` `string` _(required)_
- `metadata` `object | null` _(required)_
- `wallets` `object[]` _(required)_
  - `id` `string <uuid>` _(required)_
  - `address` `string` _(required)_: EVM wallet address; registering it is not proof of signer authority.
  - `chainId` `integer | null` _(required)_: Null means all chains.
  - `label` `string | null` _(required)_
  - `verificationStatus` `string` _(required)_
  - `verifiedAt` `string | null` _(required)_
  - `createdAt` `string <date-time>` _(required)_
- `createdAt` `string <date-time>` _(required)_
- `updatedAt` `string <date-time>` _(required)_

#### `400`: Invalid body, partnerUserRef or resource UUID, a duplicate wallet on the same agent, or an agent/wallet limit reached.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `401`: Missing or invalid x-app-id or x-api-key.

#### `403`: grant_revoked means the user revoked access; ask for consent again. Plain forbidden means a missing key scope and requires a configuration change.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `404`: No active grant covers this user/scope, the integration no longer allows it, or a requested agent/wallet is inaccessible. Do not treat every resource 404 as missing consent.

Body (`application/json`):

- `code` `string` _(required)_
- `message` `string | string[]`
- `statusCode` `integer`

#### `429`: Rate limited (60 requests per minute).

### Example request

```bash
curl https://internal.navalabs.dev/api/integrator/agents \
  --request POST \
  --header 'x-app-id: <NAVA_APP_ID>' \
  --header 'x-api-key: <NAVA_INTEGRATION_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "partnerUserRef": "partner-user-42",
  "name": "Trading bot",
  "metadata": {}
}'
```

```ts
fetch('https://internal.navalabs.dev/api/integrator/agents', {
  method: 'POST',
  headers: {
    'x-app-id': '<NAVA_APP_ID>',
    'x-api-key': '<NAVA_INTEGRATION_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    partnerUserRef: 'partner-user-42',
    name: 'Trading bot',
    metadata: {}
  })
})
```
