$ show strongdm/cxdb
CXDB is a context database for AI agents, designed to store and manage conversation histories, tool outputs, and provenance metadata. It uses a Turn DAG (Directed Acyclic Graph) for immutable turn storage, content-addressed blob storage (BLAKE3) for payload deduplication, and a type registry for forward-compatible schema evolution with msgpack projection. The system is multi-tier: a Rust server handling binary protocol and HTTP APIs, a Go gateway providing OAuth authentication and proxying, and a React/Next.js frontend for visualization and debugging. Clients are provided in Go and Rust. The architecture emphasizes crash-safety through append-only logs, efficient branching (O(1) fork), and real-time event streaming via SSE. While the codebase demonstrates strong engineering practices, there are notable gaps between documentation and implementationβHTTP write paths and idempotency enforcement are documented but not yet built. This is a production-grade application, not a research artifact, and is actively maintained by StrongDM.
The LLM identified 4 files worth highlighting for reuse:
Implements a generic reconnecting client that wraps any operation with automatic reconnection logic, including request queuing during disconnection, exponential backoff with jitter, and connection state management. It is self-contained, uses no internal imports beyond standard Rust and the client's own types, and could be extracted for use in any networked application requiring resilient connections.
Provides an append-only log storage for turns with binary record encoding, CRC integrity checks, separate index files, and ancestry checkpoints for efficient context containment queries. The pattern is domain-specific but demonstrates high craftsmanship in durable, crash-safe, and queryable event storage. It is isolated enough to serve as a reference implementation for similar systems.
A recursive descent parser for the custom CQL (Context Query Language) implemented in pure TypeScript with no external dependencies. It handles binary expressions, unary operators, literals, and field references. The parser is self-contained, well-typed, and could be reused or adapted for other domain-specific query languages.
Go implementation of a reconnecting client with similar patterns to the Rust version: exponential backoff, request queuing during reconnection, and graceful error handling. It leverages Go channels and goroutines for concurrency and is a standalone reusable component for any Go project needing resilient client connections.