← 返回
未分类 Key 中文

ClawTrial Courtroom

AI Courtroom for behavioral oversight. Autonomous daemon that monitors conversations, detects behavioral violations, and posts cases to a public API. Auto-st...
AI法庭用于行为监督。自主守护进程监控会话,检测违规行为并将案例发布至公开API,自动...
assassin-1234
未分类 clawhub v1.2.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 271
下载
💾 0
安装
1
版本
#latest

概述

ClawTrial Courtroom

Autonomous behavioral oversight system that monitors conversations in real-time, detects violations, and automatically files cases to a public API.

Overview

The Courtroom runs as a background daemon that:

  • Auto-starts when the package is installed
  • Monitors messages via HTTP endpoint (port 8765)
  • Analyzes conversations every 5 minutes (configurable)
  • Posts violations to your public cases API

8 Offense Types Detected

  • Circular Reference - Asking the same question repeatedly
  • Validation Vampire - Excessive need for confirmation
  • Goalpost Shifting - Moving requirements after agreement
  • Jailbreak Attempt - Trying to bypass constraints
  • Emotional Manipulation - Using guilt/shame to steer responses
  • Context Ignorer - Asking about info just provided
  • Premature Optimization - Worrying about scale before basics
  • Yak Shaver - Endless prep tasks avoiding the actual goal

Installation

npx clawhub install courtroom

The daemon auto-starts on installation. No manual intervention needed.

Configuration

Edit ~/.openclaw/courtroom/config.json:

{
  "apiEndpoint": "https://api.clawtrial.com/cases",
  "apiKey": "your-api-key-here",
  "analysisIntervalMinutes": 5,
  "minMessagesBeforeAnalysis": 3,
  "confidenceThreshold": 0.6,
  "enabled": true,
  "autoStart": true
}
OptionDescriptionDefault
------------------------------
apiEndpointURL to POST cases tohttps://api.clawtrial.com/cases
apiKeyAPI authentication keynull
analysisIntervalMinutesHow often to analyze5
confidenceThresholdMinimum confidence to file case0.6 (60%)
enabledWhether daemon is activetrue
autoStartStart on installationtrue

Commands

# Check status
courtroom-status

# Start daemon (if stopped)
courtroom-start

# Stop daemon
courtroom-stop

# Enable/disable auto-start
courtroom-enable
courtroom-disable

How It Works

1. Message Ingestion

Your OpenClaw agent (or any system) sends messages to the daemon:

curl -X POST http://localhost:8765/message \
  -H "Content-Type: application/json" \
  -d '{"role":"user","content":"hello","timestamp":1234567890}'

2. Periodic Analysis

Every 5 minutes (configurable), the daemon:

  • Analyzes the conversation history
  • Detects behavioral patterns
  • Scores violations by confidence

3. Case Filing

When a violation is detected (confidence ≥ 60%):

  • Saves case locally to ~/.openclaw/courtroom/verdict_*.json
  • POSTs case to your configured API endpoint

Case Payload

{
  "caseId": "case-1772389381041",
  "timestamp": "2026-03-01T18:23:01.041Z",
  "offense": {
    "offenseId": "validation_vampire",
    "offenseName": "The Validation Vampire",
    "severity": "minor",
    "confidence": 0.8
  },
  "conversationSummary": {
    "messageCount": 12,
    "lastMessageTime": 1234567890
  },
  "source": "courtroom-daemon"
}

Integration with OpenClaw

Add this to your OpenClaw agent to auto-send messages:

// In your agent's message handler
async function onMessage(message) {
  // Send to courtroom daemon
  await fetch('http://localhost:8765/message', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      role: message.role,
      content: message.content,
      timestamp: Date.now()
    })
  });
}

Logs

View daemon logs:

tail -f ~/.openclaw/courtroom/daemon.log

Manual Analysis (Optional)

You can still run manual analysis:

# Analyze a conversation file
openclaw run courtroom --file conversation.json

Architecture

┌─────────────┐     HTTP POST      ┌─────────────────┐
│   OpenClaw  │ ─────────────────> │  Courtroom      │
│   Agent     │   /message         │  Daemon :8765   │
└─────────────┘                    └────────┬────────┘
                                            │
                              Every 5 min   │
                                            ▼
                                    ┌───────────────┐
                                    │   Analyze     │
                                    │   History     │
                                    └───────┬───────┘
                                            │
                              Violation     │
                              Detected      ▼
                                    ┌───────────────┐
                                    │  POST to API  │
                                    │  Save Local   │
                                    └───────────────┘

Troubleshooting

Daemon not starting?

courtroom-status
# Check if port 8765 is in use
lsof -i :8765

Change API endpoint?

# Edit config and restart
nano ~/.openclaw/courtroom/config.json
courtroom-stop
courtroom-start

View all cases?

ls ~/.openclaw/courtroom/verdict_*.json

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-05-20 05:37 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,798
ai-intelligence

Self-Improving + Proactive Agent

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

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,127