Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

superagent

> 后端框架
Open source

Superagent protects your AI applications against prompt injections, data leaks, and harmful outputs. Embed safety directly into your app and prove compliance to

6.7K stars0 likes0 views
WebsiteGitHub

About

Superagent protects your AI applications against prompt injections, data leaks, and harmful outputs. Embed safety directly into your app and prove compliance to

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:

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:

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:

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:

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

Scan

Analyze repositories for AI agent-targeted attacks such as repo poisoning and malicious instructions.

TypeScript:

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:

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)

typescript
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:

bash
npm install safety-agent

Python:

bash
uv add safety-agent

Set your API key:

bash
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

Security

Read SECURITY.md

Resources

  • Documentation
  • Discord Community
  • HuggingFace Models
  • Twitter/X

License

MIT

Issues· 17 open

View all issuesOpen on GitHub
  • #1161

    [Feature]: Add configurable concurrency limits for guard chunk and PDF-page analysis

    Updated Sep 1, 2026
  • #1159

    Proposal: Python adapter converting GuardResponse/RedactResponse to a portable OpenEval ResultSet

    Updated Aug 25, 2026
  • #1153

    TK

    Updated Jul 28, 2026
  • #1105

    [Feature]: Support Vercel agent-skills

    Updated Jul 24, 2026
  • #1147

    Private security report: disclosure channel requested

    Updated Jun 5, 2026
  • #1145

    providers/index.ts — 429 triggers instant fallback with no Retry-After consulted

    bugUpdated Jun 4, 2026
  • #1097

    [Feature]: Update docs with detailed guidelines on how to deploy guardrail models.

    Updated May 21, 2026
  • #1111

    [Chore]: Update test to run mock unit tests

    Updated May 14, 2026
  • #1099

    [Feature]: Hook observability into the safety-agent guard.

    Updated Apr 23, 2026

> Tags

TypeScriptaianthropicguardrailsllm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 23, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架