DEV Community

Danny C.
Danny C.

Posted on

Agents at Scale: Ops for Faster Iterations

Agents at Scale: Ops for Faster Iterations

  • Agentic Applications: What and Why — Understand what agent-based systems are and why they introduce new operational challenges

  • From MLOps to AgentOps — Explore how traditional MLOps and LLMOps evolve to support the dynamic needs of agentic workflows

  • Inside the AgentOps Stack — Walk through the key components: orchestration, CI/CD, monitoring, evaluation, and environment isolation

  • Building AgentOps — Learn how to implement AgentOps using features like MLflow, Unity Catalog, and DABs

  • Demo: Telco Support Agent in Action — See a reference implementation that brings these patterns to life from development to deployment

  • Best Practices, Challenges & What's Next — Discuss real-world design tips, human-in-the-loop feedback, and the future of continuous learning for agents

Agentic Applications: What and Why

Evolution of LLM-based systems

  • LLM (direct query): User sends a Prompt (including chat history/context) to an LLM, which parses the query and generates a Response back to the User

  • LLM + hard coded tools (e.g. RAG): User sends a Prompt; the LLM parses the query, retrieves relevant docs from a Context DB, augments the prompt, and generates a Response

  • AI Agents (LLM plans and orchestrates tools autonomously): User sends a Prompt; the LLM parses the query, handles Planning and Responses via Orchestration to autonomously call and receive responses from selected Tools (leaving unused tools uncalled), and generates a Response back to the User

AI Agentic System Architecture

  • Shows a User interacting via query and response with an Agent (Orchestration Framework) or an Externally-served agent (External Agent Orchestration Framework)

  • The Agent connects to a 3rd party MCP Server, a Custom MCP Server (via Apps), and a Managed MCP Server (which connects to Unity Catalog functions, Vector search, and Genie space)

  • Tracing flows from the Agent to MLflow Tracing (in beta) and via Open Telemetry tracing from the External Agent, connecting to an Inference table for monitoring, drift detection, LLM judge metrics, debugging, and auditing

  • Prompts and responses route through the AI Gateway—which handles inference logging to the Inference table, guard rails, cost control, access control, failbacks, and rate limits—to either Model Serving (hosted LLM, including Hugging Face, LangChain, Llama, Mistral, and Meta ecosystems) or External Models (LLM, such as OpenAI, Anthropic, Cohere, Gemini, or Titan)

Common Agent Design Patterns
Mosaic AI supports increasing capability and complexity across four common design patterns:

  • Agent with documents (aka unstructured retrieval or "RAG")

  • Agent with tables (aka "text-2-sql")

  • Agent with multiple tools + data sources (aka "tool-calling agent")

  • Agent that orchestrates other agents (aka "multi-agent")

Unified Platform to Build AI Agents
Comprises a continuous cycle of four stages supported by governance:

  • Prepare data: Data ingestion, ML features, Vector index

  • Build agents: GenAI models, Classical ML models, Function and tools (enabling agents that reason over your data across every enterprise system)

  • Deploy agents: Agent serving, MLOps/LLMOps, Lineage

  • Evaluate agents: LLM judges, Peer labeling, Tracing (providing custom evaluation for your use case)

  • Govern agents: AI guardrails, Credentials, Usage tracking, Rate limits (building trust with guardrails, evaluation, and monitoring)

From MLOps to AgentOps

What is MLOps?

  • MLOps is the set of processes and automation for managing data, code and models to improve performance, stability and long-term efficiency of ML systems

  • Formula: $MLOps = DataOps + ModelOps + DevOps$

Data-centric ML Platform on the Lakehouse Platform

  • DataOps: Powered by Delta Lake

  • ModelOps: Powered by MLflow

  • Unity Catalog governs both DataOps and ModelOps

  • DevOps: Integrates with GitHub, GitLab, and Azure DevOps

  • Core operational capabilities: Workflows, Model Serving, and Lakehouse Monitoring

