Configuration

Configuration

Curb reads everything below from the environment or the project’s .env. How an agent behaves is set in code, on <Agent> and in defineAgent.

Provider keys

The environment holds only the keys of the providers the agent uses. A missing one fails with an error naming it.

ProviderVariable
kugelaudio.llm(), kugelaudio.stt(), kugelaudio.tts()KUGELAUDIO_API_KEY. With npx curb login, a project on this machine needs none
anthropic()ANTHROPIC_API_KEY
openai(), openai.stt(), openai.tts()OPENAI_API_KEY
openaiCompatible()AGENT_LLM_API_KEY, else OPENAI_API_KEY; optional
azure.stt()AZURE_SPEECH_KEY; AZURE_SPEECH_REGION (default eastus)
deepgram.stt()DEEPGRAM_API_KEY
elevenlabs.stt(), elevenlabs.tts()ELEVEN_API_KEY, or ELEVENLABS_API_KEY
cartesia.tts()CARTESIA_API_KEY

KUGELAUDIO_API_BASE points the KugelAudio providers at another endpoint.

Voice

VariableDefaultWhat it does
VOICE_ENDPOINTING_MIN_MS300The shortest pause that can end a turn
VOICE_ENDPOINTING_MAX_MS3000The longest wait before a turn ends
VOICE_SILENCE_FOLLOWUP_MS6000Silence before the agent checks in

LiveKit

VariableWhat it does
LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRETYour LiveKit server or Cloud project. All three, or curb dev names what is missing
CURB_REALTIME_SESSION_URLAsks this URL for each call’s room and tokens, in place of the three above
CURB_AGENT_NAMEThe name a worker registers under. Default: the name in package.json
LIVEKIT_AGENTS_LOG_LEVELLog level of the LiveKit agent runtime. Default warn

Running

VariableDefaultWhat it does
PORT, WS_PORT4000The port. WS_PORT wins. An explicit port is used exactly; otherwise curb dev takes the next free one
WS_HOST127.0.0.1The address to listen on
AGENT_DEFAULTthe first by nameThe agent a project with several starts with
AGENT_LLM_TIMEOUT_MS60000How long a model may take to answer
KUGEL_CONVERSATIONS_DBa local fileWhere conversations are recorded. off turns it off (The preview)
CURB_NO_OPEN1 keeps curb dev from opening the browser
CURB_CDNhttps://cdn.kugelaudio.com/curbWhere curb upgrade looks. Set it to a mirror
MCP_SERVERS_FILEmcp.servers.jsonThe servers added in the preview
MCP_AUTH_DIR.mcp-authWhere MCP sign-ins are stored
MCP_<ID>_TOKENA bearer token for the MCP server with that id

Runner

These apply to a built artifact, and to curb dev and curb start with a management port (Self-hosting).

VariableWhat it does
CURB_MANAGEMENT_ADDRhost:port for host protocol v1. Absent means not managed
CURB_MANAGEMENT_TOKENThe bearer token, one per runner. Required with the address
CURB_MAX_SESSIONSConcurrent calls. Default 1
CURB_DEPLOYMENT_IDOptional: which deployment this runner is
CURB_CONFIGURATION_VERSIONOptional: a positive integer
CURB_REALTIME_URL, CURB_REALTIME_TOKENJoin this one room directly and serve one call
CURB_SESSION_IDThe call’s id on a direct join. Default: the room name
CURB_READINESS_PROBE1 loads the bundle, builds the agent and exits

package.json

{
  "curb": {
    "requiredRuntimeSecrets": ["KUGELAUDIO_API_KEY"]
  }
}

curb build writes these names into curb.bundle.json. A deployment or call then fails before a runner starts when one cannot be resolved (Self-hosting).

Next steps