|
| 1 | +--- |
| 2 | +layout: integration |
| 3 | +name: TealTiger |
| 4 | +description: Deterministic governance, cost tracking, and PII detection for Haystack pipelines. No LLM in the governance path. |
| 5 | +authors: |
| 6 | + - name: TealTiger |
| 7 | + socials: |
| 8 | + github: agentguard-ai |
| 9 | + twitter: TealtigerAI |
| 10 | + linkedin: https://www.linkedin.com/company/tealtiger |
| 11 | +pypi: https://pypi.org/project/tealtiger-haystack |
| 12 | +repo: https://github.com/agentguard-ai/tealtiger |
| 13 | +type: Custom Component |
| 14 | +report_issue: https://github.com/agentguard-ai/tealtiger/issues |
| 15 | +logo: /logos/tealtiger.png |
| 16 | +version: Haystack 2.0 |
| 17 | +toc: true |
| 18 | +--- |
| 19 | + |
| 20 | +### **Table of Contents** |
| 21 | +- [Overview](#overview) |
| 22 | +- [Installation](#installation) |
| 23 | +- [Usage](#usage) |
| 24 | +- [Features](#features) |
| 25 | +- [Support](#support) |
| 26 | +- [License](#license) |
| 27 | + |
| 28 | +## Overview |
| 29 | + |
| 30 | +[](https://pypi.org/project/tealtiger-haystack) |
| 31 | +[](https://pypi.org/project/tealtiger-haystack) |
| 32 | + |
| 33 | +Add deterministic governance to any Haystack pipeline. No LLM in the governance path — all policy evaluation is deterministic, adding <2ms latency. |
| 34 | + |
| 35 | +## Installation |
| 36 | + |
| 37 | +```bash |
| 38 | +pip install tealtiger-haystack |
| 39 | +``` |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +### Zero-Config Mode (Observe) |
| 44 | + |
| 45 | +No policies needed — just add the component and get instant visibility into cost, PII, and tool usage: |
| 46 | + |
| 47 | +```python |
| 48 | +from haystack import Pipeline |
| 49 | +from haystack.components.generators import OpenAIGenerator |
| 50 | +from haystack_integrations.components.connectors.tealtiger import TealTigerGovernanceComponent |
| 51 | + |
| 52 | +pipeline = Pipeline() |
| 53 | +pipeline.add_component("governance", TealTigerGovernanceComponent()) |
| 54 | +pipeline.add_component("llm", OpenAIGenerator(model="gpt-4o-mini")) |
| 55 | +pipeline.connect("governance.text", "llm.prompt") |
| 56 | + |
| 57 | +result = pipeline.run({"governance": {"text": "What is the capital of France?"}}) |
| 58 | + |
| 59 | +# Access governance decision |
| 60 | +decision = result["governance"]["decision"] |
| 61 | +print(decision["action"]) # "ALLOW" |
| 62 | +print(decision["cost_tracked"]) # 0.0023 |
| 63 | +print(decision["pii_detected"]) # [] |
| 64 | +``` |
| 65 | + |
| 66 | +### Policy Mode (Enforce) |
| 67 | + |
| 68 | +Add a TealEngine with policies for full governance enforcement: |
| 69 | + |
| 70 | +```python |
| 71 | +from haystack import Pipeline |
| 72 | +from haystack.components.generators import OpenAIGenerator |
| 73 | +from tealtiger import TealEngine |
| 74 | +from haystack_integrations.components.connectors.tealtiger import TealTigerGovernanceComponent |
| 75 | + |
| 76 | +engine = TealEngine(policies=[ |
| 77 | + {"type": "cost_limit", "max_per_session": 5.00}, |
| 78 | + {"type": "pii_block", "categories": ["ssn", "credit_card"]}, |
| 79 | +]) |
| 80 | + |
| 81 | +pipeline = Pipeline() |
| 82 | +pipeline.add_component( |
| 83 | + "governance", |
| 84 | + TealTigerGovernanceComponent(engine=engine, mode="ENFORCE"), |
| 85 | +) |
| 86 | +pipeline.add_component("llm", OpenAIGenerator(model="gpt-4o-mini")) |
| 87 | +pipeline.connect("governance.text", "llm.prompt") |
| 88 | + |
| 89 | +result = pipeline.run({"governance": {"text": "Process payment for card 4111-1111-1111-1111"}}) |
| 90 | +# PII detected → action: "DENY" |
| 91 | +``` |
| 92 | + |
| 93 | +## Features |
| 94 | + |
| 95 | +- **Deterministic** — Same input + same policy = same decision, every time |
| 96 | +- **<2ms overhead** — No LLM in the governance path |
| 97 | +- **Zero-config mode** — Observe cost, PII, and behavior without writing policies |
| 98 | +- **Policy enforcement** — ALLOW, DENY, REQUIRE_APPROVAL, REVISE decisions |
| 99 | +- **Cost tracking** — Per-request and cumulative session cost |
| 100 | +- **PII detection** — Email, phone, SSN, credit card, IP address patterns |
| 101 | +- **Audit trail** — Every decision produces a structured evidence record |
| 102 | +- **TEEC receipts** — Compliance-grade execution receipts with correlation IDs |
| 103 | + |
| 104 | +## Support |
| 105 | + |
| 106 | +- [GitHub Issues](https://github.com/agentguard-ai/tealtiger/issues) |
| 107 | +- [TealTiger Documentation](https://tealtiger.ai) |
| 108 | +- [OWASP ASI Coverage](https://github.com/agentguard-ai/tealtiger) — 8/10 Agentic Security Index categories |
| 109 | + |
| 110 | +## License |
| 111 | + |
| 112 | +`tealtiger-haystack` is distributed under the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). |
0 commit comments