#can set security configuration of the agent when created using the api ?

1 messages · Page 1 of 1 (latest)

orchid stirrupBOT
#
AI-generated Answer for fyro4966

Yes, you can set security configurations for an agent when creating it via the API. You can enable authentication by setting the enable_auth option in the platform_settings object. This allows you to manage access and enhance security for your agent.

woven burrow
#

i want to set overrides

orchid stirrupBOT
#
AI-generated Answer for fyro4966

Yes, you can set security configurations for an agent when creating it using the API. You can enable authentication by configuring the auth object within the platform_settings of the agent's configuration. Here's a basic example of how you might structure your API request:

{
  "conversation_config": {
    "agent": {
      "server": {
        "url": "<string>",
        "server_events": ["turn"],
        "secret": "<string>",
        "timeout": 123,
        "num_retries": 123,
        "error_message": "<string>"
      },
      "prompt": {
        "prompt": "<string>",
        "llm": "gpt-4o-mini",
        "temperature": 123,
        "max_tokens": 123,
        "tools": [
          {
            "type": "webhook",
            "name": "<string>",
            "description": "<string>",
            "placeholder_statement": "<string>",
            "api_schema": {
              "url": "<string>",
              "method": "GET",
              "path_params_schema": {},
              "query_params_schema": {
                "properties": {},
                "required": ["<string>"]
              },
              "request_body_schema": {
                "type": "object",
                "properties": {},
                "required": ["<string>"],
                "description": "<string>"
              },
              "request_headers": {}
            }
          }
        ],
        "knowledge_base": [
          {
            "type": "file",
            "name": "<string>",
            "id": "<string>"
          }
        ]
      },
      "first_message": "<string>",
      "language": "<string>"
    },
    "asr": {
      "quality": "high",
      "provider": "elevenlabs",
      "user_input_audio_format": "pcm_16000",
      "keywords": ["<string>"]
    },
    "turn": {
      "turn_timeout": 123
    },
    "tts": {
      "model_id": "eleven_turbo_v2",
      "voice_id": "<string>",
      "agent_output_audio_format": "pcm_16000",
      "optimize_streaming_latency": 0,
      "stability": 123,
      "similarity_boost": 123
    },
    "conversation": {
      "max_duration_seconds": 123,
      "client_events": ["conversation_initiation_metadata"]
    }
  },
  "platform_settings": {
    "auth": {
      "enable_auth": true
    },
    "evaluation": {
      "criteria": [
        {
          "id": "<string>",
          "name": "<string>",
          "type": "prompt",
          "conversation_goal_prompt": "<string>"
        }
      ]
    },
    "widget": {
      "variant": "compact",
      "avatar": {
        "type": "orb",
        "color_1": "<string>",
        "color_2": "<string>"
      },
      "custom_avatar_path": "<string>",
      "bg_color": "<string>",
      "text_color": "<string>",
      "btn_color": "<string>",
      "btn_text_color": "<string>",
      "border_color": "<string>",
      "focus_color": "<string>",
      "border_radius": 123,
      "btn_radius": 123,
      "action_text": "<string>",
      "start_call_text": "<string>",
      "end_call_text": "<string>",
      "expand_text": "<string>",
      "listening_text": "<string>",
      "speaking_text": "<string>"
    },
    "data_collection": {}
  },
  "name": "<string>"
}

For setting overrides, you can use the "Agent Conversation Overrides" feature to customize the agent's behavior for specific conversations. This allows you to adjust the prompt and first_message dynamically without creating new agents.

woven burrow
#

i want to enable overrides for these parameters
Agent language

First message

System prompt

Voice

orchid stirrupBOT
#
AI-generated Answer for fyro4966

You can enable overrides for various parameters when creating or updating an agent using the API. Here's how you can set overrides for the agent language, first message, system prompt, and voice:

  1. Agent Language and System Prompt: You can set the system prompt when creating or updating an agent. This allows you to define the context for the agent. Use the prompt field to specify the system prompt.

  2. First Message: You can customize the first message by setting the first_message parameter. This allows you to personalize the initial interaction with the user.

  3. Voice: You can override the voice by specifying the voiceId in the tts settings.

Here's an example of how you might configure these overrides:

const conversation = await Conversation.startSession({
  ...
  overrides: {
    agent: {
      prompt: {
        prompt: `The customer's bank account balance is ${customer_balance}. They are based in ${customer_location}.`
      },
      first_message: `Hi ${customer_name}, how can I help you today?`,
    },
    tts: {
      voiceId: "" // override the voice id.
    }
  },
  ...
});

This setup allows you to create a single agent and customize it for each conversation.

woven burrow
#

but the overrides need to be enabled in the agent in order to override them through the conversation right ?

orchid stirrupBOT
#
AI-generated Answer for fyro4966

Yes, you can enable overrides for parameters like the agent language, first message, system prompt, and voice when setting up your conversational agent. This allows you to customize the agent's behavior for each conversation without creating new agents. You can define these overrides in the configuration when starting a session. Here's an example of how you might set this up:

const conversation = await Conversation.startSession({
  ...
  overrides: {
    agent: {
      prompt: {
        prompt: `The customer's bank account balance is ${customer_balance}. They are based in ${customer_location}.`
      },
      first_message: `Hi ${customer_name}, how can I help you today?`,
    },
    tts: {
      voiceId: "" // override the voice id.
    }
  },
  ...
});

Make sure your configuration structure matches the expected format and that all required fields are present. This setup will allow you to tailor the agent's responses dynamically based on the conversation context.

woven burrow
#

can I enable overrides for parameters like the agent language, first message, system prompt, and voice through ther api ?

orchid stirrupBOT
#
AI-generated Answer for fyro4966

Yes, you can enable overrides for parameters like the agent language, first message, system prompt, and voice through the API. When creating or updating an agent, you can set these parameters in the overrides section. Here's an example of how you might configure these overrides:

const conversation = await Conversation.startSession({
  ...
  overrides: {
    agent: {
      prompt: {
        prompt: `The customer's bank account balance is ${customer_balance}. They are based in ${customer_location}.`
      },
      first_message: `Hi ${customer_name}, how can I help you today?`,
    },
    tts: {
      voiceId: "" // override the voice id.
    }
  },
  ...
});

This allows you to customize the agent for each conversation without creating new agents.

woven burrow
#

you're dumb

orchid stirrupBOT
#
AI-generated Answer for fyro4966

To enable overrides for parameters like agent language, first message, system prompt, and voice, you can use the API to configure these settings. When starting a conversation, you can specify these overrides in the overrides object. Here's an example in JavaScript:

const conversation = await Conversation.startSession({
  ...
  overrides: {
    agent: {
      prompt: {
        prompt: `The customer's bank account balance is ${customer_balance}. They are based in ${customer_location}.`
      },
      first_message: `Hi ${customer_name}, how can I help you today?`,
    },
    tts: {
      voiceId: "" // override the voice id.
    }
  },
  ...
});

This allows you to customize the agent for each conversation without creating new agents.

woven burrow
#

i need to enable them when creating the agent first