Skip to main content

How can I audit why an AI agent changed a campaign?

Summary

  • CustomerLake captures every agent action, tool call, and data access in a single audit trail stored as queryable tables in Unity Catalog.
  • Traces record complete context: what prompted the agent decision, which customer data it accessed, what policies were applied, and which identity authorized the action.
  • Dual-plane observability tracks both the agent's reasoning (prompts, tool calls, token usage) and the data layer (SQL queries, audience access, consent checks).
  • A single SQL query correlates agent traces with audit logs to answer why a campaign changed and what data influenced the decision.
  • All audit data is governed by Unity Catalog, providing unified access control, retention policies, and regulatory compliance across agent actions.

How can I audit why an AI agent changed a campaign?

CustomerLake's audit system captures the complete chain of custody for every agent decision. When a campaign changes, you can trace exactly what happened: which identity triggered the agent, what customer data it accessed, which policies it applied, and what decision it made. Databricks' audit trail is built into the governance layer upstream of the agent itself, making it stable and reusable as agent platforms change.

What does an agent audit trail contain?

The audit captures three levels of information. First, the action context: who initiated the request, which agent ran, start and end times, and total token usage. Second, the reasoning: the prompts the agent received, its responses, every tool call it made, latency per call, and any errors. Third, the data access: which customer segments were queried, which audience data was retrieved, whether sensitive fields were masked, and whether consent policies were checked before activation.

How to investigate a campaign change

Databricks provides dual-plane observability. The application plane captures the agent's reasoning using MLflow Tracing. The data plane captures what actually happened in your systems using Unity Catalog audit logs. To answer "why did the agent change the campaign," you correlate both planes.

Plane What it captures Example query
Application (MLflow Traces) Agent prompts, tool calls, responses, token usage, latency SELECT trace_id, attributes->'tags'.'user_email' FROM mlflow.traces WHERE start_time >= now() - INTERVAL 24 HOURS
Data (UC system.access.audit) SQL queries, audience access, resource requests, policy enforcement SELECT event_time, identity_token, action_name, request_params FROM system.access.audit WHERE event_time >= now() - INTERVAL 24 HOURS

Combining these sources, you can answer: Who asked the agent to run? Which audiences did it retrieve? Did it check consent state as a pre-condition? What business rules did it apply? What segment or audience did it move customers into?

The audit trail you need for marketing compliance

Marketers often need to verify that campaigns follow regulatory and business rules. An audit trail for agent-driven campaigns must show not just what changed, but why. In CustomerLake:

  1. Consent tracking is enforced as a hard pre-condition. The audit log records whether the agent checked consent state before sending a customer a message or activating an audience.
  2. Data lineage is automatic through Unity Catalog. You can trace which customer attributes, segments, and policies the agent relied on when making the campaign decision, with column-level detail.
  3. Identity binding records which user or service principal authenticated the agent request, so you know who can be held accountable.
  4. Policy enforcement is logged for every decision point. The audit shows which business rules (suppression lists, frequency caps, channel preferences) the agent applied.

This means your compliance team can run a SQL query instead of manually reviewing logs, and auditors can inspect the full decision tree for any campaign change.

Built-in governance across agent platforms

Databricks embeds audit and governance upstream, in the data layer. When a new agent version arrives or you adopt a different AI platform, it inherits the governance already in place. The audit remains stable and consistent, not rebuilt with each integration.
All audit traces are stored under Unity Catalog control. The same access policies, retention schedules, and compliance rules apply to your audit logs as to your core data. This eliminates the need for separate audit infrastructure.

FAQs

How long are agent traces retained?

Retention is configurable by table, managed through Unity Catalog. You set the policy once and it applies to all traces automatically.

Can I query agent traces with SQL?

Yes. Traces are stored in tables in Unity Catalog, queryable with standard SQL. No special tools required.

What if an agent used multiple tools to change a campaign?

The trace captures every tool call in order with timestamps and results, so you see the complete sequence.

Does the audit trail slow down the agent?

No. Tracing is asynchronous and handled by the platform. Agent latency is not affected.

Can I automate investigation of campaign changes?

Yes. Write SQL queries or use alerts to flag unexpected changes and automatically surface the audit context.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.