RelayCall

amazon_bedrock

View as MarkdownOpen in Claude

Connect the call to an Amazon Bedrock AI agent. Similar to ai() but uses Amazon Bedrock as the LLM backend.

Parameters

prompt
Any | NoneDefaults to None

The prompt configuration for the Bedrock agent.

SWAIG
dict | NoneDefaults to None

SWAIG configuration for tool/function definitions.

ai_params
dict | NoneDefaults to None

AI parameters for the Bedrock session.

global_data
dict | NoneDefaults to None

Data accessible to the AI and SWAIG functions.

post_prompt
dict | NoneDefaults to None

Post-prompt configuration.

post_prompt_url
str | NoneDefaults to None

URL to receive the post-prompt result.

Returns

dict — Server response confirming the Bedrock session.

Example

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
# Start an Amazon Bedrock AI agent
result = await call.amazon_bedrock(
prompt={"text": "You are a helpful assistant."},
ai_params={"barge_confidence": 0.02},
)
client.run()