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
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.

json
{
  "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

SettingRangeWhat it does
responsiveness0 to 1Higher answers sooner after the caller stops.
interruption_sensitivity0 to 1Higher lets the caller cut in more easily.
enable_backchanneltrue/falseShort "mm-hm" acknowledgements while the caller talks.
voice_speed0.5 to 2Speaking pace.
reminder_trigger_msmillisecondsSilence before the agent prompts the caller. reminder_message sets the words and reminder_max_count caps how often.
end_call_after_silence_ms10 s to 30 minHang up after this much silence.
max_call_duration_ms1 min to 2 hHard limit on call length.
ambient_soundnone, coffee-shop, call-center, and othersBackground sound, with ambient_sound_volume.
pronunciation_dictionaryup to 200 entriesHow to say names and terms.
boosted_keywordslistWords 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_analyzed webhook.
  • Privacy: pii_redaction_enabled redacts personal data from stored transcripts, and opt_out_call_recording and opt_out_transcript_storage turn storage off. See Data retention.