---
title: "Knowledge health of an AI Agent (v2)"
method: GET
path: "/v2/agents/{idOrAddress}/knowledge"
tags: ["Agents"]
---

# Knowledge health of an AI Agent (v2)

`GET /v2/agents/{idOrAddress}/knowledge`

## Request

- Base URL: `https://api.chat.ethora.com`
- URL: `https://api.chat.ethora.com/v2/agents/{idOrAddress}/knowledge`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Compares the agent's stored knowledge (Web Index pages and Docs Index
documents carrying its id) with the searchable chunks in the AI
service, and reports what is stored but not searchable. Fix gaps with
`POST /v2/agents/{idOrAddress}/knowledge/rebuild`.

When the AI service cannot be reached the counts of stored rows are
still returned, with `indexAvailable: false` and `chunks: null`.

Owner only. Supports `User JWT` and `B2B Server JWT`.

## Path parameters

- `idOrAddress` string, required

## Response `200`

```
{
  ok: true,
  pages: number,              // Web Index rows
  docs: number,               // Docs Index rows
  chunks: number|null,        // searchable chunks, null when the AI service is unreachable
  missing: {
    pages: number,            // stored but not searchable
    docs: number,
    examples: string[]        // up to 5 URLs / file names
  },
  lastIndexedAt: ISODate|null,
  indexAvailable: boolean,
  rebuilding: boolean         // a rebuild is running
}
```

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: ``` { error: 'Forbidden', code: 'FORBIDDEN' } ```
- `404`: ``` { error: 'Agent not found', code: 'AGENT_NOT_FOUND' } ```
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/ethora/apis/platform-api.md) · [All operations](https://skmtc.dev/ethora/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ethora/apis/platform-api/revisions/01b6e64378ee?raw)
