> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/api-reference/readme/platform/prompt-logs.md).

# Prompt Logs

## List prompt logs for a workspace

> Lists the prompts the agent rendered (full system prompt, conversation history, tool catalog, LLM model, and response) for auditing and debugging. It's an analytics read: typical latency is 1-5s, with a 15s ceiling on a cold start.\
> \
> \*\*Conversation filter\*\*: pass \`\`conversation\_id\`\`, the id \`\`GET /conversations\`\` returns for a text conversation or a voice call. It resolves through the conversation's record; an older call with no conversation record answers 404, so filter it by \`\`call\_sid\`\`. \`\`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.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"tags":[{"name":"Prompt Logs"}],"servers":[{"url":"https://platform.api-us.concurrence.com"},{"url":"https://platform.api-eu.concurrence.com","description":"Production, European Union"},{"url":"https://platform.api-au.concurrence.com","description":"Production, Australia"},{"url":"https://platform.api-ca.concurrence.com","description":"Production, Canada"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"PromptLogListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PromptLogEntry"},"type":"array","title":"Items"},"count":{"type":"integer","minimum":0,"title":"Count"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset","description":"Pass back as offset to fetch the next page; null when has_more is false"},"applied_time_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Applied Time Window Days","description":"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."},"resolved_call_sid":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Resolved Call Sid","description":"When ``conversation_id`` was supplied, the ``call_sid`` it resolved to: the call SID of a voice call, the conversation's id for a text conversation. Useful for callers that drill into per-call surfaces afterward. Null when the caller filtered by ``call_sid`` directly, did not filter by conversation, or named a voice call with no recorded call SID."},"resolved_conversation_kind":{"anyOf":[{"type":"string","enum":["call","conversation"]},{"type":"null"}],"title":"Resolved Conversation Kind","description":"What ``conversation_id`` named when it was supplied: ``call`` for a voice call, ``conversation`` for a text conversation (web, sms, whatsapp, email). Null otherwise."}},"type":"object","required":["items","count","has_more"],"title":"PromptLogListResponse"},"PromptLogEntry":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"call_sid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Sid"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At"},"ingested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ingested At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"prompt_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Type"},"turn_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turn Index","description":"Counts the prompts one engine instance rendered: every engage render (a user turn, each tool round, a check-in) adds one, and it starts again at 0 when the engine is rebuilt, which on text is every request. It repeats within a conversation and names no turn: join on ``turn_id`` or ``engine_turn_id``."},"turn_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Turn Id","description":"The user exchange this prompt was rendered for: the same ``turn_id`` the conversation's turns carry (``GET /conversations/{conversation_id}/turns``). Every render in one exchange, tool rounds included, shares it. Null before the conversation's first user message, for a session with no stored turns, and on logs written before this field."},"engine_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Turn Id","description":"The engine turn that rendered this prompt (32 hex characters): the user turn, or one tool round within it, so each tool round's prompt has its own. Null on logs written before this field."},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"history":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"History"},"full_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Prompt"},"rendered_prompt_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rendered Prompt Hash"},"prompt_renderer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Renderer"},"llm_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Model"},"llm_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Response"},"state_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Name"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"tool_names":{"items":{"type":"string"},"type":"array","title":"Tool Names","description":"The tools the agent's state offered when the prompt rendered."},"has_tools":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Tools"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"data_parse_error":{"type":"boolean","title":"Data Parse Error","default":false}},"type":"object","required":["event_id","workspace_id"],"title":"PromptLogEntry","description":"One ``prompt_log`` event projection — full LLM input + output for a turn.\n\nUnbounded string fields (``system_prompt``, ``full_prompt``,\n``llm_response``) reflect the producer's payload as-is — typically\n1-50 KB each, occasionally larger for long histories. SDK consumers\nshould not assume a max length."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/prompt-logs":{"get":{"tags":["Prompt Logs"],"summary":"List prompt logs for a workspace","description":"Lists the prompts the agent rendered (full system prompt, conversation history, tool catalog, LLM model, and response) for auditing and debugging. It's an analytics read: typical latency is 1-5s, with a 15s ceiling on a cold start.\n\n**Conversation filter**: pass ``conversation_id``, the id ``GET /conversations`` returns for a text conversation or a voice call. It resolves through the conversation's record; an older call with no conversation record answers 404, so filter it by ``call_sid``. ``call_sid`` is the legacy direct-SID filter (Twilio CA-SID for voice, session_id UUID otherwise) and is mutually exclusive with ``conversation_id``.\n\n**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``.\n\n**Pagination**: peek-ahead — ``has_more`` is true when more rows exist; use ``next_offset`` to fetch the next page.\n\n**Auth**: `Audit:View` permission required. Reads are audit-logged (``prompt_logs.queried``); responses can include PHI from prompt history.","operationId":"list-prompt-logs","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The ``id`` ``GET /conversations`` returns for a text conversation or a voice call. It resolves through the conversation's record: a text conversation's prompt logs carry its id as their ``call_sid``, and a voice call's carry the call SID on its record. An older call with no conversation record answers 404, so filter its logs by ``call_sid``. Mutually exclusive with the ``call_sid`` query parameter.","title":"Conversation Id"},"description":"The ``id`` ``GET /conversations`` returns for a text conversation or a voice call. It resolves through the conversation's record: a text conversation's prompt logs carry its id as their ``call_sid``, and a voice call's carry the call SID on its record. An older call with no conversation record answers 404, so filter its logs by ``call_sid``. Mutually exclusive with the ``call_sid`` query parameter."},{"name":"call_sid","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"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``.","title":"Call Sid"},"description":"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``."},{"name":"prompt_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Filter by prompt_type (e.g. engage_user, navigation, tool)","title":"Prompt Type"},"description":"Filter by prompt_type (e.g. engage_user, navigation, tool)"},{"name":"state_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Filter by HSM state_name at render time","title":"State Name"},"description":"Filter by HSM state_name at render time"},{"name":"from_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive lower bound on effective_at","title":"From Ts"},"description":"Inclusive lower bound on effective_at"},{"name":"to_ts","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Exclusive upper bound on effective_at","title":"To Ts"},"description":"Exclusive upper bound on effective_at"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max rows to return (default 20, max 200)","default":20,"title":"Limit"},"description":"Max rows to return (default 20, max 200)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"description":"Offset for pagination (max 10000)","default":0,"title":"Offset"},"description":"Offset for pagination (max 10000)"}],"responses":{"200":{"description":"Prompt log entries (newest first)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptLogListResponse"}}}},"400":{"description":"Mutually exclusive filters supplied"},"403":{"description":"Caller is not admin/owner"},"404":{"description":"conversation_id does not match any conversation in this workspace"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Prompt logs couldn't be read right now. Retry later."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/api-reference/readme/platform/prompt-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