Why Care About MLOps?

  • MLOps helps you reduce risk:

    • Technical risk - poorly performing models, fragile infrastructure
    • Compliance risk – violating regulatory or corporate policies
  • MLOps improves long-term efficiency through automation:

    • Streamline delivery of models to production
    • Catch errors before they hit production
    • Avoid slow, manual processes

The MLOps Lifecycle
Connects Data Engineers, Data Scientists, and ML Engineers across five iterative stages:

  • Data Collection (Data Engineer): Utilizes Delta Lake, Microsoft Azure Blob Storage, MongoDB, Apache Kafka, and Amazon S3

  • Data Prep (Data Engineer): Focuses on feature engineering using Apache Spark, SQL, Python, and pandas

  • Training (Data Scientist): Uses scikit-learn, PyTorch, Apache Spark, R, dmlc XGBoost, and TensorFlow

  • Evaluation (Data Scientist): Uses NumPy, Apache Spark, scikit-learn, and R

  • Deployment (ML Engineer): Deploys containers at scale using Model Serving, Kubernetes, Docker, Azure Machine Learning, Apache Spark, and Amazon SageMaker

The AgentOps Lifecycle
Adapts the MLOps cycle by expanding the Data Scientist role to Data Scientist / Software Engineer across the Training and Evaluation phases, while retaining the core loop with Data Engineers and ML Engineers:

  • Data Prep incorporates Data indexing alongside Apache Spark, SQL, Python, and pandas

  • Training transitions to Building / Tuning (managed by Data Scientist / Software Engineer), integrating Context Retrieval, AI Tracing, and Tool & Function Calling using Hugging Face, LlamaIndex, LangChain, Anthropic, Cohere, Azure, OpenAI, PyTorch, and TensorFlow

  • Evaluation incorporates Domain Experts, AI Tracing, and AI Judges alongside foundation model providers (Hugging Face, Anthropic, Cohere, Azure, OpenAI)

  • Deployment adds AI Tracing and AI Guardrails alongside Model Serving, Kubernetes, Docker, Azure Machine Learning, Apache Spark, Amazon SageMaker, and containers at scale

Shipping ML vs. Gen AI from Dev to Prod

  • Shipping ML from Dev to Prod: Execution Environment manages three core ML Assets: Code (Training, Inference), Data (Features, Labels), and Models (MLflow Model such as sklearn), progressing across Developed (dev), Tested (staging), and Deployed (prod)

  • Shipping Gen AI from Dev to Prod: Execution Environment manages Gen AI Assets: Code (Chain, Inference), Data (Features, Vector DB), and Models (MLflow Model such as LangChain), progressing across Developed (dev), Tested (staging), and Deployed (prod)

Properties of Agentic Applications

  • Built on GenAI models, but include orchestration, tools, memory, and context

  • Often involve multi-agent systems with dynamic routing

  • Designed for goal-oriented tasks, not just predictions

  • Non-deterministic and harder to evaluate with traditional metrics

  • Require richer observability (e.g., trace spans, tool calls, feedback)

  • Human-in-the-loop interactions common

Implications for MLOps → AgentOps

  • Development: Modular agent components, tool integration

  • Evaluation: Needs task-based or LLM-based scoring

  • CI/CD: Bundles must manage full agent systems, not just models

  • Serving: Requires support for stateful execution and external APIs

  • Monitoring: Tracing and feedback become critical for debugging and trust

What Doesn't Change in AgentOps
Existing tools and processes only require small adjustments:

  • Separation of development, staging and production remains the same

  • Git version control and the MLflow Model Registry in Unity Catalog remain the primary conduits for promoting pipelines and models toward production

  • The Lakehouse architecture for managing data remains valid and essential for efficiency

  • Existing CI/CD infrastructure should not require changes

  • The modular structure of MLOps remains the same, with pipelines for model training, model inference, etc.

  • Platform architecture continues to unify DataOps (Delta Lake) and ModelOps (MLflow) under Unity Catalog alongside DevOps (GitHub, Azure DevOps, GitLab) across development, staging, and production

