项目介绍
Agent 开发框架 · 2026-11-09 更新 · 本站尚未实测
Superagent SDK 是一个面向 AI 应用与 Agent 的安全 SDK,仓库 README 将其定位为「Make your AI apps safe.」,主要用途包括检测并按策略处理提示注入(prompt injection)、脱敏 PII/PHI 与密钥、扫描仓库中的针对 AI Agent 的攻击(如仓库投毒、恶意指令),以及(规划中的)红队测试。
需要说明的是,本仓库当前形态是一个供开发者在应用中集成的 SDK,并提供 TypeScript、Python、CLI、MCP Server 四种接入形态,并非一个可直接下载使用的成品 Agent 或可导入的工作流文件。
核心能力
点击能力名称查看输入、输出和原文依据。
- Guard:在运行时检测并检测并按策略处理提示注入、恶意指令和不安全的工具调用;README 示例中以
classification为block时表示被拦截,并返回violation_types。 - Redact:自动移除文本中的 PII、PHI 和密钥;示例中可将邮箱与 SSN 替换为占位标记。示例调用传入了
model参数(示例值为openai/gpt-4o-mini),说明该能力可能依赖指定模型,具体模型范围与计费方式需向官方核验。 - Scan:分析 GitHub 仓库地址,识别针对 AI Agent 的攻击与恶意指令;示例返回中包含
usage.cost,表明该接口涉及按次计费,具体单价以官方为准。 - Test:README 明确标注为 (Coming soon),即尚未正式提供,请勿据示例代码当作已可用能力。
实际应用场景
适用场景
- 在自有 AI 应用中增加一层输入侧安全检查,阻断可疑提示注入。
- 在日志、对话或提交内容进入模型前做个人信息与密钥脱敏。
- 对引入的第三方仓库做 Agent 相关风险扫描,辅助供应链检查。
- 通过 MCP Server 形式在 Claude Code、Claude Desktop 中调用上述能力。
若你的目标只是「部署一个 Agent 使用」,本仓库不是该形态;它更适合作为安全中间件被集成进已有应用。
安装与接入
README 给出的获取步骤为:先在 superagent.sh 注册取得 API key,再安装 SDK 并设置环境变量。原文提供的包安装命令如下:
TypeScript:
npm install safety-agent
Python:
uv add safety-agent
设置 API key:
export SUPERAGENT_API_KEY=your-key
README 另列出四种接入方式:TypeScript SDK、Python SDK、CLI、MCP Server(用于 Claude Code 与 Claude Desktop),分目录文档见 sdk/typescript、sdk/python、cli、mcp。本次采集未取得 MCP 与 CLI 的具体配置内容(对应文件获取返回 404),因此 MCP 的服务地址、启动命令、传输方式与鉴权细节均待核验,请以官方文档 docs.superagent.sh 为准。
使用条件与限制
- 是否需要部署
- 需自行准备运行环境,具体要求见正文
- 是否需要注册
- 账号和认证要求见正文;未明确说明的项目仍待核验
- 是否需要 API Key
- 待核验
- 费用与额度
- 费用边界见正文,项目许可不代表模型或托管服务免费
- 所需权限
- 待核验
- 许可证与服务条款
- 待核验
权限费用与限制
- 需要注册官方账号并持有
SUPERAGENT_API_KEY才能调用云端能力;具体配额、并发与限流未在 README 说明,待核验。 - Scan 接口示例中展示按调用返回成本(美元),说明存在用量计费;README 未给出价格表,费用需向官方核验,不做未经确认的报价。
- Redact 示例需指定模型,可能产生对应模型调用费用;模型由哪一方提供、是否需要自备密钥,资料未明确,待核验。
- Test(红队测试)未上线。
- README 声称「Works with any model」并列举 OpenAI、Anthropic、Google、Groq、Bedrock 等,同时称 Guard 可在自有基础设施上以开放权重模型运行(50–100ms 延迟)。该延迟与部署方式为官方声明,本页未做实测。
- 将用户输入或业务数据发送至外部服务前,请自行评估数据合规与隐私要求。
国内使用情况
网友核验 用户经验分享
与站长实测独立,不代表官方认证或本站已实测。
最近核验:暂无有效核验。参与人数按当前项目有效身份去重;不同核验项分别统计,不合并成用户总结果。仅统计审核通过且未过期的记录。
分项统计、有效期与样本量
| 核验项目 | 有效人数 | 成功 / 部分 / 失败 / 无法判断 | 成功率 | 最近核验 / 有效期 |
|---|---|---|---|---|
| 官方网站访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| GitHub 仓库访问 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 安装与运行 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 官方服务国内连接 / MCP 连接 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 国内网络情况 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 7 天 |
| 国内模型兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 自定义 API | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外服务依赖 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 海外账号要求 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 中文界面 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 客户端兼容性 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
| 账号及费用信息 | 0 | 0 / 0 / 0 / 0 | 样本不足 | 暂无 / 30 天 |
成功率 = 成功 ÷(成功 + 部分成功 + 失败);无法判断不计入分母。至少 5 份可判断结果才显示成功率。账号、费用、海外依赖与语言等事实项,成功表示核查结论与资料吻合,具体观察另行统计;不表示免费或没有海外依赖。不同网络、客户端和版本的结果不能直接等同。
最近有效核验
暂无审核通过且未过期的网友核验。欢迎提交真实使用记录。
查看全部有效核验 →国内实测状态:国内可用性待核验。协议兼容和官方资料说明不等于国内网络可用。
- 官方网站访问
- 尚未实测 待核验
- GitHub 仓库访问
- 尚未实测 待核验
- 官方服务国内连接
- 尚未实测 待核验
- 国内网络情况
- 尚未实测 待核验
- 国内模型兼容性
- 尚未实测 待核验
- 自定义 API
- 尚未实测 待核验
- 海外服务依赖
- 尚未实测 待核验
- 海外账号要求
- 尚未实测 待核验
- 中文界面
- 尚未实测 待核验
- 国内最后核验时间
- 尚未实测
许可与国内使用
仓库代码采用 MIT 许可证(LICENSE 文件为 MIT License,Copyright (c) 2024 Superagent Technologies Inc.)。需要注意:代码开源不代表官方托管 API、模型调用、扫描额度等服务免费,也不代表第三方模型可商用免费。
README 未说明中国大陆网络可达性、境内节点部署、数据存储地域或国内模型(如国内厂商模型)的适配情况,以上均待核验。仓库当前未被标记为 archived,但后续维护状态、路线图与价格策略请以官方公告为准。
安全检测能力与延迟为项目方说明,本站未做独立安全审计;检测不能保证覆盖所有攻击。
项目资料与来源
字段依据与待核验事项
access:来源确认 · Sign up at [superagent.sh](https://superagent.sh) to get your API key.
project_type:来源确认 · 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.
原始 README(折叠技术参考)
<p align="center">
<img src="logo.png" width="80" alt="Superagent" />
</p>
<h1 align="center">Superagent SDK</h1>
<p align="center">
<strong>Make your AI apps safe.</strong>
</p>
<p align="center">
<a href="https://superagent.sh">Website</a> ·
<a href="https://docs.superagent.sh">Docs</a> ·
<a href="https://discord.gg/spZ7MnqFT4">Discord</a> ·
<a href="https://huggingface.co/superagent-ai">HuggingFace</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/Y%20Combinator-Backed-orange" alt="Y Combinator" />
<img src="https://img.shields.io/github/stars/superagent-ai/superagent?style=social" alt="GitHub stars" />
<img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" />
<a href="https://www.superagent.sh/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.superagent.sh/api/badge/superagent-ai/superagent/shield.svg?theme=dark&accent=teal&variant=streak">
<img alt="Security posture verified by Superagent" src="https://www.superagent.sh/api/badge/superagent-ai/superagent/shield.svg?theme=light&accent=teal&variant=streak">
</picture>
</a>
</p>
---
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 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:**
```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:**
```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](https://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](sdk/typescript/README.md) |
| **Python SDK** | Embed guard, redact, and scan directly in Python apps | [sdk/python](sdk/python/README.md) |
| **CLI** | Command-line tool for testing and automation | [cli](cli/README.md) |
| **MCP Server** | Use with Claude Code and Claude Desktop | [mcp](mcp/README.md) |
## 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](SECURITY.md)
<a href="https://www.superagent.sh">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.superagent.sh/api/badge/superagent-ai/superagent/card.svg?theme=dark&accent=teal">
<img alt="Security posture verified by Superagent" src="https://www.superagent.sh/api/badge/superagent-ai/superagent/card.svg?theme=light&accent=teal">
</picture>
</a>
## Resources
- [Documentation](https://docs.superagent.sh)
- [Discord Community](https://discord.gg/spZ7MnqFT4)
- [HuggingFace Models](https://huggingface.co/superagent-ai)
- [Twitter/X](https://x.com/superagent_ai)
## License
MIT
历史前置条件说明(补充参考)
需 Node.js/npm 或 Python 与 uv 环境(README 分别给出 npm 与 uv 安装命令);需注册 superagent.sh 获取 SUPERAGENT_API_KEY;Scan 与 Redact 涉及云端调用和可能的模型费用,单价与配额待核验;MCP/CLI 具体配置、支持模型清单、是否需要自备模型密钥均待核验。
项目来源与清单版权许可
https://github.com/superagent-ai/superagent
https://github.com/superagent-ai
整理来源:https://github.com/slavakurilyak/awesome-ai-agents
清单版权与许可:
MIT License
Copyright (c) 2024 Slava Kurilyak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.