Skip to main content

The Governance-First Framework for Agentic AI

Project description

govAgent: Enterprise-Grade AI Governance Framework

The Governance-First Framework for Production-Grade Autonomous Systems.

GovAgent provides a high-abstraction Control Plane for agentic AI. With a clear chain of accountability, this lightweight framework helps move autonomous systems from experimental sandboxes into governed, production environments.

ImagegoV

The v0.3.0 "Institutional Scaling" update transforms the framework into an automated gatekeeper, introducing thread-safe context management and declarative tool protection, allowing for the rapid deployment of governed "AI Swarms."


🏗️ Core Pillars: The Chain of Accountability

GovAgent replaces "Black Box" reasoning with a transparent, governed loop:

  1. Policy (The Law): Declarative boundaries and "Rules of Engagement" defined by stakeholders in policy.yaml.
  2. Guards (The Enforcement): Real-time circuit breakers that intercept agent intent before API execution to prevent budget or security breaches.
  3. HITL (The Judiciary): Synchronous Human-in-the-Loop escalation. High-risk actions are physically blocked until an explicit "Approve" or "Reject" signal is received via Slack or CLI.
  4. Telemetry (The Evidence): Forensic-grade audit trails providing an immutable ledger of compliance and real-world ROI.

⚖️ Regulatory Compliance: EU AI Act (Regulation 2024/1689)

GovAgent is engineered to facilitate compliance for High-Risk AI Systems as defined under the EU AI Act. The framework provides the technical primitives required to satisfy key transparency and oversight mandates:

  • Article 14: Human Oversight
    Native Synchronous HITL (Human-in-the-Loop) adapters ensure that high-risk tool execution is physically gated by natural persons in real-time.

  • Article 9: Risk Management System
    Automated, policy-driven enforcement (via policy.yaml) identifies and mitigates operational and financial risks prior to tool deployment.

  • Article 12: Record-Keeping & Traceability
    Immutable Forensic Telemetry captures the full "Chain of Accountability," including agent reasoning, tool parameters, and the identity of the human overseer who authorized the action.

  • Article 13: Transparency & Provision of Information
    Automated generation of Execution Snapshots allows for the clear explanation of AI-driven outputs to end-users and regulators.


🛠️ Key Capabilities (v0.3.0)

  • 🛡️ Invisible Governance: Declarative tool protection via the @tool decorator. Guards are injected automatically at runtime.
  • 🏢 Institutional Bootstrap: Single-line initialization (ExecutiveAgent.bootstrap()) for rapid enterprise setup.
  • 🧵 Thread-Safe Scaling: contextvars support enables multi-agent swarms without identity or budget leakage.
  • 🛑 Terminal Integrity: Built-in "Hard Stop" logic prevents infinite reasoning loops after a rejection or fiscal breach.

📖 Advanced Usage: High-Abstraction Governance

In an enterprise environment, GovAgent acts as your digital "Control Plane" for high-stakes workflows like healthcare claim processing.

1. Define a Governed tool (Pillars 2 & 3)

from govagent import tool

@tool(name="execute_financial_transaction", guards=["fiscal", "judiciary"], risk_level="high")
async def process_payment(amount: float, reference_id: str):
    """Executes a financial disbursement. Injected guards handle Pillar 2 & 3 automatically."""
    return f"SUCCESS: Paid ${amount} for Ref: {reference_id}"

2. The Institutional session (Pillars 1 & 4)

import asyncio
from langchain_openai import ChatOpenAI
from govagent import ExecutiveAgent

async def run_governed_session():
    # Load Policy (Pillar 1) & Initialize Session
    agent = ExecutiveAgent.bootstrap(
        policy_path="policies/finance_policy.yaml",
        llm=ChatOpenAI(model="gpt-4o"),
        slack_channel="C12345" # Judiciary Link
    )

    # Telemetry (Pillar 4) is captured automatically during execution
    task = "Process a reimbursement for claim #882 in the amount of $1200."
    report = await agent.execute(task)
    
    print(f"🏁 Session Status: {report.status}")

📊 Forensic Telemetry: Article 12 Readiness

Every session generates an immutable JSONL snapshot in /logs/audit_trail.jsonl.

{
  "timestamp": "2026-05-06T12:24:25",
  "persona": "Healthcare Finance Director",
  "task": "Process claim #7742 for $1,250.00",
  "guards_evaluated": ["fiscal", "policy", "judiciary"],
  "decision": "Approved by Judiciary (Slack)",
  "metadata": {
    "tokens": 450,
    "cost_usd": 0.009,
    "intent": {"action": "authorize_claim_payment", "params": {"amount": 1250.0}}
  }
}

🗺️ Strategic Roadmap

✅ v0.3.0: Institutional Scaling (Current)

  • Automated Interception: Declarative tool protection via decorators.
  • Context Management: Thread-safe multi-agent session tracking.
  • Terminal Logic: Loop-breaking safety for judiciary rejections.

🚀 v0.4.0: The "Sovereign Swarm" (Next)

  • Recursive Fiscal Ceilings: Multi-agent TCO (Total Cost of Operation) guardrails.
  • Cloud Exporters: Native integration for AWS CloudWatch and Azure Monitor.
  • Dynamic Budgeting: Real-time API pricing for penny-accurate cost tracking.---

⚙️ Installation

GovAgent is designed to be lightweight and modular. You can install the core framework or include specific integrations as needed.

1. Core Installation (Lightweight)

Recommended for users building custom agents or those who only require the Judiciary and Policy layers.

pip install govagent

2. Full Integration (With LangChain)

Includes all dependencies required to run governed LangChain sessions, including the langchain_tool wrappers and OpenAI clients.

pip install "govagent[langchain]"

3. Development Installation

If you are contributing to the framework or running the examples in this repository, install in editable mode:

git clone [https://github.com/thekakodkar/govagent.git](https://github.com/thekakodkar/govagent.git)
cd govagent
pip install -e ".[langchain]"

🚀 Quick Setup

Ensure your .env file is configured with the necessary tokens for the Judiciary Layer to function:

Code snippet

Slack Credentials (Socket Mode)

SLACK_BOT_TOKEN=xoxb-your-token SLACK_APP_TOKEN=xapp-your-token SLACK_CHANNEL_ID=C12345678

Model Provider

OPENAI_API_KEY=sk-your-key


"Governance is not a constraint; it is the catalyst for enterprise AI adoption."

Author Stamp

  • Framework: GovAgent v0.2.3 (Stable)
  • Status: Active / Open-Source Standard
  • Compliance: Designed for Enterprise-Grade Accountability

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

govagent-0.3.0.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

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

govagent-0.3.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file govagent-0.3.0.tar.gz.

File metadata

  • Download URL: govagent-0.3.0.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for govagent-0.3.0.tar.gz
Algorithm Hash digest
SHA256 de4e4a0c1c62b6299df0391836ef3e0450c89311b8a1a07ba7f6106cceb9b498
MD5 1d2edf376aaf02b748b8b915d340b3b4
BLAKE2b-256 c713e38afb743ce0b25993525c3d3c25b0876160c038b6814e83042e5e419148

See more details on using hashes here.

File details

Details for the file govagent-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: govagent-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for govagent-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31f403a23e859f4f48aca9e69f5912a08ef9bff9a16be660d4bc027f3771c75a
MD5 5ea2b8c3cb30b048e553bfa688c1a12a
BLAKE2b-256 64cc910950695a1a9c4e8790d861c379aa795b4ffe30d8cd47d9989483f401d1

See more details on using hashes here.

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