Guiding Principles

  • Take a data-centric approach to machine learning

  • Always keep your business goals in mind

  • Implement MLOps in a modular fashion

  • Process should guide automation

MLOne Multi-environment View

  • Git provider workflow: Create dev branch (dev), commit code, pull request to main (triggering CI unit tests on dev and merge), and merge to release (triggering Continuous Deployment on release)

  • Development workspace: Handles exploratory data analysis, model training, model validation, model deployment, and monitoring, logging to MLflow Tracking Server, reading from Prod Catalog, writing to Dev Catalog, and deploying to a Model Serving Endpoint

  • Staging workspace: Runs integration tests (CI) on the dev branch, logging to MLflow Tracking Server, reading from Prod Catalog, writing to Staging Catalog, and testing against a Model Serving Endpoint

  • Production workspace: Executes the Model train-deploy Workflow (model training, validation, deployment on release), logging to MLflow Tracking Server, registering models, assigning Challenger/Champion aliases, promoting models to Prod Catalog, and running Batch Inference and Monitoring to write Metric Tables and Inference Tables

  • Unity Catalog and Lakehouse: Centralizes governance across Prod Catalog, Dev Catalog, and Staging Catalog for Tables, Models, Metric Tables, and Inference Tables

Inside the AgentOps Stack

Building an AI Agent System

  • Prepare data and Build tool code: Prepare data using Vector search, Genie Room, Serverless SQL, and Online tables; build tool code using Python and SQL

  • Prototype agents: Use AI Playground to prototype agent behavior

  • Build agents: Develop using frameworks such as LangGraph, AutoGen, Python, OpenAI SDK, and LlamaIndex, tracked with MLflow

  • Evaluate agents: In training, generate synthetic data, evaluate quality/cost/latency, and view metrics & agent outputs in UI to debug quality; in production, measure quality/cost/latency, review production logs in UI, and add logs to the evaluation set

  • Deploy agents: Serve open-source/custom LLMs (MLflow, Mistral, Meta, DBRX) and commercial LLMs (OpenAI, Anthropic, Gemini) via Model serving and AI gateway, generating Logs & Traces and Inference tables

  • Interact with agents: End users interact via Apps and REST APIs (optional), providing crucial user feedback that loops back into evaluation

  • Governance: Enforced across the lifecycle via Rate limits, AI guardrails, Lineage, Credentials, Usage tracking, and LLMOps

Agent Evaluation & Monitoring – Overview

  • Prepare data, create tools: Prepare Data & Tools to feed into the agent build

  • Build prototype: Build Agent and perform iterative Quality checks, optionally seeded by creating Synthetic Evaluation Data

  • Deploy to pre-production: Deploy Pre-production Agent so users can test and provide feedback, saving feedback to the Evaluation Set and routing identified issues to improve the agent and tools

  • Fix quality issues: Conduct Vibe Check / Evaluate Agent using the Evaluation Set and Subject Matter Experts labeling data; loop back to Improve Agent and Tools if further feedback is needed, or advance once the quality level is achieved

  • Deploy to production: Deploy Production Agent and Monitor Agent behavior, converting and storing logs in the Evaluation Set (for Subject Matter Experts to label) and routing identified issues back to improve the agent and tools

Managed MLflow for AI Agent Lifecycle
Manages the genAI app lifecycle on top of Unity Catalog (govern all data and AI assets) and Cloud Data Lake (all structured and unstructured data):

  • Vector & Feature Store: Automated vector and feature lookups simplify integration and reduce mistakes

  • Create and evaluate AI agents: Mosaic AI Agent Framework and Agent Evaluation help create agents and evaluate their output

  • Tracking and tracing: MLflow tracing captures detailed agent execution information for enhanced genAI observability

  • Model Registry: MLflow Model Registry, integrated with Unity Catalog, centralizes all AI models and artifacts

  • Model Serving: Deploys agents to a REST API endpoint

  • Monitoring: MLflow automatically captures requests and responses to monitor and debug models, feeding back into agent creation and evaluation

