Debug Worklogs API

The Debug Worklogs API provides detailed debug log data for workflow runs, including AI Employee configuration snapshots, workflow definitions, and per-action show-work logs. Access is filtered based on the requesting user's permission level.

GetWorkflowLevelDebugLog

Retrieve comprehensive debug data for an entire workflow run.

PropertyValue
URL/persona.v1.DebugLogService/GetWorkflowLevelDebugLog
HTTP MethodPOST
ProtocolgRPC-Web over HTTP

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token
Content-TypestringYesapplication/grpc-web+proto
x-grpc-webstringYes1

Request

FieldTypeRequiredDescription
workflow_run_idstringYesUUID of the workflow run to debug

Response

FieldTypeDescription
persona_configPersonaConfigForShowWorkAI Employee configuration snapshot (Debug users only)
action_typesmap<string, ActionType>Map of action names to their type snapshots
workflow_definitionWorkflowDefWorkflow definition snapshot at time of execution (Debug users only)
show_work_logsmap<string, ShowWorkLog>Map of action instance names to their show-work logs
is_ema_userboolWhether the requester is an Ema user

Example Response

{
 "persona_config": {
 "id": "persona-uuid",
 "name": "Support Agent",
 "description": "Customer support persona",
 "status": "ACTIVE",
 "version": 1,
 "widgets": [],
 "display_settings": {},
 "project_settings": {}
 },
 "action_types": {
 "search@v2": {
 "type_name": {},
 "display_name": "Knowledge Search",
 "description": "Searches the knowledge base"
 }
 },
 "workflow_definition": {
 "workflow_name": {},
 "actions": [],
 "display_name": "Support Workflow"
 },
 "show_work_logs": {
 "search_step": {
 "action_title": "Knowledge Search",
 "llm_call_count": 2,
 "llm_cost_usd": 0.05,
 "action_run_status": "ACTION_RUN_STATUS_SUCCESS"
 }
 },
 "is_ema_user": false
}

Permission Levels

The API filters response data based on the requesting user's access level:

User TypeSees
Debug access userEverything
Standard userAction names and step names only

Data Structures

ShowWorkLog

Per-action debug information for a workflow run.

FieldTypeDescription
messagesrepeated StructuredLogMessageLog messages with substitutable variables
llm_call_countint32Number of LLM calls made
action_titlestringDisplay title of the action
llm_callsrepeated LlmCallEntryDetailed LLM call entries
llm_cost_usdfloatTotal LLM cost in USD
llm_latency_msfloatTotal LLM latency in milliseconds
inputsShowWorkInputsDetailed input information
outputsShowWorkOutputsDetailed output information
hitl_roundsrepeated HitlRoundHuman-in-the-loop interaction rounds
work_logsrepeated StepSteps executed in the action
workflow_run_idstringUUID of the workflow run
action_run_statusActionRunStatusStatus of the action run
embedded_persona_run_infoEmbeddedPersonaRunInfoInfo about embedded AI Employee runs

ActionRunStatus Enum

ValueIntegerDescription
ACTION_RUN_STATUS_UNSPECIFIED0Status not specified
ACTION_RUN_STATUS_SUCCESS1Action ran successfully
ACTION_RUN_STATUS_ERRORED2Action encountered an error
ACTION_RUN_STATUS_WARNING3Action completed with warnings
ACTION_RUN_STATUS_NOT_RUN4Action was not executed
ACTION_RUN_STATUS_PAUSED5Action execution was paused

StructuredLogMessage

FieldTypeDescription
message_templatestringTemplate with {placeholder} variables
substituted_fieldsmap<string, string>Placeholder-to-value mappings
headingstringOptional heading
log_levelLogLevelMessage severity level
error_infoErrorInfoError details (if applicable)

LlmCallEntry

FieldTypeDescription
metricsResponseMetricsLLM response metrics
fusion_usedboolWhether Fusion selected a model
successboolWhether the LLM call succeeded
error_messagestringError message if failed
timestamp_msint64Timestamp in milliseconds
llm_cost_final_choicefloatCost of the final model choice in USD
promptPromptDataPrompt data (super-admin only)
headingstringDisplay heading for the call

PromptData

FieldTypeDescription
system_promptstringSystem prompt text
user_promptstringUser prompt text
responsestringLLM response text

HitlRound

FieldTypeDescription
message_typeMessageTypeType of HITL message (Form, Button, TextField, Feedback)
hitl_requestoneofMessage shown to the human
hitl_responseoneofResponse from the human
outcomestringOutcome status of the round

ShowWorkInputs / ShowWorkOutputs

FieldTypeDescription
entriesrepeated InputEntry/OutputEntryList of input/output entries

InputEntry

FieldTypeDescription
namestringParameter name
valueValueThe actual value
typeResolvedTypeData type
source_agent_namestringName of the source action

OutputEntry

FieldTypeDescription
namestringParameter name
valueValueThe actual value
typeResolvedTypeData type
published_as_chat_responseboolWhether published to the end user

ErrorInfo

FieldTypeDescription
namestringError name
internal_messagestringInternal error message (not shown to end users)
external_messagestringError message shown to end users

Step

FieldTypeDescription
namestringStep name
messagesrepeated StructuredLogMessageLog messages for the step
llm_callsrepeated LlmCallEntryLLM calls in the step

Error Responses

HTTP StatusgRPC CodeDescription
400INVALID_ARGUMENTworkflow_run_id is required or invalid UUID
403PERMISSION_DENIEDUser lacks permission for this AI Employee
404NOT_FOUNDWorkflow run not found or tenant mismatch
500INTERNALInternal server error

Last updated: Jul 3, 2026