Context Compaction Visualizer:... Note

Context Compaction Visualizer: See Exactly What Your AI Agent Forgot Before It Costs You

AI agents operating over many turns encounter context limits, forcing them to compress or discard earlier messages. This loss of context is often invisible but critical, potentially causing agents to forget important constraints, user preferences, or prior decisions. The Context Compaction Visualizer platform addresses this by making the context management process transparent. It allows users to upload execution traces from various platforms like LangSmith, OpenTelemetry, or AgentOps. The platform then reconstructs the full session history, detailing which messages were retained, summarized, or discarded. A D3.js timeline visually represents token consumption across all turns with color-coded outcomes. A session replay feature allows step-by-step review, highlighting compaction events and their impact. Token analytics provide insights into total cost and compression efficiency. An optional Claude-powered information loss detector scores the risk of each compaction event and identifies potentially lost information. The platform supports comparative views for evaluating different agents or compaction strategies side-by-side. Setup involves installing Python and Node.js, configuring an optional Anthropic API key, and running backend and frontend services, or using Docker. The backend includes parsers for multiple trace formats, normalizing them before further processing. Key design decisions include parser normalization, graceful fallback for the info loss detector, and efficient D3.js integration within React. The project aims to provide a record of what context was lost and its value, by making the invisible process of context compaction visible.
CdXz5zHNQW_XlLw0jOkT9.webp