Inspiration

Most agent demos jump from tool access to action too quickly. In real data platforms, missing definitions, uncertain ownership, and hidden lineage make a plausible agent response dangerous. CAT was built around the idea that an agent should understand context and verify outcomes before anyone trusts its action.

What it does

CAT Context Agent turns metadata gaps into safe, traceable remediation. The live demo reads analytics.daily_revenue from DataHub OSS through the official MCP server, inspects its schema and upstream lineage, and identifies an unsafe missing definition for net_revenue.

CAT then prepares the smallest useful correction, fingerprints its exact scope, and requires human approval before writing. The first approved 159-character definition appeared to succeed, but live readback exposed that DataHub had stored only 120 characters. CAT rejected the partial result, refused to reuse the old approval, produced a semantically complete 116-character correction, required a second exact approval, applied it, and verified every character in the live graph.

In plain English: CAT does not treat a successful tool response as proof. It checks what actually happened.

How we built it

We run DataHub OSS locally and connect through the official mcp-server-datahub package. CAT wraps DataHub mutation tools with:

  • Official MCP schema, entity, and lineage reads
  • Fingerprinted proposal scopes
  • Before-state validation
  • Explicit human approval receipts
  • Exact post-write readback verification
  • Idempotency and fail-closed behavior
  • Bounded evidence that never stores credentials

A public Next.js experience renders the committed live proof. Deterministic fixture scripts let judges reproduce the broader decision, approval, and safety chain without credentials, while the repository preserves the authenticated live DataHub evidence and receipts.

Why DataHub matters

DataHub is the agent's context and system of record. It tells CAT what a field means, what feeds it, and what downstream work may depend on it. CAT then contributes the approved correction back to that graph so the next person or agent inherits better context.

Without that shared context, an agent can confidently make a wrong business decision. CAT adds the control layer: understand the data, prove permission, act within scope, and verify the result.

Challenges we ran into

The hardest problem became our strongest proof. Our first approved write returned successfully, but the catalog held only 120 of the approved 159 characters. CAT caught the mismatch through live readback instead of falsely reporting success. Because the replacement text changed, CAT required a new approval rather than silently retrying under the old authorization.

Accomplishments

The project demonstrates meaningful DataHub use end-to-end:

  • Official MCP entity, schema, and lineage reads
  • A real DataHub graph writeback
  • Detection of a partial write through exact readback
  • Separate approval for the corrected scope
  • Verified 116/116-character final state
  • Append-only proposal, approval, failure, and outcome receipts
  • A public demo, public Apache-2.0 repository, public 1:38 video, reproducible evidence, and 40 passing tests

What we learned

The strongest agent pattern is not maximum autonomy. It is better context, better refusal, and better receipts. DataHub makes that possible by giving the agent a structured, shared graph to understand before acting and improve after acting.

What's next

Next we will generalize the proven single-field loop into a reusable DataHub skill that ranks metadata gaps by lineage impact, routes proposed fixes to verified owners, and writes back only separately approved corrections and receipts.

Built With

  • ai-agents
  • approval-workflows
  • data-governance
  • data-lineage
  • datahub
  • datahub-mcp-server
  • datahub-oss
  • mcp
  • metadata
  • next.js
  • node.js
  • typescript
Share this project:

Updates