← 返回
AI智能 Key 中文

ClawSwarm

Multi-agent swarm prediction with consensus engine. Use when: running multiple AI agents to predict prices, values, or outcomes and aggregating their predict...
具备共识引擎的多智能体群体预测。适用于运行多个AI智能体预测价格、数值或结果并聚合其预测结果的场景。
alanarchy
AI智能 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 523
下载
💾 10
安装
1
版本
#latest

概述

ClawSwarm

Multi-agent collective intelligence framework. Run N agents with different analytical perspectives, aggregate predictions through a statistical consensus engine.

Quick Start

1. Create a config file

target:
  name: "Gold"
  current_price: 5023.1
  unit: "USD/troy oz"
  context: "RSI: 40.8 | MA5: 5084 | MA10: 5120"

agents:
  - role: "Macro analyst focusing on geopolitical risk"
    count: 50
    temperature_range: [0.4, 0.7]
  - role: "Technical RSI/MACD momentum trader"
    count: 30
    temperature_range: [0.45, 0.6]
  - role: "Mean reversion auditor"
    count: 20
    temperature_range: [0.35, 0.55]

api:
  provider: groq
  model: llama-3.3-70b-versatile
  api_key_env: GROQ_API_KEY
  delay_ms: 1200

consensus:
  max_deviation: 0.15

2. Run the swarm

python3 scripts/swarm_runner.py --config swarm.yaml

Output: JSON with final_price, median_price, confidence, bull_ratio, and all individual predictions.

3. Run consensus standalone

Pipe any predictions array to the consensus engine:

echo '{"predictions":[{"price":100.5,"confidence":70},{"price":99.8,"confidence":60}],"anchor_price":100.0}' \
  | python3 scripts/consensus.py

Architecture

Config (YAML/JSON)
  ↓
Swarm Runner (swarm_runner.py)
  ├─ Agent 1 → LLM API → prediction
  ├─ Agent 2 → LLM API → prediction
  ├─ ...
  └─ Agent N → LLM API → prediction
  ↓
Consensus Engine (consensus.py)
  ├─ Bias correction
  ├─ MAD outlier filtering
  ├─ Anchor-distance filtering
  ├─ Multi-method aggregation (weighted 40% + median 35% + trimmed mean 25%)
  ├─ Adaptive anchoring (dispersion → anchor strength)
  └─ Clamping
  ↓
Final consensus prediction + confidence + bull/bear ratio

Key Concepts

Agent diversity: Each agent gets a different role prompt and temperature. More diversity = better consensus.

Consensus engine: Not a simple average. Uses MAD (Median Absolute Deviation) to filter outliers, adaptive anchoring to stabilize results when predictions are dispersed, and multi-method aggregation for robustness.

1 agent or 1000: Works with any count. Single agent bypasses consensus. 5+ agents get full pipeline.

Config Reference

See references/config-reference.md for full field documentation and example configs.

Scripts

ScriptPurpose
-----------------
scripts/swarm_runner.pyOrchestrate multi-agent predictions
scripts/consensus.pyStandalone consensus engine (pipe JSON in)

Dependencies

  • Python 3.8+
  • numpy (for consensus engine)
  • requests or urllib (for API calls)
  • pyyaml (optional, for YAML configs; JSON always works)

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 07:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,056 📥 794,576
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 833 📥 212,622
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,350 📥 317,489