At the start of every call, CXB Core fetches the bot configuration from CXB API. The config defines the system prompt, service providers, voice settings, tools, and post-call behavior.

Config fetch

GET {CXB_API_CONFIG_URL}/{bot_id}?caller_id={caller}&stream_id={call_id}
X-CXB-Core-Secret: {secret}
CXB API returns 200 with the config JSON, 503 if the bot is outside active hours, or 404 if the bot doesn’t exist.

Schema reference

Top-level fields

FieldTypeDefaultDescription
session_idstring(required)Unique session identifier
bot_idstring""Bot identifier (used for KB context and logging)
webhook_urlstring(required)URL for results webhook
system_promptstring(required)LLM system prompt
opening_messagestring(required)First message bot speaks
timezonestring"UTC"Timezone for timestamps
re_engagementobject/nullnullOptional silence re-engagement config. Off by default (see below).
min_words_interruptionint3Min words before customer can interrupt bot
max_call_duration_secondsint600Max call length before auto-hangup
voicemail_messagestring""Message to speak when voicemail is detected
pre_transfer_messagestring""Message to speak before call transfer
toolslist[object][]Standard function-calling tool definitions
conversation_policydict/nullnullStructured policy that drives the policy engine (rules, flow, disposition schema). When null, the manual system_prompt is used.
transfer_numbersdict{}Map of name → phone number for transfers
transfer_targetslist[object][]Structured transfer targets for SIP, phone, WebSocket reverse-transfer, or Agent Desk handoff
post_call_analysis_promptstringnullPrompt for post-call LLM analysis
post_call_cache_enabledboolfalseEnables explicit LLM caching for post-call analysis/QC prompts
post_call_cache_versionstring""Cache version computed by CXB API from raw prompt templates; bump to invalidate
post_call_cachedict/nullnullProvider/cache hints for post-call caching
qc_promptstringnullPrompt for QC analysis
auto_dispositionsdictnullPer-bot disposition overrides
agent_desk_enabledboolfalseEnables Agent Desk handoff behavior when transfer targets use agent_desk
agent_desk_contextdict{}Extra context passed with Agent Desk handoffs
callback_detection_enabledboolfalseEnables mid-call callback-request detection and post-call extraction
knowledgeobjectdisabledKnowledge Base RAG runtime config
ambient_soundobjectdisabledOptional ambient sound config
sip_contextobject{}SIP headers, variables, and transfer headers
call_contextobject{}Per-call variables available to runtime tools
crm_contextdict{}CRM field values available to the custom-tool runtime
prompt_partsobject/nullnullDirect-prompt live-cache config (see below)
live_prompt_cache_stateobject/nullnullRuntime live-cache handle passed back by CXB API (see below)

STT config (stt)

FieldTypeDefaultDescription
providerstring(required)"stt_streaming", "stt_turn_detecting", or "stt_multilingual"
api_keystring""Provider API key
modelstring"<model-id>"Model identifier
languagestring"hi"Language code
extradict{}Provider-specific settings
Common extra keys:
ProviderKeys
stt_streamingendpointing, smart_format, punctuate, interim_results
stt_turn_detectingeot_threshold, eager_eot_threshold, eot_timeout_ms, keyterm, min_confidence, language_hints, should_interrupt
stt_multilinguallanguage_hints, language_hints_strict, context, enable_speaker_diarization, enable_language_identification, client_reference_id, vad_force_turn_endpoint

LLM config (llm)

FieldTypeDefaultDescription
providerstring(required)"llm_b", "llm_a", or "llm_managed"
api_keystring""Provider API key
modelstring(required)Model identifier (e.g., "<model-id>")
temperaturefloat0.7Sampling temperature
max_tokensint256Max output tokens per turn
extradict{}Provider-specific: top_p, top_k, frequency_penalty, presence_penalty, project_id (managed platform), location (managed platform)
The managed LLM platform requires project_id in llm.extra. Calls fail at startup without it. location defaults to us-east4 if omitted.

TTS config (tts)

FieldTypeDefaultDescription
providerstring(required)"tts_a" or "tts_b"
api_keystring""Provider API key
voice_idstring(required)Voice identifier
modelstringnullModel identifier (e.g., "<model-id>")
languagestring"en"Language code
extradict{}Provider-specific: speed, stability, similarity_boost, pitch, loudness, pace
cache_configobject/nullnullOptional Redis-backed audio cache config for the default TTS engine (see below)

TTS cache config (tts.cache_config)

