BULWARK
DataHub MCP ReadGraph Write-Back Active
Documentation & System Specifications

Bulwark Documentation

Comprehensive reference for integrating Bulwark as an independent governor agent or DataHub Skill in AI agent pipelines.

Using the Hosted Demo

No install, no terminal, no account. Open the console and the worker/governor loop runs against a real, pre-connected DataHub instance.

  1. Open /console.
  2. The status badge shows "DataHub: Hosted Demo Instance · Live" — nothing to configure.
  3. Enter a task description (or leave the default) and click Run.
  4. Proposals stream in as the worker and governor produce them, in real time.
  5. Review any CONTAIN or WARN verdicts and take an action — Accept, Apply Fix, or Override.
Honesty note: the hosted instance depends on whoever is running this Next.js server having a reachable DataHub configured. If it's ever unreachable, the console falls back to fixture data and says so explicitly in the status badge — it never silently fakes a live result.

Connecting Your Own DataHub

Have your own DataHub instance? Point Bulwark at it directly from the browser — nothing server-side to edit.

  1. Open /console and expand "Bring your own DataHub".
  2. Paste your DataHub GMS URL (e.g. https://your-datahub.example.com).
  3. Optionally add a personal access token if your instance requires auth.
  4. Click Test Connection and wait for the green "Connected" message.
  5. Enter a task description and click Run — your own DataHub lineage now drives every governor verdict.

Your URL and token are tested server-side and kept in your browser's local storage only — never logged, never sent anywhere but your own DataHub instance. Use "Reset to hosted instance" in the panel to disconnect at any time.

System Overview

Bulwark is an AI Data Governance & Supervision System that enforces Separation of Powers for AI data agents working on production data stacks.

Instead of letting a solo AI agent execute unchecked database migrations or schema alterations, Bulwark acts as an independent Governor agent. It intercepts proposals, inspects end-to-end lineage via mcp-server-datahub, protects production ML models, and writes metadata verdicts back to DataHub.

Separation of Powers Thesis

┌─────────────────────────┐         proposes change        ┌──────────────────────────────┐
│   WORKER AGENT          │ ─────────(intercepted)────────▶│   GOVERNOR AGENT (BULWARK)   │
│  (simple; does the work)│                                 │  (smart; protects production)│
└─────────────────────────┘                                 │  reads END-TO-END LINEAGE    │
                                                            │  reasons, contains, fixes,   │
                                                            │  WRITES BACK to DataHub      │
                                                            └──────────────┬───────────────┘
                                                                           │
                                             Reads via mcp-server-datahub  │  Writes back tags via SDK
                                                                           ▼
                                                      ┌────────────────────────────────────┐
                                                      │            DATAHUB                 │
                                                      │  MCP: search, get_lineage,          │
                                                      │  get_entities, ML lineage          │
                                                      │  Mutation: add_tags / aspects      │
                                                      └────────────────────────────────────┘

5-Step Interception Pipeline

01

Intercepts Proposals: Catches proposed schema changes (`DROP COLUMN`, `ALTER TYPE`) before DB execution.

02

Queries DataHub MCP: Fetches 5-hop downstream lineage paths using mcp-server-datahub.

03

Evaluates Blast Radius: Assesses breaking impact on production ML models (`billing_risk_model`, `churn_model`).

04

Generates SQL Fix: Synthesizes safe table migration SQL scripts and owner notification plans.

05

Writes Back to Graph: Emits urn:li:tag:bulwark-contain aspect tags onto DataHub entities.

DataHub MCP Server Integration

Bulwark communicates with mcp-server-datahub (v0.6.0) using standard Model Context Protocol JSON-RPC endpoints:

// MCP Protocol Calls:

1. get_lineage(urn, direction="DOWNSTREAM")

2. get_entities(urns=[dataset_urn])

3. search(query="billing_risk_model")

Open-Source DataHub Skill Package

Located in skills/pre-flight-lineage-guard/:

from skills.pre_flight_lineage_guard import PreFlightLineageGuard

guard = PreFlightLineageGuard(mcp_url="http://localhost:8080")
verdict = guard.evaluate_proposal(kind="drop_column", dataset="PROD.users", column="user_region")

Self-Hosting Bulwark

Want to run Bulwark itself, not just point it at your DataHub? That's a developer path — cloning the repo, installing the Python and Node dependencies, and running the agent and the console locally. See the README for setup steps.