Skip to content

bodhi-realtime-agent / KnowledgeBaseConfig

Interface: KnowledgeBaseConfig ​

Defined in: src/types/knowledge-base.ts:64

Properties ​

autoPromptThreshold? ​

optional autoPromptThreshold?: number

Defined in: src/types/knowledge-base.ts:74

Character threshold for auto mode. If the sum of all auto-mode documents is below this limit, they are injected into the prompt. Otherwise they go through the search tool.

Default: 50 000 (~12k tokens). Gemini supports up to ~4M chars; this default keeps the prompt concise for latency while covering most voice-agent KBs.


chunkOverlap? ​

optional chunkOverlap?: number

Defined in: src/types/knowledge-base.ts:87

Overlap between adjacent chunks in characters. Default: 200.


chunkSize? ​

optional chunkSize?: number

Defined in: src/types/knowledge-base.ts:85

Target chunk size in characters for tool-mode documents. Default: 1500 (~375 tokens). Smaller chunks improve search precision; larger chunks preserve more surrounding context.


documents ​

documents: KnowledgeBaseDocument[]

Defined in: src/types/knowledge-base.ts:65


maxIndexChars? ​

optional maxIndexChars?: number

Defined in: src/types/knowledge-base.ts:100

Hard cap (characters) on the total text routed to the in-memory tool index.

When the combined size of all tool-routed documents exceeds this value, the processor truncates additional documents (in declared order) and emits a [truncated] notice. Use this to prevent a single noisy upload from blowing out memory/latency. Default: 1_500_000 (~1.5 MB / ~375k tokens).

Setting 0 disables the cap entirely.


maxResults? ​

optional maxResults?: number

Defined in: src/types/knowledge-base.ts:89

Maximum number of chunks returned per search call. Default: 5.


toolDescription? ​

optional toolDescription?: string

Defined in: src/types/knowledge-base.ts:79

Override the description of the auto-generated search_knowledge_base tool. Only relevant when at least one document routes through the tool path.

Built with VitePress