What problem does it solve?
Long-lived chat agent logic that drains a user-message queue between cleanly-finished turns; bursts of typing are coalesced into one batch via a debounce window; mid-task tool exchanges pass through to the next iteration without checking for new input.
Core Features & Use Cases
- Buffers user messages from a queue between turns to maintain a smooth, responsive conversation.
- Debounces bursts of typing into a single batch to reduce churn and improve throughput.
- Executes tool calls mid-turn and continues to the next iteration without waiting for new input.
- Defines external lifetime control to terminate sessions from the outside (Ctrl-C, WebSocket disconnect, etc.).
- Suitable for interactive CLI agents, WebSocket-based agents, or any long-lived conversational loop requiring controlled input flow.
Quick Start
Start the conversation loop by passing a user message queue and the required tools, then let the loop drive turns automatically.