custom-langgraph-schema-driver(Python)

Loading...

LangGraph custom schema driver notebook

This notebook shows you how to log, register, and deploy a LangGraph AI agent compatible with Mosaic AI Agent Framework that accepts custom inputs and returns custom outputs.

To ensure compatibility, the agent must conform to Mosaic AI Agent Framework schema requirements, see (AWS | Azure).

Model-as-code notebook

Mosaic AI Agent Framework uses MLflows Models-as-code development workflow, which requires two notebooks:

  • A driver notebook that logs, registers, and deploys the agent (this notebook)
  • An agent notebook that defines the agent's logic
    • You can find the agent notebook for this driver, custom-langgraph-schema-agent, on Databricks documentation (AWS | Azure)

For more information on Model-as-code, see MLflow's Models as code guide.

Requirements

This notebook requires a Unity Catalog enabled workspace.

NOTE: This notebook uses LangGraph, but Mosaic AI Agent Framework is compatible with other agent authoring frameworks, like LlamaIndex.

2

Log the agent as an MLflow model

Log the agent as code from the agent notebook. See MLflow - Models from Code.

4

Register the model to Unity Catalog

Update the catalog, schema, and model_name below to register the MLflow model to Unity Catalog.

6

Deploy the agent

8