AgentOps Multi-Environment View

  • Git provider: Manages dev, main, and release branches with pull requests to main, CI triggers, merges, and Continuous Deployment on release

  • Development workspace: Runs Data Preparation Workflow (Data Ingestion, Chunking, Vector Search Indexing), Structured Data Extraction (ai_parse_document, ai_query extraction, Data Preparation), Agent Development Workflow (Tool Library, Agent Development, Automated Evaluation), and App Deployment Workflow (Agent Deployment, App Deployment), connected to MLflow Tracking Server, Model Serving Endpoint, SME Human-in-the-loop Feedback, and Dev Catalog

  • Staging workspace: Runs Unit tests (CI) for tools and agents, Integration tests (CI) for tools and agents, and Validation tests (CI) for tools and agents on the staging branch, logging test results to MLflow Tracking Server and interacting with Dev Catalog

  • Production workspace: Executes App Deployment Workflow (Agent Deployment, App Deployment) on release, Batch Inferencing, and Evaluation & Monitoring (Automated Evaluation, SME Human-in-the-loop Feedback, Production Monitoring), logging production traces to MLflow Tracking Server and managing Tables, Vector Search, Models, AI Functions, Metric tables, and Inference Tables in Prod Catalog

Building AgentOps

Unity Catalog for AgentOps

  • Data centric approach - model monitoring is data monitoring

  • AI assets get registered in Unity Catalog, which unifies access control for both data and AI assets

  • AI assets can be accessed using the 3-level namespace, e.g. catalog.schema.ai_asset (marketing.customers.recommender)

  • Unity Catalog organizes Catalog and Schema across Tables, Volumes, Vector Indexes, Functions (AI Agent Tools), Online Features / Feature Specs (Online Tables), and Models (Custom Models, Foundation Models, External Models)

  • Execution and serving architecture connects Vector Search, AI Agent Tool execution environment, Apps, Dashboards, Mosaic AI Model Serving (Batch inference), and External Models (OpenAI, Anthropic, Amazon Bedrock, Cohere, Google Gemini, Titan)

  • Mosaic AI Gateway governs all models with Rate Limiting, Request/Response routing, Inference tracking, Usage tracking, and Lakehouse Monitoring (Inference Profiling, Metrics Data)

  • AI Gateway supports External Models today, with full parity for Foundational Model API (with provisioned throughput) planned for the first week of January and CPU/GPU endpoints expected by the end of Q4

MLflow Open Source AgentOps Platform
Built on open standards (The Linux Foundation, OpenTelemetry) across the iterative lifecycle of Data Collection, Data Indexing, Building & Tuning, Evaluation, and Deployment:

  • Tracing: Rich agent observability across environments

  • Evaluation: Human feedback & AI judge metrics for agent performance

  • Versioning: Track and compare agent parameters, code, & prompts

  • Gateway: Control & audit LLM and agent access with guardrails

  • Supports any LLM or agent authoring framework including OpenAI, Anthropic, Gemini, DSPy, CrewAI, AutoGen, and LangGraph

The Journey to Production

  • Source control flows from dev via pull request to main and via release to release

  • Dev environment: Developers check out from and commit to dev; Dev config uses a Single node, No schedule, and runs as user for Workflows (Market Analysis Notebook) and Compute

  • Staging environment: Deploys from main as test and merges back; Staging config uses a Spark cluster, Weekly schedule, and runs as user

  • Prod environment: Deploys from release to prod; Prod config uses a Spark cluster, Weekly schedule, and runs as a service principal

DABs (Asset Bundles)

  • Name and default Workspace configuration in bundle.yml

  • Resource configurations: Jobs, Lakeflow pipelines, MLflow, etc., following the REST API schema

  • Environment-based specs: Control project behavior in different environments (such as development as default and production with custom workspace host and cron schedules)

  • Sample bundle.yml configures bundle name shark_sightings, default staging workspace host, job tasks running ./shark_sightings.py with dbname parameter using ${bundle.environment} on a new cluster (spark_version: 10.4.x-scala2.12, num_workers: 1, node_type_id: i3.xlarge), and overrides workspace host and schedule (quartz_cron_expression: 14 8 14 * * ?, timezone_id: UTC) for production

