Skip to content

feat: Add tutorial on securing pipelines against runaway costs and PII leaks#467

Open
nagasatish007 wants to merge 2 commits into
deepset-ai:mainfrom
agentguard-ai:feat/tealtiger-governance-tutorial
Open

feat: Add tutorial on securing pipelines against runaway costs and PII leaks#467
nagasatish007 wants to merge 2 commits into
deepset-ai:mainfrom
agentguard-ai:feat/tealtiger-governance-tutorial

Conversation

@nagasatish007

@nagasatish007 nagasatish007 commented Jun 17, 2026

Copy link
Copy Markdown

New Tutorial: Securing Pipelines Against Runaway Costs and PII Leaks

Adds tutorial #50 demonstrating how to add deterministic governance to Haystack pipelines using TealTiger.

What it covers

  1. Building a RAG pipeline with Haystack
  2. Detecting PII (SSNs, credit cards) in pipeline context before it reaches the LLM
  3. Detecting secrets/API keys in retrieved documents
  4. Enforcing per-session cost budgets to prevent infinite agent loops
  5. Creating a custom TealTigerGovernanceFilter Haystack component
  6. Inspecting structured governance audit trails

Why this is useful for Haystack users

Once agents can call tools and query databases, new risks appear: PII flowing to the model, secrets in generated code, and cost runaway from infinite loops. This tutorial shows how to prevent all three with a deterministic governance layer that adds <5ms overhead and requires no additional LLM calls.

Tutorial metadata

  • Level: Intermediate
  • Time to complete: 20 min
  • Dependencies: tealtiger
  • Components used: OpenAIChatGenerator, Pipeline, custom @component

Checklist

  • Follows the template.ipynb structure
  • Includes installation, setup, step-by-step sections, and "About us" footer
  • Added entry to index.toml
  • File follows naming convention: 50_Securing_Pipelines_Against_Runaway_Costs_and_PII_Leaks.ipynb
  • No API keys or secrets in the notebook

About TealTiger

TealTiger is an open-source (Apache 2.0) deterministic governance SDK for AI agents. It provides PII detection, secret scanning (500+ patterns), cost tracking, and policy enforcement with <5ms overhead and no LLM in the governance path. Available on PyPI and npm.

Note: TealTiger is already listed as a community integration in the Haystack documentation:
https://haystack.deepset.ai/integrations/tealtiger

The tealtiger-haystack package is available on PyPI and follows the Haystack integration pattern. This tutorial complements the existing integration page by providing a hands-on walkthrough showing the governance capabilities in action within a pipeline context.

This tutorial covers securing multi-agent pipelines against runaway costs and PII leaks using TealTiger governance. It includes steps for building a RAG pipeline, installing dependencies, and implementing governance checks.
Added a new tutorial entry for securing pipelines.
@nagasatish007 nagasatish007 requested a review from a team as a code owner June 17, 2026 17:49
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant