Debug Panel
Real-time debugging TUI for RAG operations.
The Debug Panel provides a terminal-based interface for real-time visibility into your RAG pipeline—watching operations as they happen, running interactive queries, inspecting stored documents, and diagnosing configuration issues.
The debug battery adds two components to your Unrag installation:
A WebSocket debug server that runs alongside your application when UNRAG_DEBUG=true is set. The server broadcasts debug events and accepts interactive commands without affecting your application's normal operation.
A terminal UI (TUI) that you launch with bunx unrag debug. The TUI connects to the debug server and provides eight specialized panels for different debugging tasks.
Installing the debug battery
bunx unrag@latest add battery debugThis installs the debug module into your project and adds the necessary dependencies.
Quick setup
- Set
UNRAG_DEBUG=truein your environment - Register your engine in your app:
import { registerUnragDebug } from "@unrag/debug";
const engine = createUnragEngine();
registerUnragDebug({ engine, storeInspector: engine.storeInspector });- Start your app, then connect the TUI:
bunx unrag debugFull documentation
The Debug Panel has comprehensive documentation covering all aspects of the tool:
Debugging Overview
Introduction and architecture
Getting Started
Complete setup guide
Understanding Events
Event types and timing analysis
Best Practices
Effective debugging workflows
Programmatic API
Building custom debug tools
