✓ Verified 🛒 E-commerce ✓ Enhanced Data

Black Box

Indestructible audit logs for agent actions, stored in TiDB Zero.

Rating
3.9 (223 reviews)
Downloads
582 downloads
Version
1.0.0

Overview

Indestructible audit logs for agent actions, stored in TiDB Zero.

Complete Documentation

View Source →

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

  • Bring Your Own Database (Recommended): Set TIDB_* environment variables.
  • 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:

bash
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):

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

Schema

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

Installation

Terminal bash

openclaw install black-box
    
Copied!

💻Code Examples

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

python-basedirrunpy---action-log---level-error---message-system-crash-imminent-memory-leak-detected.txt
### 2. Read Logs
Retrieve the last N logs (default: 10):

Tags

#shopping_and-e-commerce

Quick Info

Category E-commerce
Model Claude 3.5
Complexity Multi-Agent
Author lilyjazz
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install black-box