Amazon Bedrock post-prompt callback
Amazon Bedrock post-prompt callback
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.
The content type of the request body. Always text/json.
How the body is delivered. Always agent.summary for the end-of-call report.
The kind of conversation the agent ran. Always voice.
The name of your Bedrock application. Defaults to bedrock.
The ID of the AI session on the call. Matches call_id for Bedrock agents.
What the request is asking of you. Always post_conversation for the end-of-call report.
The conversation. Each entry carries a role of system, user, or assistant and its
content.
A copy of call_log. Bedrock agents do not keep a separate unfiltered log.
The agent’s answer to your post_prompt.
The session’s final global_data. An empty object when you seeded none.
Always an empty array. Bedrock agents do not report a tool-call log.
The agent’s answer to your post_prompt, as plain text.
When the call was answered, as a Unix timestamp in microseconds. 0 when it never was.
When the call ended, as a Unix timestamp in microseconds. 0 while the call is still up.
Per-response performance metrics, one entry per generated reply. Included once the agent has any.
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.
A copy of total_input_tokens. Included once the agent has stopped.
total_input_tokens divided by total_minutes. Included once the agent has stopped.
A copy of total_output_tokens. Included once the agent has stopped.
total_output_tokens divided by total_minutes. Included once the agent has stopped.
Characters sent to text-to-speech. Included once the agent has stopped.
total_tts_chars divided by total_minutes. Included once the agent has stopped.
Always 1. Bedrock agents do not vary the factor. Included once the agent has stopped.