Where Can We Use Bundles?

  • Source control flows from dev (pull request) to main (release) to release across Dev, Staging, and Prod environments running Workflows (Market Analysis Notebook) and Compute

  • Executed on CI/CD server (e.g. GitHub Actions), triggered by CI or release pipelines, and ideally run as a service principal

  • Staging deployment commands: bundle deploy -t "staging" and bundle run pipeline --refresh-all -t "staging"

  • Production deployment commands: bundle deploy -t "production" and bundle run pipeline --refresh-all -t "production"

AgentOps Stacks
Adapted from MLOps Stacks (README Apache-2.0 license, currently in public preview). Provides a customizable stack for starting new AI Agent projects that follow production best-practices out of the box, allowing data scientists to quickly iterate on agent code while ops engineers set up CI/CD and resource management, or serving as a building block in automation for creating new projects with production-grade CI/CD pre-configured:

  • Agent Code: Example Agent project structure (data preparation and agent development, etc.), with unit tested Python modules and notebooks — allows quick iteration on Agent problems without worrying about refactoring code into tested modules for productionization later on

  • Agent Resources as Code: Agent pipeline resources (data preparation and agent development jobs, etc.) defined through CLI bundles — governs, audits, and deploys changes to Agent resources (e.g., using a larger instance type for automated model retraining) through pull requests rather than adhoc changes made via UI

  • CI/CD (GitHub Actions or Azure DevOps): Workflows to test and deploy code and resources — ships code faster and with confidence by ensuring all production changes are performed through automation and only tested code is deployed to prod

Demo: Telco Support Agent in Action

Telco Support Agent Solutions Repository
Public repository agentic-customer-support:

  • Project structure includes directories for .github/workflows, configs, notebooks, resources, scripts, telco_support_agent, and tests, along with configuration and documentation files (.gitignore, .pre-commit-config.yaml, CODEOWNERS.txt, CONTRIBUTING.md, LICENSE.md, NOTICE.md, README.md, SECURITY.md)

Reference Multi-Agent Architecture
A support team copilot leveraging Genie for structured data and Knowledge Assistant for unstructured data:

  • Human Agent interacts bidirectionally with the Supervisor Agent, which routes between four specialized sub-agents

  • Account Agent (Agent 1): Pulls customer account information (Genie)

  • Billing Agent (Agent 2): Pulls billing & usage data for accounts (Genie)

  • Product Agent (Agent 3): Pulls plans, devices, and promos (Genie)

  • Tech Support Agent (Agent 4): Q&A for technical support & policies (Knowledge Assistant)

The Full AgentOps Lifecycle: End to End

  • Prepare data (completed)

  • Build agents (completed)

  • Evaluate them (completed)

  • Register and deploy (completed)

  • Monitor behavior (completed)

  • Collect feedback (completed)

  • Improve the system (next step)

  • Promote through CI/CD (next step)

Best Practices, Challenges & What's Next

Dev vs. Staging vs. Prod

  • Level of trust, quality, and testing progresses from Low (dev) to High (prod), with staging in between

  • Openness of access progresses from Open (dev) to Locked-down (prod), with staging in between

Model vs. Code Lifecycles
Model and code lifecycles often operate asynchronously across dev, staging, and prod:

  • Weekly fraud detection model: Model update; no code change

  • Computer vision model, fine-tuning a large language model: No model update; code change

Agent vs. Code Lifecycles
Agent and code lifecycles often evolve asynchronously:

  • Updating an agent's behavior: Prompt or tool configuration change; no code update

  • Adding new capabilities: Code update (new tools, routing logic); no model change

  • Improving quality or reliability: Evaluation or feedback loop tuning; no model retrain

  • Model upgrade: Swap underlying LLM (e.g., from GPT-4 to DBRX); no agent logic change

  • Key takeaway: Agent performance depends on the coordination of multiple evolving components — model, code, tools, configs, and evaluation pipelines

