AI post-prompt callback
Sent to your ai.post_prompt_url when the AI session ends. It carries the agent's answer to your post_prompt alongside the full record of the call: the conversation, the tool calls, the timings, and the token counts. This is the one report you get per call, so store the body verbatim and extract only the fields you query. Nothing you return in the response is read.
Read action first. It is post_conversation on the end-of-call report described here. The same URL also receives fetch_conversation when the agent starts with a stored conversation (save_conversation with a conversation_id), asking your endpoint to return that conversation; that request carries the call and session fields but none of the summary fields. Answer it with the stored conversation_summary.
The conversation appears three times. call_log is the filtered view, with interrupted segments consolidated. raw_call_log is unfiltered and append-only, and is the only place barge-in detail survives. call_timeline is a flat stream of typed events aligned to raw_call_log.
amazon_bedrock agents send a different report. Write your handler against the Bedrock post-prompt callback instead.
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": "ai",
"ai_session_id": "a0d4e6e5-5d07-413d-9668-55542992eec0",
"ai_id_tag": "d742c5d1d969d9fdbbd9bd1c52499f2d",
"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_timeline": [
{
"type": "ai_response",
"ts": 1694541297950440
}
],
"hard_timeout": true,
"call_start_date": 1694541295773508,
"call_answer_date": 1694541296799504,
"call_end_date": 1694541335435503,
"ai_start_date": 1694541297950440,
"call_ended_by": "assistant",
"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
}
],
"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",
"pickup_address": "123 Main St, Springfield"
},
"swaig_log": [
{
"command_name": "get_weather",
"command_arg": "{\"city\":\"San Francisco\"}",
"epoch_time": 1694541334,
"native": true,
"url": "https://example.com/tools/get_weather",
"mcp_error": true
}
],
"total_minutes": 3,
"total_input_tokens": 5627,
"total_output_tokens": 119,
"total_wire_input_tokens": 5627,
"total_wire_input_tokens_per_minute": 1875.67,
"total_wire_output_tokens": 119,
"total_wire_output_tokens_per_minute": 39.67,
"total_tts_chars": 842,
"total_tts_chars_per_min": 280.67,
"total_asr_minutes": 2.41,
"total_asr_cost_factor": 0.8,
"conversation_summary": "Caller booked a ride from 123 Main St to the airport for 6pm."
}Response
Webhook received