Skip to content

Inspect the audit worklog

The worklog is the primary source of evidence for what an agent did and why. This guide shows how to query it and what to look for when investigating a specific interaction.

The worklog is indexed by the same dimensions used across observability signals:

  • task_id — a single inference run.
  • session_id — a full conversation.
  • assistant_id — the agent.
  • agentspace_id — the organizational boundary.
  • user_id — the caller or channel sender.
  • Time range.

Start with the task_id when you need the complete story of one request.

GET /worklog/ returns a paginated list of inference runs. Use query parameters to narrow results:

ParameterUse
assistant_idFilter to one agent
session_idFilter to one conversation
user_idFilter to one caller
final_statussuccess, error, or running (matches final_status IS NULL)
include_contentInclude truncated query, result, and error previews
limit / offsetPaginate through results
Terminal window
curl "http://localhost:8080/worklog/?assistant_id=support-bot&final_status=error&include_content=true&limit=20" \
-H "Authorization: Bearer $API_TOKEN"

GET /worklog/sessions returns conversation-level aggregates. It is useful for dashboards and for grouping related tasks by session_id.

Terminal window
curl "http://localhost:8080/worklog/sessions?user_id=user-42&limit=10" \
-H "Authorization: Bearer $API_TOKEN"

GET /worklog/activity returns run counts aggregated per hour or day. Use it for usage dashboards and capacity planning.

Terminal window
curl "http://localhost:8080/worklog/activity?assistant_id=support-bot&bucket=hour" \
-H "Authorization: Bearer $API_TOKEN"
  1. Find the task identifier. It is returned to the caller when an inference starts and appears in traces and logs.

  2. Query the worklog by task_id using the runtime API, database query, or your observability platform.

  3. Walk through events in order. Each command and response shows one step of the execution loop.

  4. Look for key events: shield verdicts, tool calls, LLM outputs, approval requests, and memory flushes.

  5. Correlate with traces and logs using the same identifiers when you need timing or infrastructure context.

QuestionWhere in the worklog
What did the user ask?The incoming request event.
Did a shield block or flag the request?Shield inference response events.
Which tools were called and with what inputs?Tool execution commands and responses.
What did the LLM return at each step?Response inference responses.
Was an approval requested?Human approval required and response events.
How did memory affect the answer?Context flush and persistence events.

Worklog events carry a snapshot of the agentspace registry. This lets runtime stages that build or resolve models outside the original dispatched event — such as deferred shield evaluation or background skill activation — resolve model_ref references against the same agentspace catalogue the task started with, instead of whatever registry state happens to be current.

When investigating a task, correlate model_ref resolution events with the registry snapshot recorded in the worklog to confirm the correct model registration and version were used.

For compliance, you may need to export worklog data periodically. Options include:

  • Database backups and point-in-time recovery.
  • Scheduled exports to object storage.
  • Streaming changes to a SIEM or data warehouse.

Set retention and encryption policies that match your regulatory requirements.