← Vetro Attest · Free Art. 12/14 checker · Free EU AI Act tools
Audit log for Semantic Kernel agents
Semantic Kernel runs plugins and functions under a kernel that can call models and invoke tools in sequence or in a plan. Microsoft has instrumented the SDK with OpenTelemetry directly, using the GenAI semantic conventions, which makes it one of the easier frameworks to get a first trace out of.
What to record
- Each function invocation: plugin, function name, arguments.
- Each model call inside a function: model, parameters, usage.
- Planner decisions, if you use planning: which functions were chosen and why.
- Filter or guardrail results, if you use Semantic Kernel's filter pipeline to block or modify calls.
Capturing it: OpenTelemetry
Semantic Kernel's own telemetry emits gen_ai.* spans for chat completions and function invocations when you wire up an OpenTelemetry exporter in your host application (.NET or Python). Point that exporter at OTLP JSON and you have a first reading of a run with no changes to your kernel code. As with any OTel pipeline used as evidence: turn sampling off, enable content capture deliberately, and export to storage you control rather than only to an APM backend (see OpenTelemetry GenAI traces as evidence).
Capturing it: at the call site
For a signed, tamper-evident record rather than a trace export, wrap the chat completion client Semantic Kernel calls into with the Vetro core API instead of the kernel itself:
import { Vetro } from '@vetro/core';
import { wrapOpenAI } from '@vetro/openai';
const vetro = new Vetro();
const run = vetro.startRun({ name: 'sk-planner' });
const client = wrapOpenAI(openaiClient, run);
// hand `client` to whatever the kernel's chat completion service wraps
Semantic Kernel's function-invocation and prompt-render filters are the natural place to record the function boundary itself — call run.toolCall / run.toolResult (or run.event) from a filter around each function, before and after it runs, the same way any tool dispatcher gets wrapped (see audit trail for AI agents). Check your Semantic Kernel version's filter API before wiring this in — the shape of filters has changed across releases.
Plans and multi-step invocation
A planner can chain functions in an order decided at runtime, not written in your code. Recording the plan itself, not just the functions it called, is what lets a reviewer distinguish "the plan was wrong" from "a function misbehaved" — relevant to both Article 9 risk management and Article 12 logging.
Check your own logs
Paste a Vetro ledger or an OpenTelemetry GenAI trace export into the free checker: it verifies integrity and shows which record-keeping obligations your evidence covers, in your browser. Not sure if your Semantic Kernel system is high-risk? Try the high-risk classifier. When you need something to hand to an auditor or a customer, Vetro Attest issues a countersigned EU AI Act report for 29 USD, one-off.
See a sample ledger verified in one click, check your own logs free or get the countersigned EU AI Act report.