AIR Trust Layer for Google Agent Development Kit (ADK) — EU AI Act compliance with Gate policy enforcement
Project description
air-adk-trust
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 | |
air-crewai-trust |
CrewAI | |
air-autogen-trust |
AutoGen | |
air-openai-trust |
OpenAI SDK | |
air-adk-trust |
Google ADK | This package |
air-blackbox-mcp |
MCP Server |
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file air_adk_trust-0.2.0.tar.gz.
File metadata
- Download URL: air_adk_trust-0.2.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6add63c0650f5581a138c906ada37468f8cb832aa7e647ce1ee53aef90859da
|
|
| MD5 |
bb735003f482b5a851ec80bdeaf64705
|
|
| BLAKE2b-256 |
a5f1c5cff95f798181055b2e5274a52c50b88cd02679d45e2ff54fdc5593fdb5
|
File details
Details for the file air_adk_trust-0.2.0-py3-none-any.whl.
File metadata
- Download URL: air_adk_trust-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c23f5a6eb049b32c7b20a8c122a64a04d538169bd07002a341a9493069b4c6d
|
|
| MD5 |
32e72d6919a2adcf49fc0bf40c779d9c
|
|
| BLAKE2b-256 |
2a0a19265e9d67ae9992d5a589ffd5410903ef3d7c4f6afc99db1cfa165cace7
|