AI WORKFLOWS
AI log API

See the context behind the answer.

Design AI logs for workflows, retrieval, tool actions, and application outcomes—with metadata at the center.

Event explorerSample data
ai-event.json
{
  "schema_version": "1.0",
  "timestamp": "2026-09-21T09:41:02.184Z",
  "severity": "INFO",
  "event_id": "evt_demo_002",
  "event_name": "generation.completed",
  "service": "assistant-worker",
  "attributes": {
    "workflow_id": "wf_demo_042",
    "model": "example-model",
    "config_version": "prompt-v3",
    "outcome": "completed",
    "duration_ms": 842
  }
}
Synthetic fixture · nothing is sentDownload JSON ↗
DESIGN WITH INTENT

Keep the important distinctions.

Follow the workflow

Separate retrieval, generation, validation, and persistence.

Explain configuration

Reference versioned settings without copying private documents.

Control content

Treat prompt and output capture as separate, restricted decisions.

THE EVENT CONTRACT

Fields with a reason to exist.

A successful model response is not necessarily a successful application workflow. Record stage-specific outcomes and distinguish a proposed tool action from an executed one. Preserve the configuration references needed to investigate behavior after a release.

These fields illustrate a design pattern. Map them deliberately to your own schema, source, and destination.

AI log API example fields
FieldWhat it means
workflow_idThe logical application operation across attempts.
modelA configured model or deployment reference.
config_versionThe prompt, retrieval, or application configuration revision.
outcomeWhat this stage actually completed or failed to do.

Do not place private conversations, tool credentials, or unrestricted document content in routine telemetry.

Technical reference: OpenTelemetry GenAI semantic conventions . Verify the version and settings used by your own implementation.

FIELD NOTES

Keep following the signal.

All articles →
ONE EVENT IS A GOOD START

Make your next log more useful.

Start with a clear schema. Keep the context that matters.