← Back to Skills Marketplace
76
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install adversarial-engine
Description
多模型对抗引擎 - 四模型真实对抗辩论系统。架构师+工程师+安全官+仲裁者协作,代码沙箱验证,向量检索增强,收敛判断自动熔断。
README (SKILL.md)
多模型对抗引擎 v2.0
核心能力
| 能力 | 说明 |
|---|---|
| 🎭 四模型对抗 | 架构师/工程师/安全官/仲裁者真实协作 |
| 🔧 代码沙箱 | 工程师生成代码 → Python执行验证 |
| 📚 向量检索 | 对话前检索知识库,避免假数据 |
| ⚖️ 收敛判断 | 仲裁者动态判断,避免无限循环 |
| 🔄 断点续传 | 中断后可恢复辩论 |
| 📡 WebSocket | 实时推送辩论进度 |
四模型配置
| 角色 | 模型 | 职责 |
|---|---|---|
| 🏗️ 架构师 | qwen3.5-plus | 方案生成 |
| 🔧 工程师 | qwen3-coder-plus | 代码实现+验证 |
| 🔍 安全官 | kimi-k2.5 | 漏洞攻击 |
| ✅ 仲裁者 | MiniMax-M2.5 | 收敛判断 |
执行流程
用户输入
↓
[1] 向量检索 → 知识库增强
↓
[2] 架构师 → 提出方案
↓
[3] 工程师 → 生成代码 → Python沙箱执行
↓
[4] 安全官 → 攻击漏洞
↓
[5] 仲裁者 → 收敛判断
↓
[6] 未收敛 → 返回[2]继续
↓ 已收敛
[7] 保存结论 → 知识库固化
API接口
启动对抗
from adversarial_engine import AdversarialEngine
engine = AdversarialEngine()
session = engine.run_debate(
topic="如何设计高并发CNC报价系统?",
max_rounds=5,
enable_code_sandbox=True,
enable_vector_search=True
)
WebSocket实时推送
ws://host:8083/ws
→ 实时推送每轮辩论内容
文件结构
adversarial-engine/
├── SKILL.md # 本文件
├── engine.py # 核心引擎
├── code_sandbox.py # Python沙箱
├── vector_enhancer.py # 向量检索增强
├── ws_server.py # WebSocket服务
└── database.py # 数据持久化
🦫 海狸 | 靠得住、能干事、在状态
Usage Guidance
Do not run this on a production or sensitive host without review. Specific things to consider before installing or running: 1) Embedded API key: the code contains a DEFAULT_API_KEY and calls an external LLM endpoint — replace the key with your own or remove it; treat the embedded key as compromised. 2) Remote calls: prompts, including any confidential data you supply, will be sent to the external service (coding.dashscope.aliyuncs.com) by default. 3) Code execution: the 'sandbox' runs model-generated Python via subprocess with only a timeout and temp-file deletion — this is not a secure sandbox (no namespace isolation, no seccomp, no chroot). Run inside an isolated container or VM, or harden the sandbox. 4) File and network exposure: the server serves files from /home/admin paths and opens a network port (0.0.0.0) — this can expose local files; restrict binding or firewall appropriately. 5) Missing/declarative inconsistencies: SKILL.md filenames differ from the packaged files and no dependencies or env vars are declared — expect to manually install requirements. Recommended steps: run in an isolated disposable container, audit and remove the hard-coded key, configure a trusted key router or your own API key via a secure env var, restrict network access to the server, and review any local knowledge base files that the skill will read. If you lack the ability to safely sandbox or review the code, avoid installing or invoking this skill.
Capability Analysis
Type: OpenClaw Skill
Name: adversarial-engine
Version: 1.0.0
The bundle implements a multi-agent debate system that includes a 'Code Sandbox' feature in engine.py and async_engine.py. This feature executes LLM-generated Python code directly on the host system using subprocess.run without any containerization or isolation, creating a high risk of Remote Code Execution (RCE) if an agent is prompted to generate malicious code. The bundle also contains a hardcoded API key (sk-sp-2b89d1b9a55d4cb9a8094c9127459aab) and exposes unauthenticated FastAPI/WebSocket servers in server.py and ws_server.py, which could allow unauthorized remote users to trigger the vulnerable execution engine.
Capability Assessment
Purpose & Capability
The code implements the advertised features (multi-role LLM calls, code sandbox, vector search, WebSocket server) so purpose and capability broadly align. However, the implementation embeds a DEFAULT_API_KEY and a BASE_URL for an external LLM service (coding.dashscope.aliyuncs.com) that are not declared in the skill metadata (no required env vars). The SKILL.md's file list (code_sandbox.py, vector_enhancer.py, database.py) does not match the provided filenames, indicating sloppy packaging or stale documentation.
Instruction Scope
SKILL.md describes running engine.run_debate and exposing a WebSocket, which matches the code. But the runtime behavior includes: (1) calls to an external LLM API (sending prompts, possibly code and sensitive context) using a hard-coded key; (2) executing model-generated Python via subprocess without strong containment (only timeout + deletion of temp file); (3) reading a local knowledge base path (/home/admin/.openclaw/workspace/kb) and writing a sqlite DB under /home/admin/.openclaw/workspace/data — these side effects are not documented in the skill metadata.
Install Mechanism
There is no install spec (instruction-only), so nothing is pulled automatically at install time. However, the package includes runnable Python code that depends on third-party libraries (requests, aiohttp, fastapi, uvicorn). Because there is no declared install step, users may attempt to run the code in an environment missing these deps. No external download URLs or extract steps are present (lower install risk), but the included code will execute when invoked.
Credentials
The skill declares no required environment variables or credentials, yet the code embeds DEFAULT_API_KEY = "sk-sp-..." and will use it to call an external LLM endpoint. It also tries to import a local api_key_manager (if present) to route keys. Asking for no creds while using a hard-coded key is inconsistent and a red flag: the skill will exfiltrate prompts/outputs to a remote service using that embedded key unless replaced. It also reads/writes host paths (kb, DB) without declaring them.
Persistence & Privilege
The skill does not set always:true and doesn't modify other skills. It creates a sqlite database under /home/admin/.openclaw/... and can start an HTTP/WebSocket server bound to 0.0.0.0, which opens a network service and serves files from local paths. Those behaviors give it persistent presence (on-disk DB, listening network port) and potential to expose host files if run on an unrestricted host; this is expected for a server but should be considered when choosing the runtime.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install adversarial-engine - After installation, invoke the skill by name or use
/adversarial-engine - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Major update: v2.0 introduces a multi-model adversarial debate system with code verification and knowledge enhancement.
- Adds four-role debate (Architect, Engineer, Security Officer, Arbiter) with real collaboration.
- Integrates Python code sandbox for automatic code validation.
- Implements vector search for knowledge base augmentation to reduce misinformation.
- Includes convergence judgment to prevent endless debate cycles.
- Provides breakpoint resume and real-time WebSocket debate progress.
- Offers structured API and clear file organization.
Metadata
Frequently Asked Questions
What is Adversarial Engine?
多模型对抗引擎 - 四模型真实对抗辩论系统。架构师+工程师+安全官+仲裁者协作,代码沙箱验证,向量检索增强,收敛判断自动熔断。 It is an AI Agent Skill for Claude Code / OpenClaw, with 76 downloads so far.
How do I install Adversarial Engine?
Run "/install adversarial-engine" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Adversarial Engine free?
Yes, Adversarial Engine is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Adversarial Engine support?
Adversarial Engine is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Adversarial Engine?
It is built and maintained by Timo2026 (@timo2026); the current version is v1.0.0.
More Skills