ML Deployment Patterns — Deploy Code
Training code is developed in dev and promoted through staging to prod, where Models are trained and deployed:

  • dev: Develop training code, develop ancillary code, and promote code

  • staging: Test model training code on subset of data, test ancillary code, and promote code

  • prod: Train model on production data, test model, deploy model, and deploy ancillary code

Deploy Agents as Code
Promoting code across dev, staging, and prod:

  • Benefits:

    • Automation: Enables CI/CD for rapid iteration — agents can be automatically rebuilt and redeployed
    • Security & Access Control: Only production needs access to production data and credentials
    • Reproducibility: Full traceability of code, configs, and dependencies
    • Scalability: Supports modular, multi-agent systems and coordinated releases
    • Governance: Easier to enforce approvals, code review, and lineage tracking through Unity Catalog and MLflow
  • Limitations:

    • Learning Curve: Data scientists and AI engineers must adopt structured development and CI/CD practices
    • Infrastructure Overhead: Requires DABs, pipelines, and bundle management even for quick experiments
    • Iteration Friction: Heavier workflow for fast prototyping or small teams
    • Asset Duplication: Rebuilding vector search indexes or other assets per environment can be costly

ML Deployment Patterns — Deploy Models
In DEPLOY CODE, training code moves across dev, staging, and prod to produce models in production; in DEPLOY MODELS, training code runs in dev to produce a model that is promoted directly across staging to prod:

  • dev: Develop training code, develop ancillary code, train model on prod data, and promote model and ancillary code

  • staging: Test model code, test ancillary code, and promote model and ancillary code

  • prod: Deploy model and deploy ancillary code

Deploy Agents as Artifacts
Building/logging in dev and promoting the model artifact across staging and prod:

  • Benefits:

    • Ease of Use: Familiar and lightweight for data scientists — develop and log once, then promote
    • Low Overhead: Simpler setup; doesn't require full CI/CD for experimentation
    • Cost Efficiency: Ideal when retraining or rebuilding agents is expensive
    • Speed: Quick way to share working prototypes or demos
  • Limitations:

    • Limited Automation: Harder to integrate with continuous delivery or automated evaluation pipelines
    • Security Concerns: May require dev envs to access production data or resources
    • Reproducibility Risks: Less control over runtime and dependencies across environments
    • Scaling Challenges: Harder to coordinate updates across multi-agent systems
    • Governance Gaps: Auditing and traceability depend on how artifacts are logged and versioned

Agent Deployment Patterns: No One-Size-Fits-All (AgentOps ≠ Just MLOps)

  • Agent deployment approaches vary across orgs, depending on company & team size, security & governance constraints, infra/resource constraints (e.g. vector search replication cost), and appetite for automation vs. manual iteration

  • Key Takeaway: There's no universal best practice; choose what supports quick, robust iteration for your team while balancing governance and cost

Other Considerations in AgentOps

  • Security & Governance: Control access to tools, data, and APIs; ensure audit trails for all agent activity

  • Cost Efficiency: Replicating assets (e.g. vector indexes) across environments can be expensive

  • Tool & Feature Management: Agents depend on external tools and features; treat these as deployable, versioned components

  • Fast Experimentation: Notebooks, dev notebooks, and trace inspection enable rapid debugging and iteration

  • Agent State Management: Stateful agents (e.g. chat, workflows) require persistent memory and session context; needs secure, scalable design

  • Low-Latency Feature Access: Real-time decisions need fast access to structured context; integrate with low-latency feature stores (e.g. online tables, vector DBs)

What's Next in AgentOps (with MLflow 3)

  • Continuous Learning from Feedback: Human-in-the-loop feedback powering agent improvement (e.g. Genie, Agent Bricks)

  • Self-Adaptive Agents: Auto-retraining or config updates based on performance and usage signals

  • Scaling Evaluation: Shift toward LLM-based judges, task-specific metrics, and scalable human review

  • Agents as Collaborative Systems: Agents sharing tools, memory, and communicating to solve complex tasks

Top comments (0)