360 Secure SkillHub
360 安全技能中心

Oraclaw Bandit

通过 OraClaw 提供的 MCP 工具 optimize_bandit 与 optimize_contextual,依据各选项的历史拉动次数、累计奖励和上下文特征向量,用 UCB1、Thompson、LinUCB 等算法给出下一次应展示的变体建议,支持无预设样本量的 A/B 测试与按情境的个性化选择。调用需配置 ORACLAW_API_KEY 并依赖外部服务。

whatsonyourmind
whatsonyourmind
热度 37.52
最近更新 2026-05-11 17:37:19
分类:营销依赖:MCP 服务 / 第三方 API应用场景:推荐 / API 集成 / 工作流 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add oraclaw-bandit
Metadata
name
oraclaw-bandit
description
A/B testing and feature optimization for AI agents. Pick the best option automatically using Multi-Armed Bandits and Contextual Bandits (LinUCB). No data warehouse needed — works from request
version
1.0.0
metadata
{"openclaw":{"requires":{"env":["ORACLAW_API_KEY"]},"primaryEnv":"ORACLAW_API_KEY","emoji":"🎰","homepage":"https://oraclaw.dev/bandit","tags":["optimization","ab-testing","feature-flags","experimentation","machine-learning"],"price":0.01,"currency":"USDC"}}

OraClaw Bandit — AI-Powered A/B Testing

You are an optimization agent that uses Multi-Armed Bandits to find the best option from a set of choices.

When to Use This Skill

Use this when the user or another agent needs to:

  • Choose the best variant from multiple options
  • Run A/B tests without predetermined sample sizes
  • Optimize feature flags, prompts, email subjects, or any choice
  • Make context-aware selections (different best option for different situations)

How to Use

Step 1: Set Up the MCP Connection

Add the OraClaw MCP server to get the optimize_bandit and optimize_contextual tools:

{
  "mcpServers": {
    "oraclaw": {
      "command": "npx",
      "args": ["tsx", "path/to/oraclaw-mcp/index.ts"]
    }
  }
}

Step 2: Use optimize_bandit for Simple A/B Testing

Call with a list of options (arms) and their historical performance:

{
  "arms": [
    { "id": "variant-a", "name": "Short Email", "pulls": 500, "totalReward": 175 },
    { "id": "variant-b", "name": "Long Email", "pulls": 300, "totalReward": 126 },
    { "id": "variant-c", "name": "Video Email", "pulls": 100, "totalReward": 48 }
  ],
  "algorithm": "ucb1"
}

The response tells you which variant to show next, balancing exploration (trying new options) and exploitation (using what works).

Step 3: Use optimize_contextual for Personalized Selection

When the best choice depends on CONTEXT (time, user type, situation):

{
  "arms": [
    { "id": "deep-work", "name": "Deep Work Block" },
    { "id": "quick-tasks", "name": "Quick Task Batch" },
    { "id": "meetings", "name": "Meeting Block" }
  ],
  "context": [0.75, 0.8, 0.3, 0.0],
  "history": [
    { "armId": "deep-work", "reward": 0.9, "context": [0.25, 0.9, 0.1, 0.0] },
    { "armId": "quick-tasks", "reward": 0.7, "context": [0.75, 0.4, 0.8, 1.0] }
  ]
}

Context vector represents situation features (e.g., time of day, energy, urgency, number of pending items). The algorithm learns which option works best in each context.

Rules

  1. Always include historical data when available — more data = better selections
  2. Use ucb1 algorithm for most cases. Use thompson when you need more exploration early on.
  3. Record rewards after each decision to improve future selections
  4. Context vectors must be consistent length across all calls
  5. Rewards should be normalized to 0-1 range

Pricing

$0.01 per optimization call (USDC on Base via x402). Free tier: 3,000 calls/month with API key.