For the complete documentation index, see llms.txt. This page is also available as Markdown.

Prompt Logs

List prompt logs for a workspace

get

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.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
conversation_idstring · uuid · nullableOptional

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.

call_sidstring · max: 64 · nullableOptional

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.

prompt_typestring · max: 64 · nullableOptional

Filter by prompt_type (e.g. engage_user, navigation, tool)

state_namestring · max: 128 · nullableOptional

Filter by HSM state_name at render time

from_tsstring · date-time · nullableOptional

Inclusive lower bound on effective_at

to_tsstring · date-time · nullableOptional

Exclusive upper bound on effective_at

limitinteger · min: 1 · max: 200Optional

Max rows to return (default 20, max 200)

Default: 20
offsetinteger · max: 10000Optional

Offset for pagination (max 10000)

Default: 0
Responses
200

Prompt log entries (newest first)

application/json
countintegerRequired
has_morebooleanRequired
next_offsetinteger · nullableOptional

Pass back as offset to fetch the next page; null when has_more is false

applied_time_window_daysinteger · nullableOptional

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_sidstring · max: 64 · nullableOptional

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.

resolved_conversation_kindstring · enum · nullableOptional

entity_type of the conversation entity when conversation_id was supplied (call for voice/sim, conversation for text/sms/whatsapp/email). Null otherwise.

Possible values:
get/v1/{workspace_id}/prompt-logs
GET /v1/{workspace_id}/prompt-logs HTTP/1.1
Host: api.platform.amigo.ai
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"
}

Last updated

Was this helpful?