Kairo is a real-time event pipeline that consumes system events from Kafka, batches them in Redis, and generates concise AI-powered markdown reports on a scheduled interval using OpenAI via LangChain. It is built with Bun and TypeScript, and is designed to run as a single long-lived backend service.
Features
- Real-time Kafka event consumption with SASL/SCRAM-SHA-256 + TLS authentication
- Atomic Redis queue with batch overflow handling — excess events are returned to the queue, never dropped
- Scheduled AI-powered markdown reports via OpenAI and LangChain
- Configurable batch size and report interval via environment variables
- Retry logic with exponential backoff for failed AI calls
- Dead-letter queue for unrecoverable batches (
ai:batch:failed) - Built-in event simulator for local development and demos
Use Cases
- DevOps teams needing automated incident summaries from system events
- Data engineers requiring structured reports from streaming data
- Any scenario where raw Kafka streams need to be transformed into human-readable insights
