Skip to main content

amu-governance

DOI Paper

Lineage-gated shared memory for multi-agent analytics.

Shared memory across AI agents improves efficiency but introduces two failure modes: an agent can retrieve an insight derived from columns it isn't permitted to see (column-level leakage), and two teams can compute the same KPI through divergent derivation paths with the wrong definition propagating silently (metric-definition conflict).

amu-governance implements the Analytical Memory Unit (AMU) — a cached result tagged with its full derivation lineage — and a lineage-gated retrieval policy that blocks unsafe reuse and flags definition conflicts, instead of gating on static content/access labels the way existing governed shared-memory systems do.

This is the reference implementation accompanying the paper "Lineage-Aware Memory Governance: A Derivation-Gated Framework for Privacy-Preserving Column-Level Access Control in Enterprise AI Agents" (Sangaraju & Vissa), published in IEEE Access (Early Access, open access). The paper's full experiment/benchmark suite lives in a separate research repository: https://github.com/sangaraju1988/Lineage-Aware-Memory. This repository contains only the reusable software.

Install

pip install -e .          # from a local clone, until published to PyPI

Requires Python 3.9+ and sqlglot (installed automatically) for the optional SQL lineage extractor.

Quick start

from amu_governance import AMU, GovernancePolicy, Lineage, LineageStep, LineageAwareSystem

policy = GovernancePolicy(
    sensitive_columns={"income", "ssn"},
    department_permissions={
        "Finance":   {"customer_id", "income", "ssn", "region"},
        "Marketing": {"customer_id", "region"},   # no income, no ssn
    },
)
memory = LineageAwareSystem(policy)

lineage = Lineage(
    steps=(LineageStep("customers", ("customer_id", "income")),),
    filter_logic="income > 100000",
)
amu = AMU("high_value_segment", value=42.0, owner_department="Finance",
          lineage=lineage, epoch=0)
memory.write(amu)

result = memory.request("high_value_segment", requester_department="Marketing",
                         fresh_amu=amu)
# result.blocked  -> True   (income is not in Marketing's permitted columns)
# result.leaked   -> False  (blocked, never served)

See examples/agent_demo/demo.py for a full walkthrough against a real SQLite database, and examples/sql_lineage_demo.py for automatic lineage extraction from executed SQL (no agent self-reporting required).

How it works

  • GovernancePolicy — the only domain-specific configuration: which columns are sensitive, and which departments/roles may see which columns. The same AMU/Lineage/system classes work for any schema by swapping the policy — no subclassing required.
  • Lineage / LineageStep — the derivation path of a cached result: every (table, columns) hop plus the filter/aggregation logic. Sensitivity tags and a definition_hash (SHA-256 over tables + columns + filter logic) are computed from this path.
  • LineageAwareSystem — the governance mechanism (Algorithm 1 in the paper): on retrieval, walk cached AMUs for a metric most-recent-first and serve the first one whose sensitivity tags are a subset of the requester's permitted columns; if none qualify, fall back to fresh, in-scope compute. On write, flag a conflict if a different department already wrote a different definition_hash for the same metric name.
  • sql_lineage.extract_lineage_from_sql — parses executed SQL with sqlglot and returns the tables/columns actually touched, so lineage doesn't depend on an agent accurately self-reporting what it accessed.

Two other systems are included for comparison/benchmarking: NoMemorySystem (no sharing — the pre-shared-memory status quo) and NaiveMemorySystem (shared memory keyed on metric name only, representative of existing content/tag-gated governed-memory systems).

Repository structure

src/amu_governance/
  model.py        AMU, Lineage, LineageStep
  policy.py        GovernancePolicy
  systems.py         NoMemorySystem, NaiveMemorySystem, LineageAwareSystem
  sql_lineage.py       Automatic SQL -> Lineage extraction (sqlglot)
tests/                  pytest unit tests for all of the above
examples/
  agent_demo/            End-to-end SQLite walkthrough
  sql_lineage_demo.py     SQL lineage extraction examples
paper/                  JOSS software paper (paper.md, paper.bib)

Testing

pip install -e ".[dev]"
pytest

Relationship to the research paper

The formal safety guarantee (zero column-level leakage under complete lineage reporting), the TPC-H/synthetic-schema experiments, the fuzzy conflict-detection study, and the statistical analysis are all in the research repository, which depends on this package for its core mechanism. This split exists so the software can be installed, tested, and reused independently of the experiment/reproduction code.

Citation

See CITATION.cff, or cite the paper directly:

@article{sangaraju2026lineage,
  author  = {Venkata Sangaraju and Sudhir Vissa},
  title   = {Lineage-Aware Memory Governance: A Derivation-Gated Framework
             for Privacy-Preserving Column-Level Access Control in
             Enterprise AI Agents},
  journal = {IEEE Access},
  year    = {2026},
  doi     = {10.1109/ACCESS.2026.3730363}
}

To cite this software specifically (e.g. a particular version you built on):

@software{sangaraju2026amu,
  author  = {Venkata Sangaraju and Sudhir Vissa},
  title   = {amu-governance: Lineage-Gated Shared Memory for Multi-Agent Analytics},
  year    = {2026},
  url     = {https://github.com/sangaraju1988/amu-governance},
  doi     = {10.5281/zenodo.21302744}
}

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amu_governance-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amu_governance-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file amu_governance-0.1.0.tar.gz.

File metadata

  • Download URL: amu_governance-0.1.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for amu_governance-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9da5728267d3589e7d8c93f39a82379d2f1a6f2dc32bf16fa2189e3bc98cb965
MD5 b6d479f6f4a0b531c2f05e04e154df19
BLAKE2b-256 bb366628c6b6114906e528ac9c14882230dc39245564e04cf345bef9c1ad185c

See more details on using hashes here.

File details

Details for the file amu_governance-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: amu_governance-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for amu_governance-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a15cfa95276a4edd3c9ab79c6adf0508b39acd233c2b274e0c916d9af1f3d8cc
MD5 6b02153db512bbd8f102b5cafa7f1185
BLAKE2b-256 34faf1aa5c93957fd79aa8dae02241b2ab9983f05b6519f52b59936294245e7b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page