Skip to main content
POST
/
api
/
agents
/
{id}
/
config
Add knowledge item
curl --request POST \
  --url https://agent-evalserver-production.up.railway.app/api/agents/{id}/config \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "label": "Refund policy",
  "description": "Customers can request a refund within 30 days of purchase.",
  "type": "knowledge"
}
'
{
  "id": 12,
  "label": "Refund policy",
  "description": "Customers can request a refund within 30 days of purchase.",
  "type": "knowledge",
  "node_count": 3,
  "created_at": "2026-06-02T15:08:00Z",
  "updated_at": "2026-06-02T15:08:00Z"
}

Add Knowledge Item

Add one source fact, answer, or knowledge item to an evaluation agent. Use this when your evaluation source material already exists as structured question-answer data and you want to attach it directly to the agent.

Endpoint

POST /api/agents/{id}/config

Authentication

Send your platform API key in the x-api-key header.

Path Parameters

NameTypeDescription
idstring<uuid>Evaluation agent ID.

Request Body

{
  "label": "Refund policy",
  "description": "Customers can request a refund within 30 days of purchase.",
  "type": "knowledge"
}

Success Response

Returns 201 Created with the knowledge item that was added.

Authorizations

x-api-key
string
header
required

Platform API key for authenticated account-level API access

Path Parameters

id
string<uuid>
required

Evaluation agent ID.

Body

application/json

Add a knowledge item or expected answer source for an evaluation agent.

label
string
required

Question, title, or short label for the knowledge item.

Example:

"Refund policy"

description
string
required

Answer or source content used during evaluation.

Example:

"Customers can request a refund within 30 days of purchase."

type
enum<string>
default:knowledge

Public evaluation workflows should use knowledge.

Available options:
knowledge
Example:

"knowledge"

Response

Knowledge item created

Knowledge entry attached to an evaluation agent.

id
integer

Knowledge item identifier.

Example:

12

label
string

Question, title, or short label for the knowledge item.

Example:

"Refund policy"

description
string

Answer or source content used during evaluation.

Example:

"Customers can request a refund within 30 days of purchase."

type
enum<string>

Public evaluation workflows should use knowledge.

Available options:
knowledge
Example:

"knowledge"

node_count
integer | null

Number of graph nodes created from this item, when available.

Example:

3

created_at
string<date-time>

Creation timestamp.

Example:

"2026-06-02T15:08:00Z"

updated_at
string<date-time>

Last update timestamp.

Example:

"2026-06-02T15:08:00Z"