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

# Error Codes

> Error Codes for CometChat REST API.

Error codes specific to the Agent Builder APIs.

## Agent Errors

| Error Code                  | Description                            |
| --------------------------- | -------------------------------------- |
| `ERR_AGENT_NOT_FOUND`       | No agent exists with the specified ID. |
| `ERR_AGENT_CREATION_FAILED` | Failed to create the agent.            |

## Tool Errors

| Error Code               | Description                             |
| ------------------------ | --------------------------------------- |
| `ERR_TOOL_NOT_FOUND`     | No tool exists with the specified ID.   |
| `ERR_TOOL_ALREADY_ADDED` | The tool is already added to the agent. |

## Knowledge Base Errors

| Error Code               | Description                                            |
| ------------------------ | ------------------------------------------------------ |
| `ERR_KB_NOT_FOUND`       | No knowledge base record exists with the specified ID. |
| `ERR_KB_INDEXING_FAILED` | Knowledge base indexing failed.                        |

## Authentication Errors

| Error Code                  | Description                                      |
| --------------------------- | ------------------------------------------------ |
| `AUTH_ERR_EMPTY_APIKEY`     | The `apikey` header is missing from the request. |
| `AUTH_ERR_APIKEY_NOT_FOUND` | The provided API key is invalid.                 |
| `AUTH_ERR_NO_ACCESS`        | The API key doesn't have the required scope.     |
