AI Webhooks
Amazon Bedrock post-prompt callback
Sent to your amazon_bedrock.post_prompt_url when the agent's session ends, carrying its answer to your post_prompt alongside the record of the call. Nothing you return in the response is read.
Bedrock agents send a different report from ai agents. There is no call_timeline, previous_contexts, hard_timeout, call_ended_by, or ai_id_tag; raw_call_log is a copy of call_log rather than a separate unfiltered view; swaig_log is always empty; conversation_summary is always present; and the total_* fields arrive without your having to enable accounting. post_prompt_url also takes no separate credentials here — put them in the URL as username:password@url. Write your handler against this payload, not the AI post-prompt callback.
postWebhookbedrockPostPromptCallback
Payload
Example payload
{
"project_id": "4d0d6f16-5881-4fcc-92a4-02c51a91954d",
"space_id": "451ed9ff-e568-4222-8af9-4f9ab7428d09",
"content_type": "text/json",
"content_disposition": "agent.summary",
"conversation_type": "voice",
"call_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
"app_name": "bedrock",
"ai_session_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
"conversation_id": "support-thread-4821",
"action": "post_conversation",
"call_log": [
{
"role": "system",
"content": "You dispatch taxis."
},
{
"role": "user",
"content": "I need a ride to the airport."
}
],
"raw_call_log": [
{
"role": "assistant",
"content": "Your ride is booked for 6pm.",
"timestamp": 1694541297950440
}
],
"call_start_date": 1694541295773508,
"call_answer_date": 1694541296799504,
"call_end_date": 1694541335435503,
"ai_start_date": 1694541297950440,
"ai_end_date": 1694541335425164,
"caller_id_name": "Jane Doe",
"caller_id_number": "+15555550100",
"times": [
{
"response": "Your ride is booked for 6pm.",
"response_word_count": 6,
"answer_time": 1.42,
"token_time": 0.31,
"tokens": 53,
"avg_tps": 37.3,
"tps": 41.2
}
],
"total_minutes": 3.14,
"total_input_tokens": 5627,
"total_output_tokens": 119,
"total_wire_input_tokens": 5627,
"total_wire_input_tokens_per_minute": 1792.04,
"total_wire_output_tokens": 119,
"total_wire_output_tokens_per_minute": 37.9,
"total_tts_chars": 842,
"total_tts_chars_per_min": 268.15,
"total_asr_minutes": 2.41,
"total_asr_cost_factor": 1,
"post_prompt_data": {
"parsed": [
{
"intent": "book_ride",
"resolved": true
}
],
"raw": "{\"intent\":\"book_ride\",\"resolved\":true}",
"substituted": "Caller booked a ride to the airport."
},
"global_data": {
"customer_tier": "premium"
},
"swaig_log": [],
"conversation_summary": "Caller booked a ride from 123 Main St to the airport for 6pm."
}Response
Webhook received