Metadata-Version: 2.4
Name: datahub-agent-context
Version: 1.6.0.10rc2
Summary: MCP tools for AI agents to search and query your DataHub metadata catalog — works with Claude, Cursor, Copilot, and any MCP-compatible AI assistant
Home-page: https://datahub.com/
License: Apache License 2.0
Project-URL: Documentation, https://docs.datahub.com/
Project-URL: Source, https://github.com/datahub-project/datahub
Project-URL: Changelog, https://github.com/acryldata/datahub/releases
Project-URL: Releases, https://github.com/acryldata/datahub/releases
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Environment :: Console
Classifier: Environment :: MacOS X
Classifier: Topic :: Software Development
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: acryl-datahub[datahub-rest]==1.6.0.6
Requires-Dist: pydantic<3.0.0,>=2.0.0
Requires-Dist: jmespath<2.0.0,>=1.0.0
Requires-Dist: json-repair<1.0.0,>=0.25.0
Requires-Dist: cachetools<7.0.0,>=5.0.0
Requires-Dist: google-re2<2.0,>=1.0
Requires-Dist: httpcore<2.0,>=1.0.9
Requires-Dist: h11<1.0,>=0.16
Provides-Extra: dev
Requires-Dist: pytest-cov<7.0.0,>=2.8.0; extra == "dev"
Requires-Dist: click<9.0.0,>=8.0.0; extra == "dev"
Requires-Dist: types-toml<1.0.0,>=0.10.0; extra == "dev"
Requires-Dist: langchain<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: google-adk<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: tox<5.0.0,>=4.0.0; extra == "dev"
Requires-Dist: types-jmespath<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: types-cachetools<7.0.0,>=5.0.0; extra == "dev"
Requires-Dist: types-PyYAML<7.0.0,>=6.0.0; extra == "dev"
Requires-Dist: snowflake-connector-python<5.0.0,>=4.0.0; extra == "dev"
Requires-Dist: langchain-core<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: mypy==1.17.1; extra == "dev"
Requires-Dist: types-requests<3.0.0,>=2.0.0; extra == "dev"
Requires-Dist: langchain-mcp-adapters<1.0.0,>=0.1.0; extra == "dev"
Requires-Dist: ruff==0.11.7; extra == "dev"
Requires-Dist: pytest<9.0.0,>=8.3.4; extra == "dev"
Provides-Extra: langchain
Requires-Dist: langchain<2.0.0,>=1.0.0; extra == "langchain"
Requires-Dist: langchain-core<2.0.0,>=1.0.0; extra == "langchain"
Requires-Dist: langchain-mcp-adapters<1.0.0,>=0.1.0; extra == "langchain"
Provides-Extra: google-adk
Requires-Dist: google-adk<2.0.0,>=1.0.0; extra == "google-adk"
Provides-Extra: snowflake
Requires-Dist: snowflake-connector-python<5.0.0,>=4.0.0; extra == "snowflake"
Requires-Dist: click<9.0.0,>=8.0.0; extra == "snowflake"
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

<!-- PyPI long description. Keep concise, feature-discovery-first. -->

# DataHub Agent Context

**MCP tools for AI agents to search and query your DataHub metadata catalog** — works with Claude, Cursor, Copilot, and any MCP-compatible AI assistant.

## What you can do

- **Search** datasets, dashboards, pipelines, and other data assets by name or description
- **Retrieve entity details** — schema, lineage, ownership, tags, glossary terms, and more
- **Trace lineage** upstream and downstream across your data assets
- **Mutate metadata** — update descriptions, tags, owners, domains, and glossary terms
- **Build LangChain or Google ADK agents** with pre-built tool bindings
- **Set up Snowflake AI agents** with one CLI command

## Installation

```bash
pip install datahub-agent-context

# With LangChain support
pip install "datahub-agent-context[langchain]"
```

## Quickstart

### LangChain agent

```python
from datahub.sdk.main_client import DataHubClient
from datahub_agent_context.langchain_tools import build_langchain_tools

client = DataHubClient.from_env()

# Read-only tools (search, lineage, entity details)
tools = build_langchain_tools(client, include_mutations=False)

# Include write tools (tags, descriptions, owners, etc.)
tools = build_langchain_tools(client, include_mutations=True)

# DataHub Cloud: add Ask DataHub AI assistant
from datahub_agent_context.langchain_tools import build_langchain_cloud_tools
tools += build_langchain_cloud_tools(client, ask_datahub=True)
```

### Snowflake AI agent setup

```bash
datahub agent create snowflake \
  --datahub-url https://your-datahub-instance \
  --datahub-token your-token
```

## Available tools

**Search** — `search()`, `search_documents()`, `grep_documents()`

**Entities** — `get_entities()`, `list_schema_fields()`

**Lineage** — `get_lineage()`, `get_lineage_paths_between()`

**Queries** — `get_dataset_queries()`

**Mutations** — `add_tags()`, `remove_tags()`, `update_description()`, `set_domains()`, `add_owners()`, `add_glossary_terms()`, `add_structured_properties()`, `save_document()`

**Cloud-only** — `ask_datahub_chat()` (DataHub Cloud AI assistant)

## Links

- [Documentation](https://docs.datahub.com/)
- [GitHub](https://github.com/datahub-project/datahub)
- [Slack community](https://datahub.com/slack)
