GraphCanon updated 6d · GitHub synced 6d · 31 views this month
Decision brief
Superagent is an open-source SDK designed to protect AI applications from prompt injections, data leaks, and harmful outputs. It supports integration directly within TypeScript or Python applications.
Good fit when
- Use Superagent when you need a proactive solution that can detect and block malicious activities such as prompt injections and redact personal information automatically.
- Integrate it if your application handles sensitive data and requires automation for security checks like PII removal, which can be tailored to specific models (e.g., 'openai/gpt-4o-mini').
Avoid when
- Avoid using Superagent when your project does not require the specific safety measures it offers, such as prompt injection prevention or scanning GitHub repositories for malicious activities.
- If another tool in the same category provides better coverage or more advanced features that are critical to your application's security needs and aligns closer with your tech stack.
- Hosting:
- managed - Superagent requires integrating their API via an SDK for TypeScript or Python applications. Users must obtain an API key for accessing these services.
Observed Jul 12, 2026 · Source: enrich:decision_facts
Verify the decision
Adoption
Package downloads where a registry match exists. GitHub stars (6,713) are secondary evidence.
- npm downloads (30d)
- 91,692,776·npm downloads API·6d
Maintenance and security
Full trust report- Maintenance
- Very active (0d since push)
- As of 6d
- Provenance
- Not a fork · Organization account
- As of 6d
- Security (OSV)
- No lockfile
- As of 1mo
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
npm install superagent npmSimilar tools
Same-category neighbours. No typed graph edges are catalogued for this tool yet.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
An open-source SDK for protecting AI applications against prompt injections, data leaks, and harmful outputs.
Capability facts
- Languages
- typescript
Source: github.language · Aug 14, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Aug 14, 2026)
npm install safety-agentSource link
Source: README excerpt (regex_v1, Aug 14, 2026)
| **MCP Server** | Use with Claude Code and Claude Desktop | [mcp](mcp/README.md) |Source link
Tags
README
Superagent SDK
Make your AI apps safe.
Website · Docs · Discord · HuggingFace
An open-source SDK for AI agent safety. Block prompt injections, redact PII and secrets, scan repositories for threats, and run red team scenarios against your agent.
Features
Guard
Detect and block prompt injections, malicious instructions, and unsafe tool calls at runtime.
TypeScript:
import { createClient } from "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 automatically.
TypeScript:
const result = await client.redact({
input: "My email is john@example.com 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 john@example.com and SSN is 123-45-6789",
model="openai/gpt-4o-mini"
)
print(result.redacted)
# "My email is <EMAIL_REDACTED> and SSN is <SSN_REDACTED>"
Scan
Analyze repositories for AI agent-targeted attacks such as repo poisoning and malicious instructions.
TypeScript:
const result = await client.scan({
repo: "https://github.com/user/repo"
});
console.log(result.result); // Security report
console.log(`Cost: $${result.usage.cost.toFixed(4)}`);
Python:
result = await client.scan(repo="https://github.com/user/repo")
print(result.result) # Security report
print(f"Cost: ${result.usage.cost:.4f}")
Test
Run red team scenarios against your production agent. (Coming soon)
const result = await client.test({
endpoint: "https://your-agent.com/chat",
scenarios: ["prompt_injection", "data_exfiltration"]
});
console.log(result.findings); // Vulnerabilities discovered
Get Started
Sign up at superagent.sh to get your API key.
TypeScript:
npm install 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, redact, and scan directly in your app | sdk/typescript |
| Python SDK | Embed guard, redact, and scan 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 SDK?
- Works with any model — OpenAI, Anthropic, Google, Groq, Bedrock, and more
- Open-weight models — Run Guard on your infrastructure with 50-100ms latency
- Low latency — Optimized for runtime use
- Open source — MIT license with full transparency
Open-Weight Models
Run Guard on your own infrastructure. No API
For agents
This page has a .md twin and JSON over the API.