Skip to content

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.

License

Notifications You must be signed in to change notification settings

superagent-ai/superagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Superagent

Superagent

Make your AI safe. And prove it.

Website · Docs · Discord · HuggingFace

Y Combinator GitHub stars MIT License


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.

Safety Agent

The Safety Agent integrates with your AI to stop attacks and protect sensitive data in real-time.

Guard

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)

Redact

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>"

Safety Tests

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.

Learn more →

Safety Page

A shareable page that shows your guardrails and test results. Close enterprise deals without scrambling to answer security questionnaires.

Learn more →

Get Started

Sign up at superagent.sh to get your API key.

TypeScript:

npm install @superagent-ai/safety-agent

Python:

uv add safety-agent

Set your API key:

export SUPERAGENT_API_KEY=your-key

Integration Options

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

Why Superagent?

  • 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

Resources

License

MIT

About

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.

Topics

Resources

License

Stars

Watchers

Forks