Skip to main content

Comprehensive governance framework for AI agents operating in FERPA, HIPAA, GDPR, GLBA, ISO 42001, and 10+ regulated environments

Project description

regulated-ai-governance

CI PyPI Python License Downloads


The problem this solves

AI agents in regulated environments (FERPA, HIPAA, GLBA) can access and process data they are not authorized to see. Standard agent frameworks — CrewAI, AutoGen, LangChain, Semantic Kernel — have no concept of regulated industry access control. When you deploy an agent in a higher-education, healthcare, or financial-services environment, the framework will not tell you whether the agent is allowed to access a record type, who must approve an export, or how to produce the audit record the regulation requires. This library provides those answers as composable Python primitives, with pre-built policy adapters for each major framework that enforce authorization before any action executes.


Architecture

CrewAI / AutoGen / Semantic Kernel / LangChain Agent
     │
     ▼
EnterpriseActionGuard / PolicyEnforcingAgent / GovernanceCallback
(wraps your tool or callback — drop-in replacement)
     │
     ├─ ActionPolicy.can_run(action_name)? ─────────────────────┐
     │        ├─ Permitted ────────────────────► Execute         │
     │        ├─ Escalation required ──────────► Block + notify │
     │        └─ Denied ──────────────────────► PolicyViolation │
     │                                                           │
     └─ GovernanceAuditRecord ───────────────────────────────────┘
          regulation citation + action_name + actor_id
          permitted / denied / escalated + timestamp
          → audit_sink (durable compliance log)

Installation

pip install regulated-ai-governance

With framework integrations:

pip install "regulated-ai-governance[crewai]"
pip install "regulated-ai-governance[langchain]"
pip install "regulated-ai-governance[autogen]"
pip install "regulated-ai-governance[llama-index]"
pip install "regulated-ai-governance[semantic-kernel]"
pip install "regulated-ai-governance[haystack]"

30-second example: CrewAI + FERPA

from regulated_ai_governance.integrations.crewai import EnterpriseActionGuard
from regulated_ai_governance.regulations.ferpa import make_ferpa_student_policy

guard = EnterpriseActionGuard(
    wrapped_tool=MyTranscriptTool(),           # your existing CrewAI tool
    policy=make_ferpa_student_policy(
        allowed_record_categories={"academic_record"}
    ),
    regulation="FERPA",
    actor_id="stu-alice",                      # from verified session token
    audit_sink=lambda rec: write_to_db(rec),   # wire to durable compliance store
    block_on_escalation=True,
)

agent = Agent(tools=[guard], ...)  # drop-in replacement — no other changes needed

Every call to guard emits a GovernanceAuditRecord whether permitted or denied, suitable for direct insert into a 34 CFR § 99.32 disclosure log.


Framework support

Framework Adapter Class Install Extra
CrewAI EnterpriseActionGuard [crewai]
AutoGen PolicyEnforcingAgent [autogen]
Semantic Kernel PolicyKernelPlugin [semantic-kernel]
LangChain GovernanceCallbackHandler [langchain]
Haystack via enterprise-rag-patterns

Regulations supported

Regulation Status Audit Citation
FERPA (34 CFR § 99) Implemented 34 CFR § 99.32 disclosure log
HIPAA (45 CFR § 164) Implemented 45 CFR § 164.312(b) access controls
GLBA (16 CFR § 314) Implemented 16 CFR § 314.4(e) safeguards
GDPR Implemented Art. 17, Art. 22 automated decision
CCPA Planned Cal. Civ. Code § 1798.100
SOC 2 Planned CC6.1 logical access controls

Quick start: HIPAA and GLBA

from regulated_ai_governance.regulations.hipaa import make_hipaa_treating_provider_policy
from regulated_ai_governance import GovernedActionGuard

# HIPAA — clinical decision support agent
policy = make_hipaa_treating_provider_policy(
    escalate_external_share_to="hipaa_privacy_officer"
)
guard = GovernedActionGuard(policy=policy, regulation="HIPAA", actor_id="nurse-001")
result = guard.guard("read_lab_results", lambda: {"hba1c": 6.2})
# → {"hba1c": 6.2}
from regulated_ai_governance.regulations.glba import make_glba_customer_service_policy

