$ show ttguy0707/CyberClaw
CyberClaw is an enterprise-grade transparent AI agent architecture that implements a dual-watermark memory system, full behavior auditing, zero-trust execution via two-phase skill invocation, and a heartbeat task engine for scheduled operations. The system provides an interactive conversational interface where users can query time, perform calculations, manage files, execute shell commands within a secure sandbox, and utilize pluggable skills. All agent actions are transparently logged to JSONL files for monitoring and compliance. The architecture features clean separation of concerns with distinct modules for agent logic, skill loading, context management, logging, heartbeat tasks, and tool execution.
The LLM identified 3 files worth highlighting for reuse:
A high-performance JSONL logging system that uses a memory queue and background thread for non-blocking logging operations. Implements singleton pattern with automatic shutdown handling and thread-safe operations. Completely self-contained with no internal dependencies, making it easily extractable for use in other projects requiring efficient audit logging.
Implements a progressive skill loading mechanism that scans only skill metadata at startup and loads full skill content on first use. Features LRU caching (max 50 skills), automatic cache invalidation via file modification time checks, and hot reloading support. Solves the performance problem of slow startup times with many skills, reducing startup time from ~2000ms to <10ms for 100 skills while maintaining backward compatibility.
Implements turn-based conversation context trimming that preserves system messages and groups messages by complete user turns (HumanMessage through associated AI/Tool messages). Provides configurable trigger and keep thresholds for context window management, preventing token explosion while preserving conversation coherence. Self-contained with only external LangChain dependencies, making it reusable in any conversational AI system.