Skip to main content

Haystack Integration

Add deterministic governance to your Haystack pipelines with custom components. PII detection, tool authorization, cost limits, secret scanning, and structured audit evidence — no LLM in the governance path.
Package: tealtiger-haystack on PyPI
Haystack Version: v3 and above
License: Apache-2.0
Latency: Sub-2ms per evaluation
Source: GitHub

Installation

This installs the TealTiger Haystack adapter with the governance engine as a dependency.

Quick Start

Custom Component Pattern

For full pipeline integration, create a TealTigerGuard component that slots into any Haystack pipeline:

Governed RAG Pipeline

A complete retrieval-augmented generation pipeline with governance:

Tool Governance Component

For agentic Haystack pipelines with tool use:

Governance Capabilities

PII Detection

Scans messages for 40+ PII patterns before they leave your infrastructure:
Detected patterns: SSN, credit cards, IBAN, phone numbers, email addresses, IP addresses, AWS keys, passport numbers, dates of birth, and 30+ more.

Secret Scanning

Catches leaked credentials before they reach external APIs:

Tool Authorization

Control which tools agents can invoke:
Supports glob patterns — read_* matches read_file, read_database, etc.

Cost Governance

Hard budget enforcement per session:

Prompt Injection Detection

Deterministic pattern matching for injection attacks:

Governance Modes

Audit Evidence

Every governance decision produces a structured receipt:
Access decisions programmatically:

Performance

TealTiger’s governance path is deterministic (regex + fnmatch, no LLM calls): For comparison, a single LLM call takes 500–3000ms. Governance adds negligible overhead.

Why Not Just Validate in Code?

OWASP AI Security Coverage

TealTiger addresses 7/10 OWASP Agentic Security Issues:

Complete Example

Next Steps