humanbound/humanbound
GitHub: humanbound/humanbound
一款开源的 AI 智能体红队安全测试引擎,提供 CLI 和 SDK,支持在线与完全离线模式,帮助团队在上线前系统化发现 AI Agent 的安全风险。
Stars: 3 | Forks: 0
humanbound
开源 AI 智能体红队引擎、SDK 和 CLI。
可在本地或针对 Humanbound 平台运行。无需登录即可开始使用。
快速开始 ·
CLI ·
SDK ·
文档 ·
贡献
## 快速开始
### 安装
```
pip install humanbound # CLI + SDK, core deps
pip install humanbound[engine] # + OpenAI / Anthropic / Gemini providers
pip install humanbound[firewall] # + humanbound-firewall runtime
pip install humanbound[engine,firewall] # everything
```
### CLI 使用
```
# 配置你的 LLM provider
export HB_PROVIDER=openai
export HB_API_KEY=sk-...
# 运行安全测试
hb test --endpoint ./bot-config.json --repo . --wait
# 查看结果
hb posture # security score (0-100, A-F)
hb logs # conversation logs
hb report -o report.html # HTML report
hb guardrails -o rules.yaml # firewall rules
```
结合 [Ollama](https://ollama.com) 实现完全的物理隔离 —— 零外部 API 调用:
```
export HB_PROVIDER=ollama
export HB_MODEL=llama3.1:8b
hb test --endpoint ./bot-config.json --scope ./scope.yaml --wait
```
### Python SDK
```
from humanbound import Bot, LocalRunner, OwaspAgentic, TestingLevel, EngineCallbacks
# 组合你自己的 test pipeline
bot = Bot(endpoint="https://my-agent/chat", api_key="...")
class Callbacks(EngineCallbacks):
def on_finding(self, insight): ...
def on_progress(self, pct): ...
runner = LocalRunner()
# 完整示例请参见 docs.humanbound.ai
```
## 稳定性契约
| 导入路径 | 稳定性 |
|---|---|
| `from humanbound import X` | **稳定** — 受 semver 保护 |
| `from humanbound.
import Y` | **稳定** — 受 semver 保护 |
| `from humanbound_cli.* import Z` | **内部** — 可能随时在任何版本中更改,请勿在用户代码中导入 |
完整的逐层演练、编排器编写指南、平台集成和 API 参考均位于
[docs.humanbound.ai](https://docs.humanbound.ai/)。
## 2.0 版本发布内容
- **简洁的名称**:`humanbound` 是新的 PyPI 安装包。旧的
`humanbound-cli` 是一个过渡性的存根,将在
2026-06-20 之后被移除。
- **公共 SDK 命名空间**与 CLI 并行存在 —— 使用 CLI 或通过
Python 驱动引擎。两者共享相同的实现,因此不会发生偏离。
- **防火墙集成**:`pip install humanbound[firewall]` 会拉取
重命名后的 [`humanbound-firewall`](https://github.com/humanbound/humanbound-firewall)
(前身为 `hb-firewall`)并与 CLI 一同安装。
有关完整的 2.0.0 版本发布说明,请参见 [CHANGELOG.md](./CHANGELOG.md)。
## 许可证
[Apache-2.0](./LICENSE)。在任何场景下均可免费使用 —— 无论是商业用途还是
开源项目 —— 但需注明出处。有关
商标策略,请参见 [TRADEMARK.md](./TRADEMARK.md)。代码是开源的;但名称并非如此。
姊妹项目 [`humanbound-firewall`](https://github.com/humanbound/humanbound-firewall)
采用双重许可(AGPL-3.0 + 商业许可) —— 不同的产品,不同的
许可策略。
Humanbound 是 AI and Me Single-Member Private Company 的商业名称,该公司在希腊注册成立。
标签:AI安全, AI风险缓解, Chat Copilot, CLI, Humanbound, IP 地址批量处理, Python, WiFi技术, 人工智能, 大语言模型安全, 安全测试, 密码管理, 开源, 攻击性安全, 攻击模拟, 文档结构分析, 无后门, 机密管理, 模型评估, 用户模式Hook绕过, 红队引擎, 网络安全, 逆向工具, 隐私保护, 驱动签名利用