Prompt agents
Build an agent from a system prompt, a voice and a model, then tune how it listens and speaks.
A prompt agent is the common kind. You write a system prompt, pick a voice and a model, and the agent holds the conversation by itself. It can call functions and look things up in a knowledge base when it needs to.
Use a prompt agent when the conversation is open-ended: support, scheduling, answering questions. If the call must follow fixed steps, use a flow agent. A third type, multi_prompt, splits one agent into named states, each with its own prompt.
Create one
curl https://api.dialgem.com/v1/agents \
-H "X-API-Key: $DIALGEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Front desk",
"agent_type": "llm",
"system_prompt": "You answer calls for a dental clinic. Be brief and friendly.",
"first_message": "Thanks for calling Bright Smile. How can I help?",
"voice_id": "VOICE_ID"
}'Get a voice_id from Voices. Every field is listed under Create agent in the API reference.
You can also create agents in the dashboard, which writes the same fields.
Write the prompt
The system prompt is the single biggest lever on quality. Four habits help:
- Say who the agent is and who it talks to. One or two sentences.
- Keep replies short. The caller is listening, not reading. Say so in the prompt ("answer in one or two sentences").
- Say what to do when it does not know. For example, offer to take a message or transfer the call.
- Put facts in the knowledge base, not the prompt. Opening hours and prices change; a long prompt also slows every turn.
Variables
Write {{customer_name}} anywhere in the prompt or first message. Set the values when the call starts, or give defaults on the agent with default_dynamic_variables.
{
"default_dynamic_variables": { "business_name": "Bright Smile" }
}For a web call, send them in dialgem_llm_dynamic_variables when you create the call.
The first message
first_message is what the agent says when it picks up. Leave it empty and the agent waits for the caller to speak first. begin_message_delay_ms (0 to 5000) adds a short pause before it speaks.
Tune how it listens and speaks
| Setting | Range | What it does |
|---|---|---|
responsiveness | 0 to 1 | Higher answers sooner after the caller stops. |
interruption_sensitivity | 0 to 1 | Higher lets the caller cut in more easily. |
enable_backchannel | true/false | Short "mm-hm" acknowledgements while the caller talks. |
voice_speed | 0.5 to 2 | Speaking pace. |
reminder_trigger_ms | milliseconds | Silence before the agent prompts the caller. reminder_message sets the words and reminder_max_count caps how often. |
end_call_after_silence_ms | 10 s to 30 min | Hang up after this much silence. |
max_call_duration_ms | 1 min to 2 h | Hard limit on call length. |
ambient_sound | none, coffee-shop, call-center, and others | Background sound, with ambient_sound_volume. |
pronunciation_dictionary | up to 200 entries | How to say names and terms. |
boosted_keywords | list | Words speech recognition should favour, such as product names. |
Test before you go live
Publish a version, then run it against scripted cases. See Testing agents. To change a live agent safely, edit the draft and publish a new version; phone numbers can point at a specific version.
After the call
- Post-call analysis fills in variables you define (for example, "appointment booked") from the transcript. It appears on the call record and in the
call_analyzedwebhook. - Privacy:
pii_redaction_enabledredacts personal data from stored transcripts, andopt_out_call_recordingandopt_out_transcript_storageturn storage off. See Data retention.