AI Agent Security & Governance SDK
Deterministic governance, guardrails, cost tracking, and policy management for LLM applications. Open source. TypeScript + Python. Works with any provider.
Website Β· Documentation Β· Examples Β· Discord Β· Contributing
TealTiger is an open-source SDK that provides deterministic governance for AI agents. It enforces security policies, tracks costs, and produces structured evidence β all at runtime, with no infrastructure required.
Looking for the source code? This is the hub repo. The SDK source lives in the language-specific repos:
- TypeScript SDK: tealtiger-typescript-prod
- Python SDK: tealtiger-python-prod
Or clone this repo with submodules:
git clone --recurse-submodules https://github.com/agentguard-ai/tealtiger.git
Unlike probabilistic safety filters, TealTiger uses deterministic policy evaluation: same input + same policy = same decision, every time. Every governance verdict is reconstructable, traceable to the human who authored the policy, and exportable as structured evidence (SARIF, JUnit XML, JSON).
Key principle: Governance should be an engineering property embedded in the runtime β not a document reviewed after the fact.
npm install tealtigerimport { TealOpenAI } from 'tealtiger';
const client = new TealOpenAI({
apiKey: process.env.OPENAI_API_KEY,
guardrails: {
piiDetection: true,
promptInjection: true,
contentModeration: true,
},
budget: {
maxCostPerRequest: 0.50,
maxCostPerDay: 10.00,
},
});
const response = await client.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: 'Hello!' }],
});
// Guardrails enforced. Cost tracked. Evidence produced.pip install tealtigerfrom tealtiger import TealOpenAI
client = TealOpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
guardrails={
"pii_detection": True,
"prompt_injection": True,
"content_moderation": True,
},
budget={
"max_cost_per_request": 0.50,
"max_cost_per_day": 10.00,
},
)
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}],
)
# Guardrails enforced. Cost tracked. Evidence produced.- PII Detection β Detect and redact sensitive information automatically
- Prompt Injection Prevention β Block malicious prompt injection attempts
- Content Moderation β Filter toxic, harmful, or inappropriate content
- Secret Detection β 500+ patterns across 9 categories with confidence scoring
- Custom Rules β Define your own security policies
- Budget Enforcement β Hard limits per request, session, and day
- Cost Tracking β Real-time monitoring across all providers
- Cost Alerts β Notifications at configurable thresholds
- Circuit Breakers β Prevent runaway cost loops automatically
- OpenAI β GPT-4, GPT-4o, GPT-3.5
- Anthropic β Claude 3.5, Claude 3
- Google Gemini β Multimodal support
- AWS Bedrock β Claude, Titan, Jurassic, Command, Llama
- Azure OpenAI β Deployment-based routing
- Cohere β Chat, RAG, embeddings
- Mistral AI β European data residency
- DeepSeek β Cost-efficient reasoning models
- Groq β Ultra-low latency inference
- Together AI β Open-source model hosting
- HuggingFace TGI β Self-hosted inference
- xAI (Grok) β Real-time knowledge
- AWS Bedrock Agents β Native guardrail adapter
- AWS AgentCore β Pre/post action governance plugin
- Azure AI Agent Service β Tool-call pipeline middleware
- Deterministic Policy Evaluation β No LLM in the governance path
- Structured Evidence β Every decision produces a reconstructable record
- Cryptographic Proof β Merkle trees + RFC 3161 timestamping (TealProof)
- Non-Human Identity (NHI) β Agent lifecycle, scope enforcement, Zero Standing Privilege
- FREEZE Rules β Immutable emergency kill switches with tamper detection
- Correlation IDs β End-to-end traceability across the decision chain
- Policy Traceability β Every verdict traces to the human policy author
- OWASP Agentic Top 10 β Zero-config policy pack covering all 10 ASI risks
| Dimension | What it does | Module |
|---|---|---|
| π‘οΈ Security | Secret detection (500+ patterns), prompt injection, PII, content moderation, Unicode normalization, encoded output detection | TealSecrets TealGuard |
| π Identity | Non-Human Identity lifecycle, scope enforcement, Zero Standing Privilege, agent attestation | TealEngine (NHI) |
| β‘ Reliability | Circuit breakers, retry budgets, fallback chains, deterministic degradation | TealCircuit TealReliability |
| π§ Memory | Write provenance, instruction injection detection, exfiltration prevention, scope enforcement | TealMemory |
| π° Cost | Governance-owned ceilings, anomaly detection, reasoning-token budgets, per-agent attribution | TealMonitor |
| π Evidence | Cryptographic receipts (Merkle + RFC 3161), SARIF export, OTel spans, SIEM integration | TealProof TealAudit |
| βοΈ Policy | FREEZE rules, PLAN_ONLY mode, hot-swap bundles, anti-tamper, automation levels | TealEngine |
| π Workflow | Declarative YAML governance workflows, org-level inheritance, floor enforcement | TealFlow |
| π Drift | Behavioral drift detection, statistical baselines, model output regression | TealDrift |
| β±οΈ Temporal | Session TTL, cooldown periods, time-of-day restrictions | TealTemporal |
| π Registry | MCP definition-drift monitoring, tool description scanning, adapter composition allowlist | TealRegistry |
| π§ Classification | Local ONNX ML inference (β€20ms), ensemble modes, regex+ML combination | TealClassifier |
Design principle: No LLM in the governance path. Same input + same policy = same decision, every time.
| Language | Source Code | Package | Install |
|---|---|---|---|
| TypeScript | tealtiger-typescript-prod | npm | npm install tealtiger |
| Python | tealtiger-python-prod | PyPI | pip install tealtiger |
- Quick Start Guide
- Security Guardrails
- Cost Governance
- Provider Setup
- Contributing Guide
- Security Policy
- Code of Conduct
- Roadmap
Use schemas/tealtiger-policy.schema.json for editor autocomplete and validation when authoring TealEngine policy JSON or YAML files. JSON policy files can include:
{
"$schema": "./schemas/tealtiger-policy.schema.json"
}For YAML policies, configure your editor's YAML schema mapping to point policy files such as tealtiger-policy.yml at ./schemas/tealtiger-policy.schema.json.
TealTiger is open source and we're looking for early contributors to shape the future of AI agent governance.
| Area | Examples | Difficulty |
|---|---|---|
| π Secret Detection | New detection patterns, custom categories | π’ Beginner |
| π Documentation | Guides, examples, API docs, typo fixes | π’ Beginner |
| π§ͺ Tests | Unit tests, property-based tests, integration tests | π‘ Intermediate |
| π Integrations | LangChain, CrewAI, AutoGen, LlamaIndex middleware | π‘ Intermediate |
| πΎ Memory Adapters | Redis, Pinecone, Weaviate, ChromaDB adapters | π‘ Intermediate |
| π CI/CD Templates | Jenkins, Azure Pipelines, Bitbucket Pipelines | π‘ Intermediate |
| ποΈ Core Modules | Governance engine, evidence export, policy evaluation | π΄ Advanced |
- π Named in CONTRIBUTORS.md and release notes
- ποΈ "Founding Contributor" badge β first 25 merged PRs get permanent recognition
- π£ Shoutout on TealTiger social channels (LinkedIn, X, Dev.to)
- π Early access to upcoming governance features before public release
- π¬ Direct access to the core team via GitHub Discussions
- π Co-authorship opportunity on technical blog posts
# 1. Star this repo (it helps!)
# 2. Fork and clone the SDK you want to contribute to:
# TypeScript SDK:
git clone https://github.com/agentguard-ai/tealtiger-typescript-prod.git
# Python SDK:
git clone https://github.com/agentguard-ai/tealtiger-python-prod.git
# 3. Pick a "good first issue"
# https://github.com/agentguard-ai/tealtiger/issues?q=label%3A%22good+first+issue%22
# 4. Submit a PR
# 5. Join the team π―See CONTRIBUTING.md for detailed guidelines.
Current: v1.3.0 β Autonomous Agent Governance (Released May 18, 2026)
- TealEngine v1.3 with pre/post evaluation pipeline, FREEZE rules, automation levels
- Non-Human Identity (NHI) governance with Zero Standing Privilege
- TealProof β cryptographic governance receipts (Merkle + RFC 3161)
- TealFlow β declarative YAML governance workflows
- TealClassifier β local ONNX ML inference (β€20ms)
- TealDrift, TealState, TealTemporal β behavioral, context, and session governance
- TealMonitor v2 β governance-owned cost ceilings, anomaly detection
- OWASP Agentic Top 10 policy pack (zero-config)
- 12 LLM providers + 3 platform adapters (Bedrock, AgentCore, Azure)
- Full Python SDK parity
Next: v1.4.0 β Zero-Config Adoption
observe()mode β 1-line integration, instant visibility- Progressive disclosure: observe β suggest β enforce
- Auto-baseline behavioral detection
- Framework adapters (LangChain, CrewAI, AutoGen, LlamaIndex)
- Developer experience overhaul
- Discord: Join TealTiger Community
- GitHub Discussions: Ask questions, share ideas
- LinkedIn: TealTiger
- X (Twitter): @TealtigerAI
- Documentation: docs.tealtiger.ai
- Blog: blogs.tealtiger.ai
- Playground: playground.tealtiger.ai
- Email: [email protected]
TealTiger is Apache 2.0 licensed.
Built with β€οΈ by the TealTiger team and contributors.
β Star this repo if you believe AI agents need governance, not just guardrails.