Make your AI safe. And prove it.
Website · Docs · Discord · HuggingFace
Superagent protects your AI applications against prompt injections, data leaks, and harmful outputs. Embed safety directly into your app and prove compliance to your customers.
The Safety Agent integrates with your AI to stop attacks and protect sensitive data in real-time.
Block prompt injections, jailbreaks, and data exfiltration before they reach your models.
TypeScript:
import { createClient } from "@superagent-ai/safety-agent";
const client = createClient();
const result = await client.guard({
input: userMessage
});
if (result.classification === "block") {
console.log("Blocked:", result.violation_types);
}Python:
from safety_agent import create_client
client = create_client()
result = await client.guard(input=user_message)
if result.classification == "block":
print("Blocked:", result.violation_types)Remove PII, PHI, and secrets from text in real-time. Enable privacy and compliance without manual review.
TypeScript:
const result = await client.redact({
input: "My email is [email protected] and SSN is 123-45-6789",
model: "openai/gpt-4o-mini"
});
console.log(result.redacted);
// "My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>"Python:
result = await client.redact(
input="My email is [email protected] and SSN is 123-45-6789",
model="openai/gpt-4o-mini"
)
print(result.redacted)
# "My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>"Adversarial tests that probe your AI for prompt injection weaknesses, data leakage paths, and failure modes. Find vulnerabilities before attackers do and get evidence for compliance.
A shareable page that shows your guardrails and test results. Close enterprise deals without scrambling to answer security questionnaires.
Sign up at superagent.sh to get your API key.
TypeScript:
npm install @superagent-ai/safety-agentPython:
uv add safety-agentSet your API key:
export SUPERAGENT_API_KEY=your-key| Option | Description | Link |
|---|---|---|
| TypeScript SDK | Embed guard and redact directly in your app | sdk/typescript |
| Python SDK | Embed guard and redact directly in Python apps | sdk/python |
| CLI | Command-line tool for testing and automation | cli |
| MCP Server | Use with Claude Code and Claude Desktop | mcp |
- Low latency — Optimized for runtime use without compromising performance
- Any LLM — Works with OpenAI, Anthropic, Google, Groq, Bedrock, and more
- Open source — MIT license with full transparency
- Compliance-ready — Maps to EU AI Act, SOC 2, HIPAA, and GDPR requirements
- Production-proven — Trusted by Y Combinator companies shipping AI at scale
MIT
