VoiceAgentDefinition Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The voice agent definition. Its configuration (model, instructions, audio, tools, and optional avatar) drives a
managed speech-to-speech experience. Establish realtime voice sessions through
GET /agents/{agent_name}/endpoint/protocols/voice. Every create or update produces a new immutable version.
public class VoiceAgentDefinition : Azure.AI.Projects.Agents.ProjectsAgentDefinition, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.VoiceAgentDefinition>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.VoiceAgentDefinition>
type VoiceAgentDefinition = class
inherit ProjectsAgentDefinition
interface IJsonModel<VoiceAgentDefinition>
interface IPersistableModel<VoiceAgentDefinition>
Public Class VoiceAgentDefinition
Inherits ProjectsAgentDefinition
Implements IJsonModel(Of VoiceAgentDefinition), IPersistableModel(Of VoiceAgentDefinition)
- Inheritance
- Implements
Constructors
| Name | Description |
|---|---|
| VoiceAgentDefinition() |
Initializes a new instance of VoiceAgentDefinition. |
Properties
| Name | Description |
|---|---|
| Audio |
The audio configuration, including input and output formats, voice, turn detection, noise reduction, and transcription. These values are session defaults; a client may override supported fields when connecting. |
| Avatar |
Optional avatar configuration. These values are session defaults and may be overridden when connecting. |
| ContentFilterConfiguration |
Configuration for Responsible AI (RAI) content filtering and safety features. (Inherited from ProjectsAgentDefinition) |
| ConversationEngine |
The engine that owns conversation handling for this voice agent. Exactly one of this property and the model-backed configuration ( |
| Greeting |
Optional session-start greeting. Template mode speaks exact rendered text; LLM-generated mode asks the session model to author the opening response and may use configured tools. |
| Include |
Additional fields to include in service outputs. |
| Instructions |
A system (or developer) message inserted into the model's context. Supports template substitution via |
| InterimResponse |
Interim-response settings for latency and tool execution. |
| MaxOutputTokens |
The maximum output-token count for one response. To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions). To assign an already formatted json string to this property use FromString(String). <remarks> Supported types:
Examples:
|
| Model |
The model to use for this agent. Required with |
| ModelType |
How the model backing this voice agent is served. Required with |
| OutputModalities |
The output modalities the agent produces. Defaults to |
| ParallelToolCalls |
Whether the model may call multiple tools in parallel. |
| Store |
Whether conversations with this agent are persisted. A single, all-or-nothing persistence switch that defaults to
|
| StructuredInputs |
Set of structured inputs that participate in prompt template substitution, rendered per session before the live session starts. |
| SubagentConfig |
Optional configuration for sibling Foundry text agents that this voice agent may consult as background specialists. |
| ToolChoice |
How the model chooses tools for generated responses. To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions). To assign an already formatted json string to this property use FromString(String). <remarks> Supported types:
Examples:
|
| Tools |
The tools the voice agent may use. Supported tool kinds are |