Prompt Logs
Query LLM prompt logs for auditing and debugging agent conversations across a workspace.
The Prompt Logs endpoint lets you retrieve the full input and output of every LLM call made during agent conversations - system prompts, conversation history, tool catalogs, model selection, and responses. This is useful for auditing agent behavior, debugging unexpected responses, and understanding how context flows through multi-turn conversations.
Access restriction: Prompt log access requires an API key with the admin or owner role. Prompt logs contain full conversation history and tool I/O, which may include PHI. All reads are audit-logged.
List Prompt Logs
GET /v1/{workspace_id}/prompt-logs
Returns prompt log entries for the workspace, newest first. Typical response latency is 1-5 seconds.
Query Parameters
call_sid
string
No
Filter to a single call (max 64 characters)
prompt_type
string
No
Filter by prompt type, e.g. engage_user, navigation, tool (max 64 characters)
state_name
string
No
Filter by context graph state name at render time (max 128 characters)
from_ts
datetime
No
Inclusive lower bound on event timestamp
to_ts
datetime
No
Exclusive upper bound on event timestamp
limit
integer
No
Max rows to return (default 20, min 1, max 200)
offset
integer
No
Offset for pagination (default 0, max 10000)
Auto-applied time window: When no call_sid, from_ts, or to_ts filter is provided, the query is automatically capped to the last 7 days. The applied window is reported in the applied_time_window_days response field.
Response
items
array
List of prompt log entries
count
integer
Number of entries in this page
has_more
boolean
Whether more rows exist beyond this page
next_offset
integer or null
Pass back as offset to fetch the next page. Null when has_more is false
applied_time_window_days
integer or null
Auto-applied time bound (in days) when no explicit time or call filter was provided. Null when the caller supplied a selectivity-bearing filter
Prompt Log Entry
event_id
string
Unique event identifier
call_sid
string or null
Call or session identifier
workspace_id
string
Workspace identifier
effective_at
datetime or null
When the event occurred
ingested_at
datetime or null
When the event was ingested
source
string or null
Event source
source_system
string or null
Originating system
prompt_type
string or null
Type of prompt (e.g. engage_user, navigation, tool)
turn_index
integer or null
Turn number within the conversation
system_prompt
string or null
Full system prompt sent to the model
history
array or null
Conversation history as a list of role/content message objects
full_prompt
string or null
Complete assembled prompt
llm_model
string or null
Model identifier used for this call
llm_response
string or null
Raw model response
state_name
string or null
Context graph state at render time
action
string or null
Action being performed
tool_names
array
List of tool names available for this call
has_tools
boolean or null
Whether tools were available
service_id
string or null
Service identifier
session_id
string or null
Session identifier
data_parse_error
boolean
True when the underlying event data could not be fully parsed. Populated fields fall back to defaults
String fields like system_prompt, full_prompt, and llm_response reflect the actual LLM input/output and can be large (typically 1-50 KB each, occasionally larger for long conversation histories). Do not assume a max length.
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
403 Forbidden
Caller does not have admin or owner role
503 Service Unavailable
Prompt log data source is unavailable
Example
Last updated
Was this helpful?

