<Agent>

<Agent>

The root of the tree. Everything the agent says and can do renders inside it.

import { Agent } from "curb";

function Agent(props: AgentProps): ReactNode;

Props

PropTypeDefaultWhat it does
llmLLM providerkugelaudio.llm()The model
sttSpeech-to-text providerazure.stt()Speech recognition
ttsText-to-speech providerkugelaudio.tts()The voice
adjustable{ client?: paths, host?: paths }nothingWhat the caller’s page and the host may change during a call. Paths: "tts.voice", "tts.model", "stt.language", "llm" (Mid-call changes)

A changed prop swaps that provider from the next render, also during a call.

Example

import { Agent, SystemPrompt } from "curb";
import { kugelaudio } from "curb/providers";

<Agent llm={kugelaudio.llm()} stt={kugelaudio.stt({ language: "de" })} tts={kugelaudio.tts({ language: "de" })}>
  <SystemPrompt>You answer calls for an insurance company.</SystemPrompt>
</Agent>

Version history

VersionChanges
v1.4.33<Agent> renders the skills a conversation opens
v1.2.6llm, stt, tts and adjustable added
v0.1.2<Agent> introduced