---
title: "Create Agent Knowledge Base Link"
method: POST
path: "/api/v1/voice-agents/{agent_id}/knowledge-bases"
tags: ["Agent Knowledge Bases", "Agent Knowledge Bases"]
---

# Create Agent Knowledge Base Link

`POST /api/v1/voice-agents/{agent_id}/knowledge-bases`

Link a knowledge base to an agent with tool configuration.

## Path parameters

- `agent_id` string, uuid, required

## Request body

- AgentKnowledgeBaseCreateRequest
  - `knowledge_base_id` string, uuid, required
  - `tool_name` string, required
  - `description` string, required
  - `condition` string, nullable
  - `result_limit` integer
  - `min_relevance_score` number
  - `tool_messages` ToolMessageConfig — Configuration for what the agent says during tool execution. The platform supports 4 message types during tool calls: - start: When tool execution begins - delayed: If execution takes longer than expected or user speaks - complete: When tool succeeds - failed: When tool fails For each message: - None = use platform default behavior - "" (empty string) = silence (say nothing) - "custom text" = say this specific message - ["variant A", "variant B"] = random selection per call Platform defaults: - start: Random filler like "Hold on a sec", "One moment", "Just a sec" - delayed: "Sorry, a few more seconds" - complete: (none) - failed: (none)
    - `start_message` union — Message before tool execution. None=default, empty=silence
      - string
      - string[]
    - `delayed_message` union — Message if tool execution is delayed
      - string
      - string[]
    - `delayed_timing_ms` integer — How long to wait before saying delayed message
    - `complete_message` union — Message after successful tool execution
      - string
      - string[]
    - `failed_message` union — Message after failed tool execution
      - string
      - string[]
    - `start_blocking` boolean — If true, wait for start message before calling tool

## Response `201`

Successful Response

- AgentKnowledgeBaseRead
  - `id` string, uuid, required
  - `tenant_id` string, uuid, required
  - `agent_id` string, uuid, nullable
  - `report_agent_id` string, uuid, nullable
  - `chat_agent_id` string, uuid, nullable
  - `text_agent_id` string, uuid, nullable
  - `agent_type` 'voice_agent' | 'email_agent' | 'report_agent' | 'chat_agent' | 'text_agent', required
  - `knowledge_base_id` string, uuid, required
  - `tool_name` string, required
  - `description` string, required
  - `condition` string, nullable, required
  - `result_limit` integer, required
  - `min_relevance_score` number, required
  - `enabled` boolean, required
  - `tool_messages` object, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/c0f54348e251/schema)
