Prerequisites
- A TruGen API key from the Developer Portal
- An avatar ID: the Avatar Gallery has stock avatars you can use right away
1. Create an agent
Send aPOST /v1/ext/agent with a name, prompt, and avatar. Everything else falls back to platform defaults (Groq LLM, ElevenLabs voice + STT, English, no tools).
id: save it for step 2.
Response
Need every configurable field? See the full configuration
reference.
2. Embed the agent
Pick the integration that matches your stack.- React
- iFrame
- JavaScript SDK
Install the widget:Render it with your agent ID:
What just happened
Step 1: Agent created. Behind that single API call, TruGen provisioned a persistent agent with your prompt and avatar, wired up the default pipeline (Groq LLM, ElevenLabs STT + TTS, English, turn detection on), and returned an ID. That ID is your handle to the agent everywhere: widget, iframe, SDK, external meetings, and API. Change the agent’s behavior anytime withPATCH /v1/ext/agent/{id} and the next session picks it up. No redeploy of your app required.
Step 2: Live conversation. The widget or iframe traded your API key for a short-lived session token, opened a WebRTC connection to TruGen’s edge, streamed the user’s microphone in, and streamed the rendered avatar video back. Every turn ran through the full pipeline (capture → STT → Hawkeye vision → LLM → TTS → Huma render) server-side in under a second. You wrote zero WebRTC code, managed zero media state, and never exposed your API key to the browser.
Next steps
Agent concepts
What an agent is, how the conversation loop works, and everything you can
configure.
Prompting
Write system prompts that behave well in a spoken, real-time setting.