← 返回
未分类 中文

BanditDB

BanditDB is an in-memory decision database for AI agents — real-time learning from outcomes. Use it to auto-tune notification timing, model routing, or promp...
BanditDB 是一个用于 AI 代理的内存决策数据库——实时从结果中学习。用它可以自动调整通知时机、模型路由或提示词。
simeonlukov
未分类 clawhub v0.1.6 1 版本 100000 Key: 无需
★ 1
Stars
📥 401
下载
💾 0
安装
1
版本
#latest

概述

BanditDB Skill

BanditDB is a self-hosted decision database. It learns which choice works best for which context

through contextual multi-armed bandits — no ML pipeline required.

Setup

Install BanditDB from GitHub releases or run the Docker image (see references/api.md for details).

Default port: 8080. Verify by requesting GET /campaigns.

Core Workflow

Three-step loop — create once, then predict and reward repeatedly:

  1. Create a campaign — define a campaign ID, the arms (choices), and context feature dimension.
  2. Get a prediction — pass a context vector, receive the recommended arm and an interaction ID.
  3. Record a reward — report the outcome (0.0–1.0) for the interaction ID.

For full API details, request/response examples, and MCP tool registration, see references/api.md.

Designing Context Vectors

The context vector is the most important design decision. Each float encodes something about the

current situation. Normalize values to roughly 0–1 range.

Examples:

  • Notification timing: [hour_of_day/24, day_of_week/7, messages_today/10, last_response_delay_mins/60]
  • Tool selection: [query_length/500, has_code_mention, has_url, specificity_score]
  • Prompt strategy: [task_complexity, domain_familiarity, output_length_needed, structured_output]

Use Cases for OpenClaw Agents

  • Smart notifications — learn when/how to reach the user (arms: morning/afternoon/evening, channel variants)
  • Tool routing — which tool to use for a query type (arms: web_search/memory/file_lookup/ask)
  • Model selection — which model for which task (arms: opus/sonnet/haiku)
  • Response style — learn user preferences (arms: brief/detailed/bullet_points)
  • Heartbeat frequency — when to check in vs stay quiet

Key Details

  • Algorithms: LinUCB (default, supports causal analysis) or Thompson Sampling
  • Cold start: meaningful lift typically after 300–1500 interactions depending on noise
  • Parquet export available for offline causal analysis (LinUCB only)
  • WAL ensures crash recovery — no data loss on restart
  • ~10K predictions/s on a single node

版本历史

共 1 个版本

  • v0.1.6 当前
    2026-05-03 09:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,776
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,136
ai-intelligence

Self-Improving + Proactive Agent

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