# ZenGuard — Runtime Guardrails for AI Agents > A real-time trust layer for agents with prompt-injection/PII/secrets detectors and tiered access; verified 150★, pushed 2026-02-03. ## Install Copy the content below into your project: ## Quick Use ```bash pip install zenguard export ZEN_API_KEY="your_key" # README shows configuring Dedicated tier in Python: python -c "import os; from zenguard import Credentials, ZenGuard, ZenGuardConfig, Tier; cfg=ZenGuardConfig(credentials=Credentials(api_key=os.environ.get('ZEN_API_KEY')), tier=Tier.DEDICATED); ZenGuard(config=cfg); print('ok')" ``` ## Intro A real-time trust layer for agents with prompt-injection/PII/secrets detectors and tiered access; verified 150★, pushed 2026-02-03. **Best for:** Teams adding runtime safety checks (injection, PII, secrets) around tool-using agents **Works with:** Python apps and agent frameworks; README links LangChain + LlamaIndex integrations and docs.zenguard.ai **Setup time:** 10-25 minutes ### Key facts (verified) - GitHub: 150 stars · 21 forks · pushed 2026-02-03. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `pip install zenguard`. ## Main - Start with one detector policy per risk (prompt injection vs secrets vs PII) so you can tune false positives separately. - Pick the tier intentionally: README describes BASE vs DEDICATED tiers; use the free tier to validate integration first. - Wrap the agent at runtime: put checks around tool calls and retrieval inputs so the agent sees sanitized context. - Log decisions and outcomes: guardrails are most useful when you can audit why something was blocked or redacted. ### Source-backed notes - README lists detectors such as prompt injection, PII, banned/allowed topics, keywords, and secrets (with Colab links). - README shows install commands `pip install zenguard` and `poetry add zenguard`. - README states that as of 03.07.2025 multi-detector detection is supported only on the Dedicated tier. ### FAQ - **Do I need a ZenGuard API key?**: README examples reference `ZEN_API_KEY` for credentials. - **What tiers exist?**: README describes BASE (trial/rate-limited) and DEDICATED (higher QPS; standard/enterprise). - **Can I use multiple detectors together?**: README says multi-detector detection is Dedicated-only as of 2025-07-03. ## Source & Thanks > Source: https://github.com/ZenGuard-AI/fast-llm-security-guardrails > License: MIT > GitHub stars: 150 · forks: 21 --- ## Quick Use ```bash pip install zenguard export ZEN_API_KEY="your_key" # README shows configuring Dedicated tier in Python: python -c "import os; from zenguard import Credentials, ZenGuard, ZenGuardConfig, Tier; cfg=ZenGuardConfig(credentials=Credentials(api_key=os.environ.get('ZEN_API_KEY')), tier=Tier.DEDICATED); ZenGuard(config=cfg); print('ok')" ``` ## Intro ZenGuard 是面向 AI agents 的运行时信任层,提供提示注入/PII/Secrets 等检测器与分层套餐,适合把“安全检查”变成可复用步骤;已验证 150★,更新于 2026-02-03。 **Best for:** 希望为工具型 agent 增加运行时安全检测(注入/隐私/密钥)的团队 **Works with:** Python 应用与常见 agent 框架;README 提供 LangChain/LlamaIndex 集成链接与 docs.zenguard.ai 文档 **Setup time:** 10-25 minutes ### Key facts (verified) - GitHub:150 stars · 21 forks;最近更新 2026-02-03。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`pip install zenguard`。 ## Main - 按风险拆分策略:把提示注入、Secrets、PII 等检测分开配置,便于分别调阈值与误报率。 - 明确选择 tier:README 描述 BASE 与 DEDICATED;先用免费层验证接入,再决定是否升级。 - 放在运行时包住 agent:在工具调用与检索输入之前做检查,让 agent 看到“干净上下文”。 - 把决策写进日志:安全护栏的价值在于可审计,能回溯为何被拦截或被脱敏。 ### Source-backed notes - README 列出检测器方向:提示注入、PII、allowed/banned topics、keywords、secrets,并提供 Colab 示例链接。 - README 给出安装命令:`pip install zenguard` 与 `poetry add zenguard`。 - README 写明:截至 2025-07-03,多检测器联合检测仅在 Dedicated tier 支持。 ### FAQ - **需要 ZenGuard 的 API key 吗?**:README 示例使用 `ZEN_API_KEY` 作为凭证。 - **有哪些 tier?**:README 描述 BASE(试用/限速)与 DEDICATED(更高 QPS;标准/企业)。 - **能同时跑多个检测器吗?**:README 表示截至 2025-07-03,多检测器检测仅 Dedicated 支持。 ## Source & Thanks > Source: https://github.com/ZenGuard-AI/fast-llm-security-guardrails > License: MIT > GitHub stars: 150 · forks: 21 --- Source: https://tokrepo.com/en/workflows/zenguard-runtime-guardrails-for-ai-agents Author: Agent Toolkit