LangChain Integration
Add deterministic governance to your LangChain agents with a single middleware. Policy enforcement, PII detection, prompt injection blocking, cost limits, tool authorization, secret scanning, circuit breakers, and structured audit evidence — no LLM in the governance path.Package:
License: Apache 2.0
Latency: Under 5ms per evaluation
Source: GitHub
langchain-tealtiger on PyPILicense: Apache 2.0
Latency: Under 5ms per evaluation
Source: GitHub
Installation
Quick Start
Multi-Stage Defense
TealTiger doesn’t just govern tool calls — it protects at every stage of the agent lifecycle automatically:
All stages activate from a single middleware instance — no per-stage configuration needed.
Governance Capabilities
PII Detection
Scans inputs, outputs, and tool arguments for 40+ PII patterns in under 2ms:Prompt Injection Detection
Deterministic pattern matching for common injection attacks — no LLM needed:Secret Scanning
Detects leaked secrets and credentials in model inputs/outputs:Tool Authorization
Fine-grained control over what tools agents can use and how:Cost Governance
Hard budget enforcement — not just alerts after the fact:Rate Limiting
Prevent runaway agents from exhausting resources:Circuit Breaker
Automatic failure protection — stop calling broken tools/models:Content Moderation
Classify and filter content by category:Governance Modes
Governance Evidence & Audit Trail
Every governance decision produces a structured Decision Contract:Evidence Export
Export for compliance teams:OpenTelemetry Integration
Governance decisions propagate as OTel spans with the agent’s trace context:tealtiger.action: ALLOW / DENY / REDACTtealtiger.risk_score: 0–100tealtiger.reason_code: policy violation codetealtiger.evaluation_ms: governance latency
Use with LangGraph
Works seamlessly in multi-agent LangGraph workflows:Complete Example: Compliant Research Agent
OWASP AI Security Coverage
TealTiger addresses 7/10 OWASP Agentic Security Issues through the LangChain middleware:Key Properties
Troubleshooting
Policies not enforcing
Policies not enforcing
Check your governance mode. In
MONITOR mode, violations are logged but not blocked:Tools not being governed
Tools not being governed
Ensure you’re using the
middleware parameter when creating the agent:High costs despite limits
High costs despite limits
Verify cost policies use
"action": "BLOCK" (not "FLAG"):Next Steps
Multi-Stage Defense
Understand how governance runs at every lifecycle stage
Governance Domains
Explore the 10 governance domains
Policy Reference
Full policy configuration reference
LangGraph Guide
Advanced multi-agent governance with LangGraph

