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

# Add knowledge item

> Add one source fact or expected answer to an evaluation agent.

# 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

```http theme={null}
POST /api/agents/{id}/config
```

## Authentication

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

## Path Parameters

| Name | Type           | Description          |
| ---- | -------------- | -------------------- |
| `id` | `string<uuid>` | Evaluation agent ID. |

## Request Body

```json theme={null}
{
  "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.


## OpenAPI

````yaml post /api/agents/{id}/config
openapi: 3.0.3
info:
  title: Rippletide Agent Evaluation API
  description: >-
    Public API for evaluation agents, test prompts, test results, and knowledge
    imports
  version: 1.0.0
  contact:
    name: Rippletide API Support
servers:
  - url: https://agent-evalserver-production.up.railway.app
    description: Production server
  - url: http://localhost:3001
    description: Development server
security: []
paths:
  /api/agents/{id}/config:
    post:
      tags:
        - Knowledge
      summary: Add knowledge item
      description: >-
        Add one source answer, fact, or knowledge item to an evaluation agent.
        The open-source CLI uses this shape when importing Q&A files.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Evaluation agent ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnowledgeItemRequest'
            examples:
              knowledge:
                summary: Add a knowledge item
                value:
                  label: Refund policy
                  description: Customers can request a refund within 30 days of purchase.
                  type: knowledge
      responses:
        '201':
          description: Knowledge item created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeItem'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateKnowledgeItemRequest:
      type: object
      description: Add a knowledge item or expected answer source for an evaluation agent.
      properties:
        label:
          type: string
          description: Question, title, or short label for the knowledge item.
          example: Refund policy
        description:
          type: string
          description: Answer or source content used during evaluation.
          example: Customers can request a refund within 30 days of purchase.
        type:
          type: string
          enum:
            - knowledge
          default: knowledge
          description: Public evaluation workflows should use knowledge.
          example: knowledge
      required:
        - label
        - description
    KnowledgeItem:
      type: object
      description: Knowledge entry attached to an evaluation agent.
      properties:
        id:
          type: integer
          description: Knowledge item identifier.
          example: 12
        label:
          type: string
          description: Question, title, or short label for the knowledge item.
          example: Refund policy
        description:
          type: string
          description: Answer or source content used during evaluation.
          example: Customers can request a refund within 30 days of purchase.
        type:
          type: string
          enum:
            - knowledge
          description: Public evaluation workflows should use knowledge.
          example: knowledge
        node_count:
          type: integer
          nullable: true
          description: Number of graph nodes created from this item, when available.
          example: 3
        created_at:
          type: string
          format: date-time
          description: Creation timestamp.
          example: '2026-06-02T15:08:00Z'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp.
          example: '2026-06-02T15:08:00Z'
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Platform API key for authenticated account-level API access

````