BedrockAgent
BedrockAgent extends AgentBase
to use Amazon Bedrock’s voice-to-voice model as the AI backend. It generates SWML
with the amazon_bedrock verb instead of ai, while maintaining full
compatibility with all standard agent features: prompts (text and POM), skills,
SWAIG functions, post-prompt, and dynamic configuration.
Extends AgentBase — inherits
all parent properties and methods.
BedrockAgent generates SWML with the amazon_bedrock verb
instead of ai. See the SWML bedrock reference for the
full specification.
Properties
name
Agent name.
route
HTTP route for the agent endpoint.
system_prompt
Initial system prompt. Can be overridden later with set_prompt_text().
voice_id
Bedrock voice identifier (e.g., "matthew", "joanna").
temperature
Generation temperature. Range: 0 to 1.
top_p
Nucleus sampling parameter. Range: 0 to 1.
max_tokens
Maximum tokens to generate per response.
**kwargs
Additional arguments passed to the AgentBase constructor (e.g., host,
port).
Methods
Overridden behavior
BedrockAgent overrides several AgentBase methods to adapt for the Bedrock voice-to-voice model:
Parameters specific to text-based LLMs (barge_confidence, presence_penalty,
frequency_penalty) are automatically filtered out during SWML rendering and
have no effect on Bedrock agents.
Prompt methods (set_prompt_text(), set_prompt_pom(), prompt_add_section(),
etc.) work normally. The prompt structure is built the same way as AgentBase
and then included in the amazon_bedrock verb.