← Vetro Attest · Free Art. 12/14 checker · Free EU AI Act tools
Audit log for Azure AI Foundry Agent Service
Azure AI Foundry's Agent Service manages an agent's threads, runs and tool calls behind a hosted API, similar in shape to other managed agent runtimes: your code creates a thread, adds messages, starts a run, and polls for tool calls the agent wants to make. Azure instruments this with OpenTelemetry, following the GenAI semantic conventions, so you can export the run as a trace without re-implementing the orchestration loop yourself.
What to record
- Thread and run identifiers, so events can be tied back to a specific conversation.
- Each model step: the messages sent, the response, token usage.
- Each tool call the agent requested and the output your code returned for it.
- Run status transitions (queued, in progress, requires action, completed, failed), since a run that requires human input mid-way is an oversight event worth keeping.
Capturing it: OpenTelemetry
Wire up Azure Monitor or an OTLP exporter for your Foundry project and you get gen_ai.* spans for the agent's model and tool activity. As with any OTel-based evidence: confirm whether content capture is enabled (spans without it show that a call happened but not what was said), turn off sampling for the export you keep as evidence, and export to storage outside your team's own observability workspace (see OpenTelemetry GenAI traces as evidence).
Capturing it: at the call site
If you need a signed record rather than (or in addition to) a trace, record each step from your own polling loop as it happens, using the Vetro core API:
import { Vetro } from '@vetro/core';
const vetro = new Vetro();
const run = vetro.startRun({ name: 'foundry-thread', meta: { threadId } });
run.llmRequest({ provider: 'azure-ai-foundry', model, params });
// ... poll the run, handle a "requires_action" tool call ...
run.toolCall(toolName, toolArgs);
run.toolResult(toolName, toolOutput);
run.llmResponse({ provider: 'azure-ai-foundry', model, usage });
Because your code is the one submitting tool outputs back to the run, this is also where an inline policy can block a tool call before you submit its result — a control the managed trace alone cannot give you.
Threads that span days
A support or workflow agent built on threads can span many runs over days or weeks. Keeping one ledger per thread, appended to across runs, is closer to what Article 26 deployer log retention expects than one export per run: it shows the whole conversation's provenance, not a fragment.
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 Foundry agent is high-risk? Start with 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.