> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brighthive.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Governance Agent

> The Governance Agent tracks data quality, manages metadata, and maintains lineage across your data estate.

## Overview

The Governance Agent ensures your data is trustworthy, well-documented, and traceable. It connects to **OpenMetadata** for catalog operations, uses **Neo4j** for lineage tracking, and runs **data quality validations** — giving you confidence that the data behind your decisions is accurate and compliant.

## What You Can Ask

* *"Show me the lineage for the revenue table"*
* *"What tags are applied to our customer data?"*
* *"List all databases in our workspace"*
* *"Run a quality check on the orders dataset"*
* *"Generate a description for the marketing\_leads table"*
* *"What glossary terms do we have for financial data?"*

## How It Works

```mermaid theme={null}
graph TD
    A[Your Request] --> B[BrightAgent]
    B --> C[Governance Agent]
    C --> D{Request Type}
    D -->|Metadata & Catalog| E[OpenMetadata MCP Tools]
    D -->|Data Quality| F[Quality Validation Workflow]
    D -->|Lineage| G[Neo4j Graph Queries]
    D -->|Descriptions| H[Description Generation]
    E --> I[Results Returned]
    F --> I
    G --> I
    H --> I
```

1. **You ask a governance question** — Anything about data quality, metadata, lineage, tags, glossaries, or catalog operations.
2. **Intent is classified** — The agent determines whether you need metadata lookup, quality validation, lineage tracing, or description generation.
3. **Right tools are invoked** — OpenMetadata MCP tools for catalog operations, Great Expectations for quality checks, or Neo4j for lineage queries.
4. **Results are delivered** — Quality reports, lineage paths, metadata details, or updated descriptions are returned in a clear format.

## Key Capabilities

<CardGroup cols={2}>
  <Card title="Data Quality Validation" icon="shield-check">
    Runs automated quality checks using **Great Expectations** — completeness, accuracy, consistency, and freshness — with detailed per-column reports.
  </Card>

  <Card title="Lineage Tracking" icon="code-branch">
    Traces data from source through transformation to consumption via **Neo4j** graph queries. Know exactly where every data point comes from and what depends on it.
  </Card>

  <Card title="Metadata Catalog" icon="tags">
    Connects to **OpenMetadata** for full catalog operations — browse databases, search entities, explore schemas, manage tags, glossaries, and classifications.
  </Card>

  <Card title="Description Generation" icon="pen-to-square">
    Automatically generates business-friendly descriptions for data assets using AI analysis of metadata and sample data — then updates your catalog.
  </Card>
</CardGroup>

## Catalog Operations

The Governance Agent connects to **OpenMetadata** via MCP (Model Context Protocol) for comprehensive catalog operations:

| Category                   | What You Can Do                                                   |
| -------------------------- | ----------------------------------------------------------------- |
| **Tables & Schemas**       | Browse tables, schemas, and databases across your workspace       |
| **Search & Discovery**     | Search entities semantically, get suggestions for matching assets |
| **Tags & Classifications** | List and explore tags, classifications, and their assignments     |
| **Glossaries**             | Browse business glossaries and terms for shared vocabulary        |
| **Test Cases**             | View existing data quality test cases and test suites             |
| **Lineage**                | Trace upstream and downstream dependencies for any entity         |

## Data Lifecycle

```mermaid theme={null}
graph TD
    A[Data Created / Uploaded] --> B[Auto-Cataloged in Neo4j]
    B --> C[Schema Discovered by Glue]
    C --> D[Registered in OpenMetadata]
    D --> E[Quality Assessment]
    E --> F[Description Generated]
    F --> G[Tags & Classifications Applied]
    G --> H[Available for Analysis]
    H --> I[Lineage Tracked End-to-End]
```

## How Lineage Works

Neo4j tracks relationships between every entity in your data estate:

* **Data Assets** — What tables, files, and datasets exist across all sources
* **Organizations** — Which organization provided the data
* **Workspaces** — Which workspaces consume and analyze the data
* **Transformations** — How data was transformed (dbt models, Glue crawlers, SQL queries)
* **Users** — Who accessed and modified what, and when

When you ask *"Where does this metric come from?"*, the Governance Agent traverses the Neo4j graph to show the complete lineage path from raw source to final report.

## Human-in-the-Loop

Quality validations include a **human-in-the-loop** step:

1. The agent analyzes your dataset and generates recommended quality expectations
2. You're presented with the list of proposed checks and can **select which ones to run**
3. Only your approved expectations are executed against the data
4. Results are returned with per-column pass/fail status and detailed statistics

This ensures you stay in control of what gets validated and how quality is measured.

## Works With Other Agents

* **Retrieval Agent** — Governance policies determine what data is accessible and discoverable.
* **Engineering Agent** — Transformation lineage is tracked when dbt models are deployed.
* **Analyst Agent** — Quality scores inform confidence in analysis results.
* **Metadata Agent** — Collaborates on catalog maintenance, schema exploration, and data documentation.
* **Quality Agent** — Runs detailed quality validations as part of the governance workflow.

<Callout type="info">
  The Governance Agent is part of the [BrightAgent architecture](/brightagent/architecture). See [capabilities](/brightagent/capabilities) for the full list of what BrightAgent can do.
</Callout>
