curl --request POST \
--url https://api.trugen.ai/v1/ext/agent \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data @- <<EOF
{
"agent_name": "Sample AI Agent",
"agent_system_prompt": "You're a helpful ai agent. Answer all questions appropriately.",
"config": {
"timeout": 240
},
"knowledge_base": [
{
"id": "4a0365e4-ced5-42f0-8933-b6880a0ce044",
"name": "new kb 123"
}
],
"record": true,
"callback_url": "",
"callback_events": [
"participant_left",
"max_call_duration_warning",
"max_call_duration_timeout",
"action_found"
],
"avatars": [
{
"avatar_key_id": "665a1170",
"config": {
"llm": {
"model": "meta-llama/llama-4-maverick-17b-128e-instruct",
"provider": "groq"
},
"stt": {
"model": "flux-general-en",
"provider": "deepgram",
"min_endpointing_delay": 0.3,
"max_endpointing_delay": 0.4
},
"tts": {
"model_id": "eleven_turbo_v2_5",
"provider": "elevenlabs",
"voice_id": "ZUrEGyu8GFMwnHbvLhv2"
}
},
"persona_name": "Sample AI Agent",
"persona_prompt": "You're a helpful ai agent. Answer all questions appropriately.",
"conversational_context": "Sample Conversational Context",
"idle_timeout": {
"timeout": 30,
"filler_phrases": [
"Hey it's been a while since we last spoke, are we still connected?",
"I notice we haven't talked for a bit, is everything okay?"
]
},
"welcome_message": {
"wait_time": 2,
"messages": [
"Hi, how are you doing today?",
"Hello, how can I help you?"
]
},
"warning_exit_message": {
"callout_before": 10,
"messages": [
"We are almost at the end of our call, thank you for your time.",
"Thank you for your time. We will see you next time."
]
},
"exit_message": {
"max_call_duration": 300,
"messages": [
"We are at the end of our call, thank you for your time.",
"Thank you for your time today."
]
},
"exit_heads_up_message": {
"callout_before": 10,
"messages": [
"We are almost at the end of our call, thank you for your time.",
"Thank you for your time. We will see you next time."
]
}
}
]
}
EOF