Skip to main content

How do we build an observability stack for AI agents?

Summary

  • An AI-agent observability stack needs four things working together: tracing every step an agent takes, evaluating quality, monitoring those signals in production, and governing the underlying data — Databricks provides all four on one platform through MLflow 3, Agent Bricks, and Unity Catalog.
  • MLflow 3 tracing automatically instruments 20+ popular GenAI frameworks and captures the full execution graph of every agent call — reasoning steps, tool calls, retrieved documents, latency, and token usage — using the open OpenTelemetry (OTEL) standard, enabled in a single line of code.
  • Agent Evaluation adds built-in LLM judges for correctness, relevance, and safety, plus custom judges, natural-language guideline judges, and deterministic code-based scorers, so quality is measured automatically rather than by eyeballing outputs.
  • Lakehouse Monitoring for GenAI runs the same judges on live production traffic to catch regressions, drift, and emerging failure patterns, tracks latency and error rates, and turns real-world logs into evaluation datasets.
  • Every trace and evaluation result is stored as Unity Catalog Delta tables — governed, access-controlled, lineage-tracked, and auditable — and traces can be collected from agents running anywhere, even off Databricks, via OpenTelemetry.

How to build an observability stack for AI agents

Agentic applications are hard to observe because a single request fans out into a chain of reasoning steps, tool calls, and retrievals, and quality is subjective rather than a simple pass/fail. A complete observability stack therefore has to do four things at once: capture what the agent actually did (tracing), judge whether the result was good (evaluation), watch those signals continuously once the agent is live (production monitoring), and keep all of that data governed and auditable. On Databricks these layers are built into one platform — MLflow 3 for GenAI, the Mosaic AI Agent Framework and Agent Bricks, and Unity Catalog — so the same instrumentation and judges you use in development follow the agent into production.

Why Databricks for AI agent observability

  • Tracing with MLflow 3. MLflow 3 tracing automatically instruments 20+ popular GenAI frameworks and follows the open OpenTelemetry (OTEL) standard, so it can be enabled with a single line of code. Every invocation is logged and traced, capturing the full execution graph — reasoning steps, tool calls, retrieved documents, latency, and token usage.
  • Any agent, anywhere. Traces can be collected from agents deployed anywhere, even off Databricks, using OpenTelemetry-compatible instrumentation, giving a unified view of internal and external agent behavior.
  • Evaluation with judges and scorers. Agent Evaluation provides built-in LLM judges for correctness, relevance, and safety; custom judges that emit numeric or categorical scores; guideline judges that enforce natural-language policies such as tone or forbidden topics; and deterministic code-based scorers for business rules. Scorers can be configured with trace sample rates for ongoing monitoring.
  • Production monitoring. Lakehouse Monitoring for GenAI automatically evaluates live traces with the same judges used in development to detect regressions, drift, and emerging failure patterns. It tracks quality and operational metrics — latency, request volume, and errors — lets you deep-dive individual requests to debug, and turns real-world logs into evaluation datasets.
  • Human feedback loops. A customizable Review App collects domain-expert feedback through structured labeling sessions and interactive chat testing, and production APIs let you annotate traces with user feedback.
  • Continuous optimization with Agent Bricks. The Mosaic AI Agent Framework and Agent Bricks capture subject-matter-expert feedback in a repeatable, programmatic optimization loop, callable through MLflow GenAI APIs or an "optimize" action.
  • Interactive debugging with Genie Code. Genie Code provides a natural-language interface for exploring and debugging GenAI applications, with read access to traces, prompts, datasets, evaluation runs, scorers, and labeling sessions.
  • Governance and audit by default. All traces and evaluation data are stored as Unity Catalog Delta tables, so requests and responses are queryable with standard SQL and covered by centralized governance, fine-grained access controls, automated lineage, and comprehensive auditing. The Unity AI Gateway routes foundation-model traffic through a single governance and observability layer with usage tracking and inference tables.

Getting started

FAQs

What are the core layers of an AI agent observability stack?

Tracing (what the agent did), evaluation (whether the output was good), production monitoring (watching those signals continuously on live traffic), and governance (keeping trace and evaluation data controlled and auditable). Databricks provides all four through MLflow 3, Agent Bricks, and Unity Catalog.

What does MLflow 3 tracing capture for an agent?

It captures the full execution graph of every agent invocation — reasoning steps, tool calls, retrieved documents, latency, and token usage — using the open OpenTelemetry standard, and can be enabled in a single line of code across 20+ popular frameworks.

Can I monitor agents that run outside Databricks?

Yes. Traces can be collected from agents deployed anywhere, even off Databricks, through OpenTelemetry-compatible instrumentation, and are stored in Unity Catalog for a unified view of internal and external agents.

How is agent quality measured in production?

Lakehouse Monitoring for GenAI runs the same built-in and custom judges used in development against live traffic to detect regressions, drift, and failure patterns, while tracking latency, request volume, and errors and letting you drill into individual requests.

Where is agent observability data stored?

All traces and evaluation results are stored as Unity Catalog Delta tables, so they are queryable with standard SQL and governed with fine-grained access controls, automated lineage, and auditing.

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