← 返回
安全合规 Key 中文

black-box

Indestructible audit logs for agent actions, stored in TiDB Zero.
{"answer":"代理操作的不可破坏审计日志,存储于 TiDB Zero。"}
lilyjazz
安全合规 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 1,066
下载
💾 5
安装
1
版本
#latest

概述

Black Box (Powered by TiDB Zero)

Overview

Black Box is an indestructible audit log for AI Agents. It acts as a "Flight Data Recorder" that streams critical actions, errors, and reasoning chains to a persistent cloud database (TiDB Zero) in real-time.

Security & Provisioning

  1. Bring Your Own Database (Recommended): Set TIDB_* environment variables.
  2. Auto-Provisioning (Fallback): If no credentials are found, this skill uses the TiDB Zero API to create a temporary database for logging. The connection string is cached in ~/.openclaw_black_box_dsn.

Why use this?

  • Crash Survival: Local logs vanish when containers crash. Cloud logs persist.
  • Audit Trail: Prove exactly what your agent did and why (compliance).
  • Debugging: Retrieve the last 100 actions leading up to a failure.

Prerequisites

  • TiDB Credentials: Standard MySQL connection parameters (TIDB_HOST, TIDB_USER, etc.).
  • Network: Outbound access to TiDB Cloud (port 4000).

Usage

1. Log an Event

Record a critical action or error:

python {baseDir}/run.py --action log --level ERROR --message "System crash imminent: Memory leak detected"

2. Read Logs

Retrieve the last N logs (default: 10):

python {baseDir}/run.py --action read --limit 20

Schema

This skill creates a table agent_logs with columns: timestamp, level, message, metadata (JSON).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 10:37 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,714
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,605
ai-intelligence

agent-teleport

lilyjazz
使用 TiDB Zero 将代理的配置和内存无缝迁移到新机器。
★ 0 📥 1,203