There are multiple ways to customize the agent behavior per conversation. For simple customer-based prompt customization use context and variables in the prompt. For more advanced configuration, it’s possible to dynamically override almost any part of the agent’s configuration before the conversation starts.

What can be dynamically customized

Any part of the agent’s config can be dynamically customized. A partial override will be merged with the agent’s configuration version used for the conversation. For example:
{
  "override_config": {
    "runtime": {
      "prompt": {
        "type": "fixed",
        "text": "Inform the customer that all agents are busy and hang up the call."
      }
    }
  }
}
This configuration override will be merged with the agent’s configuration only changing the prompt, keeping voice, language, etc exactly the same. The agent will follow these new instructions instead of the original prompt. Another example for changing the voice:
{
  "override_config": {
    "runtime": {
      "personas": [{
        "name": "Amanda",
        "voice": {"id": "Female 1", "provider": "operator"}
      }]
    }
  }
}
This configuration override will be merged with the agent’s configuration only changing the voice.

When the configuration can be customized

There are two main times when you have an opportunity to provide a configuration override:
  1. When creating a new outbound conversation: since the outbound conversations are scheduled over the API, you can provide the overrides directly in the API request.
  2. Right before the conversation starts: before the agent picks up the call or starts responding to a message, it will try to fetch additional context and configuration within the conversation.setup event webhook. The response to this webhook request can contain any additional configuration overrides. This happens for both inbound and outbound conversations.
  • Conversation context: learn how context data is used to customize the agent prompt for a conversation
  • Webhooks: learn how to use the conversation.setup event webhook to dynamically configure the agent per conversation (inbound and outbound)
  • API: Create a conversation: learn how to use the API to dynamically configure the agent per conversation (outbound)