building autonomous data agents

The Age of Autonomous Data Agents

The age of autonomous data agents is almost here. Across analytics, governance, quality, and engineering, data teams are beginning to build and deploy AI agents that can autonomously navigate and act on enterprise data. What they’re finding is that the hard part isn’t standing up an agent, but rather it’s giving it enough context to make good decisions consistently. LLMs can generate SQL and orchestrate workflows, but without business context they’re flying blind. Which table should the agent use? What does “tier 1 customer” actually mean? Is Q3 calendar year or fiscal year? When agents lack access to institutional knowledge, wrong answers and eroded trust follow fast.

DataHub solves this by aggregating context and knowledge about your data — where it lives, who owns it, how it’s used, where it comes from, what business processes it is important for — into a Context Graph that gives agents a real-time picture of your entire data supply chain. The new DataHub Agent Context Kit builds on this graph, providing tools that make it easy for any agent to explore your data, understand its meaning, and make high-quality decisions.

What is DataHub Agent Context Kit?

The DataHub Agent Context Kit is a python package datahub-agent-context and a set of runbooks that help you build enterprise data agents on top of DataHub context. The package allows tools to be embedded directly in the agent and customized for your specific needs. The full toolset can be also included via DataHub’s MCP (Model Context Protocol) server.

Some of the key tools that the agent provides include:

Building Agents with Agent Context Kit

DataHub can equip AI agents to navigate your enterprise data ecosystem and institutional knowledge with ease. Here are four example types of agents that you can build with DataHub:

This post will do a deep dive on the Data Analytics Agent use case with Snowflake Cortex Code and LangChain as our first examples.

Example: Building an Autonomous Data Analytics Agent

Imagine a business analyst asks an analyst agent to track net revenue retention by customer segment in Q4, excluding one-time discounts and credits. This is how an AI agent would solve this:

  1. The agent needs to define "net retention revenue", "one-time discount and credit", and "customer segment".
  2. It must find existing tables, columns, dashboards, etc., that contain the required data.
  3. The agent generates SQL and pushes it to the data warehouse.

Where DataHub comes in is by providing the context needed for agents to solve problems without human intervention.

Building an Agent with Snowflake

Snowflake has two ways of building agents on its platform: Snowflake Cortex Agents and Snowflake Cortex Code.

Getting Started with Cortex Code

Snowflake Cortex Code is a no-code tool for building agents with access to both semantic context from DataHub and raw SQL execution. The Cortex Code CLI supports MCP out of the box and can fetch context from DataHub’s MCP server.

Getting Started with Cortex Agents

DataHub can also integrate with Snowflake Cortex Agents via a set of UDFs. The DataHub-agent-context[snowflake] add-on package deploys the Snowflake DataHub connectors into your account and creates an agent.

Building an Agent with LangChain

If you want a fully custom experience, a flexible framework such as LangChain may be ideal. The DataHub Agent Context Kit has two ways to integrate with LangChain:

  1. Using the SDK to bundle tools directly into the agent.
  2. Connecting to DataHub’s MCP server from a LangChain agent.

Getting Started with LangChain Agents

To start with LangChain, install the pip package datahub-agent-context[langchain] and configure a DataHubClient.

from DataHub.sdk.main_client import DataHubClient
from DataHub_agent_context.langchainhain_tools import build_langchainhain_tools
from LangChain_openai import ChatOpenAI
from LangChain.agents import AgentExecutor, create_tool_calling_agent
from LangChain.prompts import ChatPromptTemplate

# Initialize DataHub client
client = DataHubClient.from_env()

# Build DataHub OSS tools (read-only)
tools = build_langchainhain_tools(client, include_mutations=False)

# Initialize LLM
llm = ChatOpenAI(
    model="gpt-5.3",
    temperature=0,
    openai_api_key="YOUR_OPENAI_KEY"
)

# Create agent prompt
prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful data catalog assistant with access to DataHub metadata. ..."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

# Create agent
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(
    agent=agent,
    tools=tools,
    verbose=True,
    handle_parsing_errors=True
)

# Use the agent
def ask_DataHub(question: str):
    result = agent_executor.invoke({"input": question})
    return result["output"]

Approaches for Building Agents

We discussed two possible tools out of many options available today. Examples of no/low code solutions include Snowflake Cortex Code, Databricks Genie, Google Vertex AI builder, while higher touch frameworks include LangChain, Google ADK, CrewAI, etc.

Building Agents on Other Frameworks

The DataHub Agent Context Kit can integrate with all agent tools and platforms. Integration details can be found on the Agent Context Kit docs website.

What’s Next

Next, we will discuss other agents you can build with DataHub Agent Context Kit, including Data Quality Agent, Data Steward Agent, and Data Engineering Agent. Get started with the agent-context-kit today.