Skip to navigation

Amazon Bedrock post-prompt callback

View as MarkdownOpen in Claude

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.

Payload

The payload of this webhook request is an object.
content_typestringRequired

The content type of the request body. Always text/json.

content_dispositionstringRequired

How the body is delivered. Always agent.summary for the end-of-call report.

conversation_typestringRequired

The kind of conversation the agent ran. Always voice.

call_idstringRequired
The ID of the call.
app_namestringRequired

The name of your Bedrock application. Defaults to bedrock.

ai_session_idstringRequired

The ID of the AI session on the call. Matches call_id for Bedrock agents.

actionstringRequired

What the request is asking of you. Always post_conversation for the end-of-call report.

call_loglist of objectsRequired

The conversation. Each entry carries a role of system, user, or assistant and its content.

raw_call_loglist of objectsRequired

A copy of call_log. Bedrock agents do not keep a separate unfiltered log.

post_prompt_dataobjectRequired

The agent’s answer to your post_prompt.

global_dataobjectRequired

The session’s final global_data. An empty object when you seeded none.

swaig_loglist of objectsRequired

Always an empty array. Bedrock agents do not report a tool-call log.

conversation_summarystringRequired

The agent’s answer to your post_prompt, as plain text.

project_idstringOptional
Your project ID, when available.
space_idstringOptional
Your Space ID, when available.
conversation_idstringOptional
The conversation ID, when the agent was configured with one.
call_start_datelongOptional
When the call was created, as a Unix timestamp in microseconds.
call_answer_datelongOptional

When the call was answered, as a Unix timestamp in microseconds. 0 when it never was.

call_end_datelongOptional

When the call ended, as a Unix timestamp in microseconds. 0 while the call is still up.

ai_start_datelongOptional
When the agent started, as a Unix timestamp in microseconds.
ai_end_datelongOptional
When the agent stopped, as a Unix timestamp in microseconds. Omitted while it is still running.
caller_id_namestringOptional
The caller's name, when available.
caller_id_numberstringOptional
The caller's number, when available.
timeslist of objectsOptional

Per-response performance metrics, one entry per generated reply. Included once the agent has any.

total_minutesdoubleOptional

The number of billable minutes, with a minimum of one. Fractional durations are kept as they are; only a call under a minute is raised to 1. Included once the agent has stopped.

total_input_tokensintegerOptional
Input tokens the session consumed. Included once the agent has stopped.
total_output_tokensintegerOptional
Output tokens the session produced. Included once the agent has stopped.
total_wire_input_tokensintegerOptional

A copy of total_input_tokens. Included once the agent has stopped.

total_wire_input_tokens_per_minutedoubleOptional

total_input_tokens divided by total_minutes. Included once the agent has stopped.

total_wire_output_tokensintegerOptional

A copy of total_output_tokens. Included once the agent has stopped.

total_wire_output_tokens_per_minutedoubleOptional

total_output_tokens divided by total_minutes. Included once the agent has stopped.

total_tts_charsintegerOptional

Characters sent to text-to-speech. Included once the agent has stopped.

total_tts_chars_per_mindoubleOptional

total_tts_chars divided by total_minutes. Included once the agent has stopped.

total_asr_minutesdoubleOptional
Minutes of audio sent to speech recognition. Included once the agent has stopped.
total_asr_cost_factordoubleOptional

Always 1. Bedrock agents do not vary the factor. Included once the agent has stopped.

SWMLVarsobjectOptional
SWML variables for the call. Included when the call carries SWML state.
SWMLCallobjectOptional
SWML call state. Included when the call carries SWML state.

Response

200
Webhook received