Repository navigation
Add TealTiger governance integration #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
191cf0d
Create TealTiger integration documentation
nagasatish007 59c9663
Create tealtiger.png
nagasatish007 e2c8332
Delete logos/tealtiger.png
nagasatish007 77ba8ad
Add files via upload
nagasatish007 0204d03
Address review: add toc, fix imports, add license section
nagasatish007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| --- | ||
| layout: integration | ||
| name: TealTiger | ||
| description: Deterministic governance, cost tracking, and PII detection for Haystack pipelines. No LLM in the governance path. | ||
| authors: | ||
| - name: TealTiger | ||
| socials: | ||
| github: agentguard-ai | ||
| twitter: TealtigerAI | ||
| linkedin: https://www.linkedin.com/company/tealtiger | ||
| pypi: https://pypi.org/project/tealtiger-haystack | ||
| repo: https://github.com/agentguard-ai/tealtiger | ||
| type: Custom Component | ||
| report_issue: https://github.com/agentguard-ai/tealtiger/issues | ||
| logo: /logos/tealtiger.png | ||
| version: Haystack 2.0 | ||
| toc: true | ||
| --- | ||
|
|
||
| ### **Table of Contents** | ||
| - [Overview](#overview) | ||
| - [Installation](#installation) | ||
| - [Usage](#usage) | ||
| - [Features](#features) | ||
| - [Support](#support) | ||
| - [License](#license) | ||
|
|
||
| ## Overview | ||
|
|
||
| [](https://pypi.org/project/tealtiger-haystack) | ||
| [](https://pypi.org/project/tealtiger-haystack) | ||
|
|
||
| Add deterministic governance to any Haystack pipeline. No LLM in the governance path — all policy evaluation is deterministic, adding <2ms latency. | ||
|
|
||
| ## Installation | ||
|
kacperlukawski marked this conversation as resolved.
Resolved
|
||
|
|
||
| ```bash | ||
| pip install tealtiger-haystack | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Zero-Config Mode (Observe) | ||
|
|
||
| No policies needed — just add the component and get instant visibility into cost, PII, and tool usage: | ||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.components.generators import OpenAIGenerator | ||
| from haystack_integrations.components.connectors.tealtiger import TealTigerGovernanceComponent | ||
|
|
||
| pipeline = Pipeline() | ||
| pipeline.add_component("governance", TealTigerGovernanceComponent()) | ||
| pipeline.add_component("llm", OpenAIGenerator(model="gpt-4o-mini")) | ||
| pipeline.connect("governance.text", "llm.prompt") | ||
|
|
||
| result = pipeline.run({"governance": {"text": "What is the capital of France?"}}) | ||
|
|
||
| # Access governance decision | ||
| decision = result["governance"]["decision"] | ||
| print(decision["action"]) # "ALLOW" | ||
| print(decision["cost_tracked"]) # 0.0023 | ||
| print(decision["pii_detected"]) # [] | ||
| ``` | ||
|
|
||
| ### Policy Mode (Enforce) | ||
|
|
||
| Add a TealEngine with policies for full governance enforcement: | ||
|
|
||
| ```python | ||
| from haystack import Pipeline | ||
| from haystack.components.generators import OpenAIGenerator | ||
| from tealtiger import TealEngine | ||
| from haystack_integrations.components.connectors.tealtiger import TealTigerGovernanceComponent | ||
|
|
||
| engine = TealEngine(policies=[ | ||
| {"type": "cost_limit", "max_per_session": 5.00}, | ||
| {"type": "pii_block", "categories": ["ssn", "credit_card"]}, | ||
| ]) | ||
|
|
||
| pipeline = Pipeline() | ||
| pipeline.add_component( | ||
| "governance", | ||
| TealTigerGovernanceComponent(engine=engine, mode="ENFORCE"), | ||
| ) | ||
| pipeline.add_component("llm", OpenAIGenerator(model="gpt-4o-mini")) | ||
| pipeline.connect("governance.text", "llm.prompt") | ||
|
kacperlukawski marked this conversation as resolved.
Resolved
|
||
|
|
||
| result = pipeline.run({"governance": {"text": "Process payment for card 4111-1111-1111-1111"}}) | ||
| # PII detected → action: "DENY" | ||
| ``` | ||
|
|
||
| ## Features | ||
|
|
||
| - **Deterministic** — Same input + same policy = same decision, every time | ||
| - **<2ms overhead** — No LLM in the governance path | ||
| - **Zero-config mode** — Observe cost, PII, and behavior without writing policies | ||
| - **Policy enforcement** — ALLOW, DENY, REQUIRE_APPROVAL, REVISE decisions | ||
| - **Cost tracking** — Per-request and cumulative session cost | ||
| - **PII detection** — Email, phone, SSN, credit card, IP address patterns | ||
| - **Audit trail** — Every decision produces a structured evidence record | ||
| - **TEEC receipts** — Compliance-grade execution receipts with correlation IDs | ||
|
|
||
| ## Support | ||
|
|
||
| - [GitHub Issues](https://github.com/agentguard-ai/tealtiger/issues) | ||
| - [TealTiger Documentation](https://tealtiger.ai) | ||
| - [OWASP ASI Coverage](https://github.com/agentguard-ai/tealtiger) — 8/10 Agentic Security Index categories | ||
|
|
||
| ## License | ||
|
|
||
| `tealtiger-haystack` is distributed under the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.