← Back to Skills Marketplace
alanarchy

ClawSwarm

by alanarchy · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
218
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install clawswarm-consensus
Description
Multi-agent swarm prediction with consensus engine. Use when: running multiple AI agents to predict prices, values, or outcomes and aggregating their predict...
README (SKILL.md)

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

Script Purpose
scripts/swarm_runner.py Orchestrate multi-agent predictions
scripts/consensus.py Standalone 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)
Usage Guidance
This skill appears to do what it says: run many LLM agents and compute a consensus. Before installing or running it: - Provide an LLM API key (e.g., GROQ_API_KEY, OPENAI_API_KEY) via environment variable or the config; the registry metadata currently does not list required env vars, so manually ensure you set the key. - Do not point 'base_url' to untrusted servers — the tool sends full prompts (including any context you include) to the configured endpoint, which could leak sensitive data. - Start with a dry-run and small agent counts to verify behavior and cost. Review your config for any sensitive context fields before sending to external APIs. - Keep API keys limited in scope and rotate/revoke them if you suspect misuse. If you need guarantees about where prompts are sent, prefer local providers (e.g., Ollama at localhost) or vetted hosted endpoints.
Capability Analysis
Type: OpenClaw Skill Name: clawswarm-consensus Version: 0.1.0 The ClawSwarm skill bundle is a legitimate multi-agent prediction and consensus framework. The core logic in `swarm_runner.py` orchestrates LLM API calls to established providers (Groq, OpenAI, Ollama) using standard environment variables for authentication, while `consensus.py` implements robust statistical aggregation techniques like Median Absolute Deviation (MAD) filtering. No evidence of data exfiltration, malicious command execution, or prompt injection was found; the code is well-structured, follows its stated purpose, and uses standard dependencies like `numpy` and `requests` appropriately.
Capability Assessment
Purpose & Capability
Name/description describe a multi-agent prediction and consensus tool; included scripts (swarm_runner.py and consensus.py), README, and config reference implement exactly that behavior. Required binaries and permissions in the registry are minimal and consistent with running Python scripts and making HTTP calls to LLM providers.
Instruction Scope
SKILL.md and examples instruct running swarm_runner.py and consensus.py and to set an API key environment variable (e.g., GROQ_API_KEY). Runtime actions are limited to reading a provided config file, making outbound HTTP requests to LLM provider endpoints, and piping results through the local consensus engine. It does not attempt to read arbitrary host files or credentials. Note: the registry metadata lists no required env vars, but the examples and code expect an API key (via env var or config).
Install Mechanism
There is no install spec — this is instruction + packaged Python scripts. No installers, downloads, or extracted archives are used. Dependencies are normal Python libs (numpy, requests, pyyaml) and are declared in README; risk from install mechanism is low.
Credentials
The code expects an LLM API key (examples use GROQ_API_KEY) and may accept an api_key in the config; however the skill metadata declares no required env vars or a primary credential. Requesting an LLM API key is proportionate to the stated purpose, but the mismatch between metadata and the code (and the ability to set arbitrary base_url) should be noted.
Persistence & Privilege
Skill is not always-enabled and does not request elevated or persistent system privileges. It runs as a normal user process, spawns a local subprocess for consensus.py, and does not modify other skills or system-wide configs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clawswarm-consensus
  3. After installation, invoke the skill by name or use /clawswarm-consensus
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Initial release: multi-agent consensus prediction engine with MAD outlier filtering, adaptive anchoring, and configurable swarm orchestration.
Metadata
Slug clawswarm-consensus
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is ClawSwarm?

Multi-agent swarm prediction with consensus engine. Use when: running multiple AI agents to predict prices, values, or outcomes and aggregating their predict... It is an AI Agent Skill for Claude Code / OpenClaw, with 218 downloads so far.

How do I install ClawSwarm?

Run "/install clawswarm-consensus" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ClawSwarm free?

Yes, ClawSwarm is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ClawSwarm support?

ClawSwarm is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ClawSwarm?

It is built and maintained by alanarchy (@alanarchy); the current version is v0.1.0.

💬 Comments