Skip to main content
Last updated on

Telemetry

The CrewAI SDK emits two kinds of data to OpenBox:

  • governed task boundary events
  • operational telemetry from started and completed hooks

Event Types

EventWhenLayer
WorkflowStartedfirst governed task per agent per kickoffsession open
WorkflowCompletedgoverned cleanup or kickoff-start drainsession close
ActivityStartedbefore each governed taskLayer 1
ActivityCompletedafter each governed taskLayer 2
hook payloadHTTP, DB, or file operationsLayer 3

Default Instrumentation

SurfaceDefaultNotes
HTTPoncovers supported client libraries
Databasesoncaptures supported DB drivers
File I/Ooffenable only when required
LLM gateonCrewAI before-LLM-call governance gate

What Hook Payloads Are For

Layer 3 data is best treated as operational telemetry:

  • outbound HTTP activity
  • database queries
  • file operations when enabled
  • runtime context for policy investigation

Use task boundaries for most business-policy decisions. Use hook-level policy only when you truly need to govern runtime operations directly.

Correlation

Each governed run carries identifiers that let OpenBox group related activity:

  • per-agent workflow session ids
  • per-crew execution ids
  • flow_execution_id when running inside create_openbox_flow()

This is what lets OpenBox represent nested, delegated, and multi-crew runs coherently in the UI.

Multi-Agent Attribution

For hierarchical and delegated crews, the SDK preserves the currently active execution context so HTTP, DB, file, and LLM-gate behavior is attributed to the right governed agent rather than whichever agent first opened the trace.

Policy Guidance

  • use ActivityStarted and ActivityCompleted for business decisions
  • treat hook payloads as internal telemetry unless you intentionally want to govern runtime operations
  • avoid duplicate approval flows by not treating every hook payload as a business action