# GuardFlow — An Open-Source Python SDK for LLM Input Guardrails

> Source: <https://discuss.huggingface.co/t/guardflow-an-open-source-python-sdk-for-llm-input-guardrails/192553#post_1>
> Published: 2026-11-25 15:34:15+00:00

**Key takeaway:** GuardFlow lets Python LLM apps insert a configurable pre-model layer that runs PII redaction via Presidio and Flair, prompt-injection detection, secrets detection, sanitization and token-limit checks on untrusted input.

Hi Hugging Face community!

I’ve released **GuardFlow**, an open-source Python SDK for inspecting untrusted inputs before they reach LLM applications.

To make it easier to explore, I’ve now published **GuardFlow Agent Prompt Firewall**, an interactive Hugging Face Space.

 **Try the live demo:**

 **GitHub:**

Consider an AI assistant receiving a user prompt containing personal information, an exposed credential, or instructions intended to override its original behavior.

Instead of forwarding every input directly to a model, applications can introduce a configurable guardrail layer.

GuardFlow provides components for:

PII detection and redaction using Presidio and Flair

Prompt-injection detection

Secrets detection

Input sanitization

Token-limit checks

The aim is to make these checks modular and reusable in Python-based AI applications.

GuardFlow is still in its early stages, and I’d love to collaborate with developers working on Python, NLP, LLM security, and agent frameworks.

Potential contribution areas include:

Improving detection coverage and reducing false positives

Adding adversarial test cases and benchmarks

Building integrations with agent frameworks

Improving performance and developer experience

If you’re exploring input safety for AI agents, I’d be interested to hear which controls you consider most important.
