Skip to main content

air-adk-trust

CI

EU AI Act compliance for Google Agent Development Kit (ADK) agents.

Drop-in plugin that adds tamper-evident audit logging, PII detection, prompt injection scanning, and tool policy enforcement to any ADK agent — including multi-agent hierarchies.

Part of the AIR Blackbox trust layer ecosystem.

Quickstart

from air_adk_trust import AIRBlackboxPlugin
from google.adk import Agent

plugin = AIRBlackboxPlugin()
agent = Agent(name="my_agent", model="gemini-2.0-flash", plugins=[plugin])

That's it. Every agent action is now logged to a tamper-evident HMAC-SHA256 audit chain.

Install

pip install air-adk-trust

What It Does

The plugin hooks into all 6 ADK callback points:

Callback What AIR Does
before_agent Start audit record, check risk tier
after_agent Finalize record, seal HMAC chain
before_model Log prompt, scan PII, detect injection
after_model Log response, scan output for PII
before_tool Classify tool risk, enforce policy, check blocked list
after_tool Log result, scan for PII leakage

EU AI Act Coverage

Article Requirement How AIR Covers It
Art. 9 Risk Management Tool risk classification + configurable risk tiers
Art. 10 Data Governance PII detection + optional blocking/redaction
Art. 11 Technical Documentation Structured JSON audit export
Art. 12 Record Keeping HMAC-SHA256 tamper-evident audit chain
Art. 14 Human Oversight Blocked tool lists + confirmation requirements
Art. 15 Robustness Prompt injection detection + loop limits + error tracking

Configuration

from air_adk_trust import AIRBlackboxPlugin, AIRConfig, RiskLevel

config = AIRConfig(
    risk_tier=RiskLevel.HIGH,       # LOW, MEDIUM, HIGH, CRITICAL
    pii_detection=True,              # Scan for emails, SSNs, credit cards, etc.
    block_pii=False,                 # Set True to block prompts with PII
    injection_detection=True,        # Scan for prompt injection attacks
    block_injections=False,          # Set True to block detected injections
    blocked_tools=["shell", "exec"], # Forbidden tool names
    max_consecutive_errors=5,        # Error circuit breaker
    max_loop_iterations=50,          # Loop detection limit
)

plugin = AIRBlackboxPlugin(config=config)

Verify the Audit Chain

# Check chain integrity
result = plugin.verify_chain()
print(result)  # {"valid": True, "total_entries": 42}

# Export for compliance reporting
audit_data = plugin.export_audit()

# Get recent events
events = plugin.get_recent_events(n=10)

Multi-Agent Support

ADK plugins fire for every sub-agent in a hierarchy. One plugin instance covers the entire agent tree:

from air_adk_trust import AIRBlackboxPlugin
from google.adk import Agent

plugin = AIRBlackboxPlugin()

researcher = Agent(name="researcher", model="gemini-2.0-flash", plugins=[plugin])
writer = Agent(name="writer", model="gemini-2.0-flash", plugins=[plugin])
coordinator = Agent(
    name="coordinator",
    model="gemini-2.0-flash",
    sub_agents=[researcher, writer],
    plugins=[plugin],
)

AIR Blackbox Ecosystem

Package Framework PyPI
air-langchain-trust LangChain PyPI
air-crewai-trust CrewAI PyPI
air-autogen-trust AutoGen PyPI
air-openai-trust OpenAI SDK PyPI
air-adk-trust Google ADK This package
air-blackbox-mcp MCP Server PyPI

License

Apache 2.0

Metadata

Release files for air-adk-trust 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for air-adk-trust 0.2.0
File Size Uploaded Provenance
air_adk_trust-0.2.0.tar.gz 20.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for air-adk-trust 0.2.0
File Interpreter ABI Platform
air_adk_trust-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.9 kB

Release files / air_adk_trust-0.2.0.tar.gz

Download URL air_adk_trust-0.2.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6add63c0650f5581a138c906ada37468f8cb832aa7e647ce1ee53aef90859da
BLAKE2b-256 checksum
How to use checksums
a5f1c5cff95f798181055b2e5274a52c50b88cd02679d45e2ff54fdc5593fdb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / air_adk_trust-0.2.0-py3-none-any.whl

Download URL air_adk_trust-0.2.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c23f5a6eb049b32c7b20a8c122a64a04d538169bd07002a341a9493069b4c6d
BLAKE2b-256 checksum
How to use checksums
2a0a19265e9d67ae9992d5a589ffd5410903ef3d7c4f6afc99db1cfa165cace7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for air-adk-trust 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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