Prompt Logs
Query LLM prompt logs for auditing and debugging agent conversations across a workspace.
The Prompt Logs endpoint lets you retrieve captured LLM inputs and outputs from agent conversations, including available system prompts, conversation history, tool catalogs, model selection, and responses. Coverage and populated fields vary by prompt type and logging path. This is useful for auditing agent behavior, debugging unexpected responses, and understanding how context flows through multi-turn conversations.
List Prompt Logs
Lists prompt_log events emitted by agent-engine — full system prompt, conversation history, tool catalog, LLM model, and response — for auditing and debugging. Reads the Delta world_events ledger via Databricks SQL; typical latency is 1-5s with a 15s ceiling on cold-start.
Conversation filter: pass conversation_id for the canonical mental model. Text conversations resolve from world.conversations; voice/call IDs resolve through the projected conversation entity. call_sid is the legacy direct-SID filter (Twilio CA-SID for voice, session_id UUID otherwise) and is mutually exclusive with conversation_id.
Other filters: prompt_type, state_name, from_ts, to_ts. When no selectivity-bearing filter (conversation_id / call_sid / time range) is supplied, the query is auto-capped to the last 7 days; the applied window is reported in applied_time_window_days.
Pagination: peek-ahead — has_more is true when more rows exist; use next_offset to fetch the next page.
Auth: Audit:View permission required. Reads are audit-logged (prompt_logs.queried); responses can include PHI from prompt history.
API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.
Conversation entity UUID (canonical identifier across all modalities — voice, text/web, sms, sim). Resolves text conversations through the durable world.conversations row, then falls back to the voice/call entity projection. Mutually exclusive with the call_sid query parameter.
Direct conversation identifier as stored on the prompt-log event: Twilio CA-SID for voice calls, session_id UUID for text/sim sessions. Most callers should use conversation_id instead — this is kept for legacy callers and external systems that hold the SID directly. Mutually exclusive with conversation_id.
Filter by prompt_type (e.g. engage_user, navigation, tool)
Filter by HSM state_name at render time
Inclusive lower bound on effective_at
Exclusive upper bound on effective_at
Max rows to return (default 20, max 200)
20Offset for pagination (max 10000)
0Prompt log entries (newest first)
Pass back as offset to fetch the next page; null when has_more is false
Auto-applied time bound (in days) when no call_sid/from_ts/to_ts was passed. Null when the caller supplied an explicit selectivity-bearing filter.
When conversation_id was supplied, this is the underlying call_sid that the lookup resolved to. Useful for callers that want to drill into per-call surfaces afterward without re-querying world.entities_synced. Null when the caller filtered by call_sid directly or did not filter by conversation.
entity_type of the conversation entity when conversation_id was supplied (call for voice/sim, conversation for text/sms/whatsapp/email). Null otherwise.
Mutually exclusive filters supplied
Caller is not admin/owner
conversation_id does not match any conversation in this workspace
Validation Error
Raw world event reads disabled or warehouse unavailable
GET /v1/{workspace_id}/prompt-logs HTTP/1.1
Host: platform.api-us.concurrence.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"items": [
{
"event_id": "123e4567-e89b-12d3-a456-426614174000",
"call_sid": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"effective_at": "2026-01-01T00:00:00.000Z",
"ingested_at": "2026-01-01T00:00:00.000Z",
"source": "text",
"source_system": "text",
"prompt_type": "text",
"turn_index": 1,
"system_prompt": "text",
"history": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"full_prompt": "text",
"llm_model": "text",
"llm_response": "text",
"state_name": "text",
"action": "text",
"tool_names": [
"text"
],
"has_tools": true,
"service_id": "123e4567-e89b-12d3-a456-426614174000",
"session_id": "text",
"data_parse_error": false
}
],
"count": 1,
"has_more": true,
"next_offset": 1,
"applied_time_window_days": 1,
"resolved_call_sid": "text",
"resolved_conversation_kind": "call"
}Returns available prompt log entries for the workspace, newest first.
Pagination
The endpoint uses peek-ahead pagination. When has_more is true, pass the value of next_offset as the offset parameter on the next request to retrieve the next page.
Error Responses
400 Bad Request
Both conversation_id and call_sid were supplied (they are mutually exclusive)
403 Forbidden
Caller does not have admin or owner role
404 Not Found
conversation_id does not match a conversation in this workspace
503 Service Unavailable
Prompt log data source is unavailable
Example
Last updated
Was this helpful?

