AIRG
DOCS
← APP
Public cookbook

Generic AIRG integration recipes with placeholder keys and synthetic data. Sign in for organization-specific templates, policy workspaces, logs, traces, and live API testing.

Cookbook

Implementation recipes for integrating AIRG into agent applications, tool-calling frameworks, and governance workflows. Each recipe has a script and a Google Colab notebook version.

SETUP
bash
pip install airg-client
export GOVERNOR_URL=https://api.airg.nov-tia.com
export GOVERNOR_API_KEY="<your AIRG account API key>"

Enterprise Demos

MULTI-ORG

Scenario notebooks from the airg-cookbook enterprise demos directory.

MedAssist AI - Healthcare Patient IntakeORG1

Single-agent healthcare workflow for patient intake, HIPAA-aware PII handling, output scanning, verification, receipts, and audit evidence.

HealthcareHIPAAPIISingle-Agent
FinGuard - Fintech Dual AgentsORG2

Trading and compliance agents operating in one AIRG tenant with shared settings, independent sessions, fingerprint baselines, traces, SURGE receipts, and cross-agent impact analysis.

FintechDual-AgentComplianceTrading
CyberOps Command - Agent-to-Agent ResponseORG3

Four security agents coordinate incident response while AIRG governs scope, escalation, chain detection, trace evidence, and autonomous containment.

CyberOpsA2AIncident ResponseChain Detection

Agentic Use Cases

COLAB-READY

End-to-end agentic scenarios you can run step-by-step in Google Colab. Click a badge to launch.

🛡️Governed Customer Support Agent

A support chatbot with PII protection, injection blocking, and output scanning. Covers normal flow, PII leakage prevention, prompt injection, and dangerous tool blocking.

PIIInjectionOutput Scan
🔬Research Agent with Kill Switch

An autonomous research agent monitored by AIRG. Auto-engages the kill switch at 40% block rate when the agent goes rogue, then demonstrates incident response and resumption.

Kill SwitchAutonomousBlock Rate
🔗Multi-Agent Chain Detection

Three agents (Planner → Executor → Reporter) collaborate in a pipeline. AIRG detects recon → pivot → exfil attack chains across agent boundaries.

Multi-AgentChain DetectionTraces
💻Code Gen Agent + Verification

A coding assistant with triple protection: pre-execution governance, output scanning for secrets/PII in generated code, and post-execution verification.

VerificationCode GenDefense in Depth
🎯Prompt Injection Red Team
CRITICAL

8 real-world injection attack vectors — jailbreaks, DAN, indirect injection, unicode obfuscation, nested prompts. Tests the semantic + regex firewall against each.

Red TeamInjectionFirewall
🔐Credential & Secret Exfiltration
CRITICAL

Agent handles API keys, DB passwords, JWTs — then attempts to exfiltrate via HTTP, curl, encoded URLs, email. Every exfil channel blocked.

ExfiltrationPIISecrets
⛓️Privilege Escalation Chain
CRITICAL

6-step APT attack: read_file → list_dir → write_file → shell_exec → C2 callback → sudo. Risk climbs, chain detected, auto kill switch triggers.

EscalationChain DetectionKill Switch
💰Budget Exhaustion & Rate Limit DoS
CRITICAL

Agent fires 30 rapid calls to exhaust budget and overwhelm rate limiter. Shows hard-deny at ceiling, per-tool cost tracking, and 429 responses.

BudgetRate LimitDoS
🏥HIPAA/GDPR Compliance Under Attack
CRITICAL

Healthcare agent processes patient PHI while under injection attack. Tamper-proof evidence hashes, PII redaction, post-verification, and audit trail for regulators.

HIPAAGDPRPHIAudit
🔒Scope Jailbreak — Tool Discovery
CRITICAL

Agent restricted to [search, summarize] probes 15 unauthorized tools. Scope enforcer blocks each, deviation count climbs, escalation triggers.

ScopeJailbreakDeviation
🏥PII Scanner — Healthcare Data Leak Prevention
CRITICAL

A healthcare support bot attempts to email patient records containing SSNs, credit cards, and phone numbers. AIRG's PII scanner detects every entity, boosts risk scores, and prevents the data leak before it leaves the system.

PIIHealthcareRedactionHIPAA
🧬Compromised Agent — Fingerprint Drift Detection
CRITICAL

An analytics agent normally reads CSVs and runs SQL queries. After a prompt injection, it pivots to reading SSH keys and exfiltrating data. AIRG's fingerprinting engine detects the behavioural drift and raises alerts before damage occurs.

FingerprintingDriftCompromiseAnomaly
🔐Cryptographic Compliance Audit — SURGE Receipts

Walk through a full compliance audit: verify Ed25519-signed governance receipts, validate the hash chain for tamper detection, and export a compliance bundle ready for SOC2 / ISO 27001 review.

SURGECryptographyComplianceSOC2
⛓️Multi-Step Attack Chain — Recon to Exfiltration
CRITICAL

Simulate a 3-stage attack: reconnaissance (read /etc/hosts), credential theft (read SSH keys), then data exfiltration (POST to attacker.com). Watch risk escalate across the session as AIRG detects the chain pattern and blocks the final stage.

ChainAttackEscalationSession
📊Executive Security Report — 30-Day Impact Assessment

Generate a board-ready security report: risk percentiles (p50/p90/p99), decision breakdowns with visual bars, per-agent and per-tool drill-downs, and chain pattern analysis across 30 days of governance data.

ImpactReportingRiskExecutive

Getting Started

(2 recipes)
01Quick Start
Python
02Quick Start (TypeScript)
TypeScript

Agent Frameworks

(4 recipes)
03LangChain Tool Wrapper
Python
04OpenAI Responses Tool Calling
Python
05CrewAI Governed Agent
Python
06Anthropic Tool Use
Python

Safety & Compliance

(4 recipes)
07Output Verification
Python
08PII & Content Scanning
Python
09Human-in-the-Loop Review
Python
10Budget & Rate Controls
Python

Observability & Ops

(6 recipes)
11Trace Observability
Python
24Workflow Topology Engine
Python
26Production Gateway Enforcement
Python
12Real-Time SSE Monitoring
Python
13Policy as Code
Python
14Kill Switch & Emergencies
Python

Advanced

(3 recipes)
15MCP Server Integration
Python
16Multi-Agent Governance
Python
17Compliance Reporting
Python

Security Deep Dives

(10 recipes)
18Injection Firewall Deep Dive
Python
19PII Scanner & Redaction
Python
20Agent Fingerprinting & Drift
Python
21SURGE Receipt Verification
Python
22Chain Analysis & Patterns
Python
23Impact Assessment & Reporting
Python
25OpenAI-Compatible Gateway Enforcement
Python
26Controlled Agent Mesh Governance
Python
27Multi-Hop Delegation Boundaries
Python
28Canary Health & Context Isolation
Python
29 recipes / 15 use cases / 6 categories View all on GitHub