traderclaw-v2
v2.0.2
Published
TraderClaw V2 — multi-agent Solana memecoin trading plugin for OpenClaw with 8-agent analytical team
Maintainers
Readme
OpenClaw Solana Trader V2 Plugin
Multi-agent Solana memecoin trading plugin — 8-agent analytical team with structured output contracts, cross-agent tasking, and deterministic confidence scoring.
Architecture
The V2 plugin replaces the V1 monolithic single-agent design with a specialized team of 8 agents, each owning a distinct analytical domain. The CTO (Chief Trading Officer) serves as the final decision authority, aggregating scores from specialist agents through a cross-agent tasking protocol.
┌─────────────────────────────────────────────────────────┐
│ CTO (Agent 1) │
│ Final decisions · Portfolio allocation │
│ Heartbeat: 5m · Full tool access │
├──────────┬──────────┬───────────┬───────────────────────┤
│ │ │ │ │
│ On-Chain │ Alpha │ Social │ Smart Money │
│ Analyst │ Signal │ Intel │ Tracker │
│ Agent 3 │ Agent 4 │ Agent 5 │ Agent 6 │
│ │ │ │ │
├───────────┴──────────┴───────────┴──────────────────────┤
│ │
│ Execution Specialist (Agent 2) │ Risk Officer (7) │
│ Trade timing · Slippage mgmt │ Portfolio audits │
│ │ │
│ Strategy Researcher (Agent 8) │
│ Weight evolution · Regime detection │
└─────────────────────────────────────────────────────────┘Signal Domains
| Agent | Domain | Access Pattern | |---|---|---| | On-Chain Analyst | Bitquery research, on-chain discovery | On-demand (CTO cross-tasks) + cron | | Alpha Signal Analyst | SpyFly aggregator, external alpha channels | Heartbeat + webhook + cron | | Social Intelligence Analyst | Twitter/X sentiment, narrative detection | On-demand + cron | | Smart Money Tracker | Whale tracking, deployer profiling | On-demand + cron |
Confidence Scoring
V1 Formula: confidence = 0.60 * onchainScore + 0.40 * signalScore - riskPenalty
V2 Formula: Full weighted formula incorporating all 4 signal sources (on-chain, alpha, social, smart money) with self-evolving weights managed by the Strategy Evolution Researcher.
Agent Roster
| ID | Role | Scheduling | Description |
|---|---|---|---|
| cto | Chief Trading Officer | Heartbeat 5m | Final decision authority. Aggregates analyst scores, manages portfolio. Only agent with state-mutating permissions. |
| execution-specialist | Execution Specialist | Heartbeat 3m (V2) | Trade timing, slippage management, exit execution. Does not initiate trades. |
| onchain-analyst | On-Chain Analyst | On-demand + cron | Deep Bitquery research, on-chain discovery, deployer profiling. |
| alpha-signal-analyst | Alpha Signal Analyst | Heartbeat 5m + webhook | External signal sourcing, caller reputation, signal clustering. |
| social-analyst | Social Intelligence | On-demand + cron | Twitter/X trending, sentiment, narrative exhaustion. |
| smart-money-tracker | Smart Money Tracker | On-demand + cron | Whale tracking, accumulation patterns, fresh wallet detection. |
| risk-officer | Risk & Portfolio Officer | Cron only | Portfolio stress tests, exposure checks. Advisory — does not execute. |
| strategy-researcher | Strategy Researcher | Cron only | Trade outcome analysis, weight adjustments, regime detection. |
ID mapping note: Gateway configs and openclaw.plugin.json use canonical agent IDs listed above. The skill folder social-intel-analyst/ maps to agent ID social-analyst. Architecture docs may reference shortened aliases (e.g., alpha-analyst for alpha-signal-analyst) — always use the full canonical ID in configs.
Setup
1. Plugin Registration
Register the plugin with your OpenClaw Gateway using openclaw.plugin.json. The plugin ID is solana-trader-v2.
2. Configuration Fields
| Field | Required | Description |
|---|---|---|
| orchestratorUrl | Yes | Base URL of the trading orchestrator API |
| apiKey | Yes | API key from signup or https://traderclaw.ai/register |
| walletId | No | Wallet UUID (auto-created on first session if omitted) |
| gatewayBaseUrl | No | Public HTTPS URL of your Gateway for event-to-agent forwarding |
| gatewayToken | No | Bearer token for authenticating forwarded events |
| activeAgents | No | Agent IDs to activate. Defaults to all 8 if omitted. |
| agentId | No | Primary agent ID for subscription event routing |
| apiTimeout | No | HTTP timeout in ms (default: 30000) |
3. Gateway Config
Copy the appropriate gateway config to your Gateway's configuration directory:
- V1 rollout (5 agents):
config/gateway-v1.json5 - V2 full team (8 agents):
config/gateway-v2.json5
Replace "shared-secret" in the hooks.token field with your actual webhook authentication token.
4. Webhook Endpoints
Configure your upstream services to deliver events to:
| Endpoint | Source | Target Agent |
|---|---|---|
| /hooks/alpha-signal | SpyFly alpha aggregator | alpha-signal-analyst |
| /hooks/firehose-alert | Bitquery event-to-agent forwarding | onchain-analyst |
Scheduling
The plugin uses a dual-loop scheduling architecture:
Fast Loop (Heartbeat)
Runs every 3-5 minutes depending on agent. Handles real-time trading: scanning, analysis, decision-making, execution, and position monitoring.
Slow Loop (Cron)
Runs on hour/multi-hour cadences in isolated sessions. Handles retrospective work that benefits from data accumulation.
| Cron Job | Schedule | Agent | Purpose |
|---|---|---|---|
| strategy-evolution | Every 4h | strategy-researcher | Weight adjustments from trade outcomes |
| risk-audit | Every 2h | risk-officer | Portfolio stress tests, exposure checks |
| source-reputation | Every 3h | alpha-signal-analyst | Alpha source win/loss analysis |
| meta-rotation | Every 3h (:30) | onchain-analyst | Narrative cluster analysis |
| whale-watch | Every 2h | smart-money-tracker (V2) / onchain-analyst (V1) | Large wallet movement scanning |
| sentiment-trend | Every 4h | social-analyst (V2 only) | Twitter/X trend analysis |
| dead-money-sweep | Every 2h | cto | Exit stale positions |
| subscription-cleanup | Every 1h | cto | Prune unused Bitquery subscriptions |
| daily-report | Daily 04:00 UTC | cto | PnL summary, performance metrics |
| execution-health | Every 6h | execution-specialist (V2 only) | Slippage and execution quality review |
Cron jobs use CRON_JOB: message prefix. Agents detect this prefix and skip the full trading loop, executing only the specified job.
V1 vs V2 Differences
| Aspect | V1 | V2 | |---|---|---| | Active agents | 5 (CTO, On-Chain, Alpha, Risk, Strategy) | All 8 | | Disabled agents | Execution Specialist, Social, Smart Money | None | | Cron jobs | 8 | 10 | | Max concurrent cron runs | 2 | 3 | | Whale tracking | Consolidated into onchain-analyst | Dedicated smart-money-tracker | | Sentiment analysis | Not available | social-analyst with cron job | | Execution monitoring | CTO handles directly | Dedicated execution-specialist (3m heartbeat) | | Confidence formula | 2-source (on-chain + alpha) | 4-source (on-chain + alpha + social + smart money) |
Upgrade Path (V1 → V2)
- Replace
config/gateway-v1.json5withconfig/gateway-v2.json5 - Ensure all 8 agent skills are deployed to the Gateway
- Update
activeAgentsin plugin config (or remove to default to all 8) - The
whale-watchcron job automatically moves fromonchain-analysttosmart-money-tracker - New cron jobs (
sentiment-trend,execution-health) activate automatically maxConcurrentRunsincreases from 2 → 3 to handle additional cron load
Directory Structure
openclaw-plugin-v2/
├── openclaw.plugin.json # Plugin manifest (agent IDs, config schema)
├── package.json # Package definition
├── index.ts # Plugin entry point
├── config/
│ ├── gateway-v1.json5 # V1 Gateway config (5 agents, 8 cron jobs)
│ └── gateway-v2.json5 # V2 Gateway config (8 agents, 10 cron jobs)
├── skills/ # Per-agent SKILL.md files
│ ├── alpha-signal-analyst/
│ ├── execution-specialist/
│ ├── onchain-analyst/
│ ├── risk-officer/
│ ├── smart-money-tracker/
│ ├── social-intel-analyst/
│ └── strategy-researcher/
└── src/
├── agent-registry.ts # Canonical agent definitions, tool permissions
├── cross-tasking.ts # Cross-agent message bus, permission matrix
├── cross-tasking.test.ts # 90 tests for cross-tasking
├── shared-context.ts # Shared context payload builder
├── output-contracts.ts # Structured output schemas per agent
├── output-validator.ts # Runtime output validation
├── confidence.ts # Deterministic confidence scoring
├── session-manager.ts # Agent session lifecycle
├── http-client.ts # Orchestrator HTTP client
├── alpha-buffer.ts # In-memory alpha signal ring buffer
└── alpha-ws.ts # Alpha WebSocket manager