Automatically scan scraped web content for hidden malicious instructions. Block indirect prompt injections before they reach your AI agents.
Detect malicious instructions hidden in HTML comments, invisible text, and metadata.
Identify zero-width characters and other unicode tricks used to smuggle instructions.
Automatically sanitize scraped content to remove potential threats while preserving useful information.
Define trusted domains that bypass scanning or get reduced scrutiny.
Adjust detection sensitivity based on your risk tolerance and use case.
Get detailed reports on detected threats including location, type, and severity.
Your agent fetches web content through PromptGuard's secure scraping proxy.
Multi-layer scanning detects hidden instructions, invisible text, and malicious patterns.
Threats are removed or flagged. Clean content is returned to your agent safely.
from promptguard import PromptGuard
pg = PromptGuard(api_key="your-api-key")
# Scrape with automatic threat detection
result = pg.scrape.fetch(
url="https://example.com/article",
scan_for_injection=True,
sanitize=True
)
if result.threats_detected:
print(f"⚠️ Found {len(result.threats_detected)} threats")
for threat in result.threats_detected:
print(f" - {threat.type}: {threat.description}")
# Safe to use the sanitized content
agent_response = call_llm(result.sanitized_content)Let your AI agents browse the web safely. Automatic protection from indirect prompt injection.