Redis-backed audio cache for the default TTS engine. Both snake_case and camelCase keys are accepted (camelCase aliases shown in parentheses).
FieldTypeDefaultDescription
enabledboolfalseEnables the cache for this bot
max_entries (maxEntries)int5000Max cached entries (1–100000)
ttl_sec (ttlSec)int604800Entry TTL in seconds (60 – 90 days)
max_text_len (maxTextLen)int500Max text length eligible for caching (1–10000)
get_timeout_ms (getTimeoutMs)int100Cache lookup timeout in ms (1–5000)
The cache requires TTS_CACHE_REDIS_URL to be set on the fleet host. When disabled (or unset), the normal TTS engine path is used.

VAD config (vad)

FieldTypeDefaultDescription
confidencefloat0.7VAD confidence threshold
start_secsfloat0.2Seconds of speech to trigger start
stop_secsfloat0.2Seconds of silence to trigger stop
min_volumefloat0.6Minimum volume threshold

Re-engagement config (re_engagement)

FieldTypeDefaultDescription
messageslist[string](required)Prompts to speak when customer is silent
gap_secondsint | list[int]5Seconds before re-engagement. List = [first, subsequent].
max_retriesint2Max re-engagement attempts before RNR hangup
re_engagement is optional and null by default — silence re-engagement is off unless CXB API sends this object.

Live prompt cache config (prompt_parts)

Direct-prompt live caching splits the live system prompt into a cacheable static part and a per-call dynamic part. See Caching for the full design.
FieldTypeDefaultDescription
modestring"legacy"Prompt mode. "legacy" uses system_prompt; split-prompt modes use the fields below.
cache_enabledboolfalseEnables live prompt caching for this call
static_system_promptstring""Static, cacheable portion of the prompt (policy, rules, schema)
dynamic_runtime_promptstring""Per-call dynamic portion (customer vars, CRM fields, dates)
static_versionstring""Version of the static prompt; controls cache reuse/invalidation
prompt_cache_keystring""prompt_cache_key hint for prefix routing (request-hint LLM provider)
prompt_cache_retentionstring"in_memory"prompt_cache_retention hint (request-hint LLM provider)

Live prompt cache state (live_prompt_cache_state)

Runtime handle for an already-created CachedContent on the explicit-cache LLM providers, passed by CXB API so a warm cache can be reused across calls.
FieldTypeDefaultDescription
cache_namestring/nullnullProvider cache resource name
expires_atdatetime/nullnullCache expiry; CXB Core recreates the cache instead of failing the call when expired

MinIO config (minio)

FieldTypeDefaultDescription
endpointstring"localhost:9000"S3-compatible endpoint
access_keystring"minioadmin"Access key
secret_keystring"minioadmin"Secret key
bucketstring"recordings"Bucket name
secureboolfalseUse HTTPS
When minio is null in config, the worker falls back to environment variable MinIO settings. Set it explicitly in bot config to use a different storage destination per bot.

Knowledge config (knowledge)

FieldTypeDefaultDescription
enabledboolfalseEnables the built-in search_knowledge tool
bot_idstring""Bot ID used for CXB API search context
kb_idslist[string][]Attached knowledge-base IDs
knowledge_baseslist[object][]Attached KB summaries injected into the tool description
top_kint4Number of chunks to retrieve
score_thresholdfloat0.55Minimum score for usable chunks
strictbooltrueIf true, the bot should not answer outside approved KB results
fallback_messagestringdefault refusalMessage when no approved result is found
trigger_instructionsstring""Per-bot guidance for when to use RAG
search_urlstring""CXB API search endpoint
CXB API owns KB CRUD, document ingestion, embedding, vector-database search, and per-bot trigger instructions. CXB Core only injects the runtime tool when knowledge is enabled and at least one KB is attached.

Tool runtime metadata

Custom tools may include CXB-specific metadata:
FieldDescription
x_cxb_timing.policyimmediate, speak_then_run, speak_and_run_parallel, terminal_after_speech, run_then_speak, or streaming_result
x_cxb_timing.pre_messageGuidance for the LLM-generated spoken pre-message
x_cxb_execution.kindnoop or http
x_cxb_execution.urlHTTP endpoint for kind=http
x_cxb_execution.methodHTTP method, default POST
x_cxb_execution.headers / params / jsonRequest templates. Supports {{args.*}}, {{call.*}}, {{sip.headers.*}}, and {{sip.variables.*}}.
x_cxb_execution.timeout_secondsHTTP timeout, default 8
Built-in tools (end_call, transfer_call, detected_voicemail, search_knowledge) are excluded from the custom runtime map.