TheVertexAgents/sentinel-web-oracle

GitHub: TheVertexAgents/sentinel-web-oracle

一款基于实时网络数据的加密货币威胁情报自主AI代理,帮助团队及时发现并应对DeFi漏洞利用和监管执法等风险。

Stars: 0 | Forks: 0

# 🛡️ Sentinel Web Oracle [![Track](https://img.shields.io/badge/Track-Security%20%26%20Compliance-blue)](https://lablab.ai) [![Bright Data](https://img.shields.io/badge/Bright%20Data-SERP%20%7C%20Unlocker%20%7C%20Browser%20%7C%20MCP-orange)](https://brightdata.com) [![LLM](https://img.shields.io/badge/LLM-Groq%20llama--3.3--70b-green)](https://groq.com) [![使用 Kiro 构建](https://img.shields.io/badge/Built%20with-Kiro-purple)](https://kiro.dev) ## 问题 DeFi 协议、加密基金和合规团队没有可靠的方法来实时监控开放网络中的威胁。当闪电贷漏洞利用或 SEC 执法行动出现在数据反馈中时,损失往往已经造成。 网络中包含这些信号——但它们隐藏在机器人检测、JavaScript 渲染和地理封锁之后,这是任何内部 SIEM 都无法处理的。 ## 它能做什么 Sentinel Web Oracle 是一个自主 AI agent,用于监控开放网络中特定于加密货币的风险信号。给定任何资产,它会: ``` 1. Disambiguates → Confirms canonical name + primary sources via SERP API 2. Multi-search → Parallel queries: exploit news, SEC enforcement, flash loans 3. Deep scrape → Reads full articles via Web Unlocker + Scraping Browser 4. Synthesizes → Returns CRITICAL / ELEVATED / NOMINAL + HOLD / MONITOR / CLEAR ``` 每次调用都是一次全新的实时网络搜索。没有过期的缓存。没有虚构的数据。 ## 实时演示 ``` git clone https://github.com/TheVertexAgents/sentinel-web-oracle cd sentinel-web-oracle cp .env.example .env # add your keys npm install npm run dev # → http://localhost:3008 ``` **Dashboard:** `http://localhost:3008` **API:** `POST http://localhost:3008/analyze` **SSE 流:** `GET http://localhost:3008/stream?asset=ETH` ## 架构 ``` ┌─────────────────────────────────────────────────────────────┐ │ Sentinel Web Oracle │ │ │ │ ┌──────────┐ ┌──────────────┐ ┌────────────────────┐ │ │ │ Web UI │ │ REST API │ │ MCP Server │ │ │ │ (port │ │ /analyze │ │ analyze_crypto_ │ │ │ │ 3008) │ │ /stream SSE │ │ threat() │ │ │ └────┬─────┘ └──────┬───────┘ └─────────┬──────────┘ │ │ └────────────────┴─────────────────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ Agentic Loop │ │ │ │ (Groq / Anthropic) │ │ │ └──────────┬──────────┘ │ │ │ │ │ ┌───────────────┼───────────────┐ │ │ ▼ ▼ ▼ │ │ search_web scrape_url browser_scrape │ │ SERP API Web Unlocker Scraping Browser │ │ (headlines) (articles) (Twitter/Reddit) │ └─────────────────────────────────────────────────────────────┘ ``` ## Bright Data 基础设施 | 工具 | Zone | 用途 | |---|---|---| | **SERP API** | `serp_api1` | 结构化 Google 搜索 — 头条新闻发现 | | **Web Unlocker** | `web_unlocker1` | 完整文章提取 — 绕过机器人检测 | | **Scraping Browser** | `scraping_browser1` | 重度依赖 JS 的数据源:Twitter/X、Reddit、TradingView | | **MCP Server** | — | 直接的 agent 间集成 | ## API 参考 ### `POST /analyze` ``` curl -X POST http://localhost:3008/analyze \ -H "Content-Type: application/json" \ -d '{"asset": "ETH"}' ``` ``` { "asset": "ETH", "threatLevel": "CRITICAL", "summary": "Flash loan exploit targeting ETH-based DeFi protocol confirmed.", "evidence": [ { "title": "ETH exploit drains $4.2M from protocol", "url": "https://..." } ], "timestamp": "2026-05-28T10:42:00Z", "riskAction": "HOLD", "riskReason": "Critical threat detected. Immediate halt recommended." } ``` ### `GET /stream?asset=ETH` Server-Sent Events 流。在 agent 工作时发出事件: ``` data: {"type":"tool_call","tool":"search_web","input":{"query":"ETH exploit news last 24h"}} data: {"type":"tool_result","tool":"search_web","result":"[{\"title\":\"..."}]"} data: {"type":"tool_call","tool":"scrape_url","input":{"url":"https://coindesk.com/..."}} data: {"type":"verdict","verdict":{"threatLevel":"CRITICAL","riskAction":"HOLD",...}} ``` ## MCP 集成 添加到你的 Claude Desktop / Cursor `mcp.json` 中: ``` { "mcpServers": { "sentinel-web-oracle": { "command": "npx", "args": ["ts-node", "/path/to/sentinel-web-oracle/src/mcp/server.ts"], "env": { "BRIGHTDATA_API_KEY": "your_key", "SERP_ZONE": "serp_api1", "UNLOCKER_ZONE": "web_unlocker1", "AI_PROVIDER": "groq", "GROQ_API_KEY": "your_key" } } } } ``` **可用的 MCP 工具:** - `analyze_crypto_threat(asset)` — 完整的 4 步分析 - `batch_threat_scan(assets[])` — 最多对 5 个资产进行并行扫描 ## 环境变量 ``` BRIGHTDATA_API_KEY= # Bright Data API key SERP_ZONE=serp_api1 # SERP API zone name UNLOCKER_ZONE=web_unlocker1 BROWSER_ZONE=scraping_browser1 AI_PROVIDER=groq # groq | anthropic AI_MODEL=llama-3.3-70b-versatile GROQ_API_KEY= # Free at console.groq.com ANTHROPIC_API_KEY= # Optional — only if AI_PROVIDER=anthropic PORT=3008 ``` ## 风险决策矩阵 | 威胁级别 | 风险行动 | 含义 | |---|---|---| | `CRITICAL` | `HOLD` | 确认的漏洞利用或 SEC 行动 — 立即停止风险敞口 | | `ELEVATED` | `MONITOR` | 可疑信号 — 密切关注,减少仓位 | | `NOMINAL` | `CLEAR` | 未检测到重大威胁 | 该 agent **在设计上是保守的**:误报总比漏掉真实的攻击要好。 ## 使用 Kiro 构建 该项目完全使用 **[Kiro](https://kiro.dev)**(AWS 推出的 AI 驱动开发平台)进行端到端构建。Kiro 被用于搭建架构、实现 LLM 抽象层、调试 Bright Data API 集成、构建 SSE 流式 endpoint 以及连接 MCP server——所有这些都是通过自然语言迭代完成的。 ## 黑客松 **活动:** [Web Data UNLOCKED — Bright Data AI Agents 黑客松](https://lablab.ai) **日期:** 2026 年 5 月 25–31 日 **赛道:** 安全与合规 **团队:** NullSentinel ## 许可证 MIT
标签:AI智能体, DeFi, MITM代理, Web数据抓取, 区块链安全, 威胁情报, 实时处理, 开发者工具, 自动化攻击