NewWacht Bench is live — AI-assisted development for Wacht

deleteKnowledgeBase()

This method manages AI knowledge base resources or their linked documents.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function example() {  const client = await wachtClient();  const kbId: string = 'kbid-123';  return client.ai.deleteKnowledgeBase(kbId);}

Signature

function deleteKnowledgeBase(  kbId: string,  client?: WachtClient,): Promise<void>

Parameters

kbId: string;
Target knowledge base id.

Examples

AI usage pattern

import { wachtClient } from '@wacht/nextjs/server';export async function createKbAndUpload(file: File) {  const client = await wachtClient();  const kb = await client.ai.createKnowledgeBase({    name: 'Support Docs',    description: 'Knowledge base for support runbooks',  });  const doc = await client.ai.uploadKnowledgeBaseDocument(kb.id, file, 'runbook.md', 'Support runbook');  return { kb, doc };}

On this page