ComposableVoiceAgent
Plug in a STTProvider, an LLM model string, and a TTS model string. Useful
when you want to test a hand-rolled voice stack against the same scenario
harness as the bundled adapters.
Constructor
python
import scenario
agent = scenario.ComposableVoiceAgent(
stt=scenario.ElevenLabsSTTProvider(api_key=...),
llm="openai/gpt-5.4-mini",
tts="elevenlabs/some-voice-id",
system_prompt="You are a helpful assistant.",
)stt accepts any STTProvider implementation (voice.OpenAISTTProvider,
voice.ElevenLabsSTTProvider, or your own). Note llm differs by SDK: Python
takes a model string; TypeScript takes an AI-SDK LanguageModel.
Capabilities
| streaming_transcripts | native_vad | dtmf | interruption | input_formats | output_formats |
|---|---|---|---|---|---|
| ✅ | ❌ | ❌ | ❌ | pcm16/24000 | pcm16/24000 |
VAD: Composable has no native VAD; the SDK falls back to webrtcvad. See
Troubleshooting → VAD didn't fire.
Worked examples
- See the ElevenLabs composable variant for a working pattern in both SDKs.
- TypeScript:
composable-stt-swap.test.ts— swaps the judge's STT provider per run viarun(cfg, { voice: { stt } }).