# GLBA — customer-service chatbot
policy = make_glba_customer_service_policy()
guard = GovernedActionGuard(policy=policy, regulation="GLBA", actor_id="cust-7890")
guard.guard("read_account_balance", lambda: {"balance": "$1,240.00"})
# → {"balance": "$1,240.00"}

Audit records

Every guard evaluation emits a GovernanceAuditRecord:

print(audit_log[0].to_log_entry())
# {
#   "record_id": "a3f8...",
#   "regulation": "FERPA",
#   "actor_id": "stu-alice",
#   "action_name": "read_academic_record",
#   "permitted": true,
#   "denial_reason": null,
#   "escalation_target": null,
#   "policy_version": "1.0",
#   "timestamp": "2026-04-11T14:30:00+00:00"
# }

JSON-serializable, suitable for direct insert into a compliance database per 34 CFR § 99.32 (FERPA), 45 CFR § 164.312(b) (HIPAA), or 16 CFR § 314.4(e) (GLBA).


Ecosystem

See ECOSYSTEM.md for the full regulation and framework coverage matrix.


Contributing

Contributions are welcome. Please read CONTRIBUTING.md for guidelines. Run pytest tests/ -v to verify your changes before opening a pull request.


Citation

If you use these patterns in research or production, please cite:

@software{rana2026rag,
  author    = {Rana, Ashutosh},
  title     = {regulated-ai-governance: Policy enforcement for AI agents in regulated environments},
  year      = {2026},
  url       = {https://github.com/ashutoshrana/regulated-ai-governance},
  license   = {MIT}
}

Or use GitHub's "Cite this repository" button above (reads CITATION.cff).


Part of the enterprise AI patterns trilogy

Library Focus Regulation
enterprise-rag-patterns What to retrieve FERPA identity-scoped RAG
regulated-ai-governance What agents may do FERPA, HIPAA, GLBA, GDPR, CCPA, SOC2
integration-automation-patterns How data flows Event-driven enterprise integration

License

MIT — see LICENSE.

Project details


Download files

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

Source Distribution

regulated_ai_governance-0.23.0.tar.gz (138.2 kB view details)

Uploaded Source

Built Distribution

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

regulated_ai_governance-0.23.0-py3-none-any.whl (98.3 kB view details)

Uploaded Python 3

File details

Details for the file regulated_ai_governance-0.23.0.tar.gz.

File metadata

  • Download URL: regulated_ai_governance-0.23.0.tar.gz
  • Upload date:
  • Size: 138.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for regulated_ai_governance-0.23.0.tar.gz
Algorithm Hash digest
SHA256 b4c5006d177113d2b22704fef94548f1dac2df73d65adde9fcb4a5b61d80b1d1
MD5 bd149e9b3fde0ac9a58bac77c6e85796
BLAKE2b-256 3cc9e8a89e7b665b8eab540d71fd652905d3f74912cfa9b7b5ef1b3c1bc1dc86

See more details on using hashes here.

Provenance

The following attestation bundles were made for regulated_ai_governance-0.23.0.tar.gz:

Publisher: publish.yml on ashutoshrana/regulated-ai-governance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regulated_ai_governance-0.23.0-py3-none-any.whl.

File metadata

File hashes

Hashes for regulated_ai_governance-0.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 674c3f74c133b204c042efe627169243796302b22808ee1df7508e8f8603e09a
MD5 7234af7fd0f749af9ad1b5c480ffad40
BLAKE2b-256 a412fc64cdcb5e27b3b4ebed736cbf9eab5ad93fb2e98ec8abdf68885bb2c388

See more details on using hashes here.

Provenance

The following attestation bundles were made for regulated_ai_governance-0.23.0-py3-none-any.whl:

Publisher: publish.yml on ashutoshrana/regulated-ai-governance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page