Integrate Langchain usage patch and update UI metrics: Apply Langchain usage patch in agent.py, adjust pipeline stage layout in index.html, and enhance metric descriptions in main.js for improved clarity and functionality.
Enhance metrics handling and add EOU support: Update ChannelPublisher and TurnTracer to include end-of-utterance (EOU) metrics, refactor latency calculations, and improve metric attribute handling. Modify UI tooltips for clarity and adjust test cases to validate new metrics structure.
Add LLM connection settings and enhance error handling: Introduce new parameters for LLM connection timeout, retry attempts, and stall timeout in .env.example and settings.py. Update agent.py to log errors and session closures, and implement a watchdog for LLM stall detection in MetricsCollector.
Update PocketTTS configuration and logging: Change sample rate handling to enforce native 24kHz, adjust idle process count in .env.example, and enhance audio diagnostics in main.js for better tracking of remote audio track events.
Add error handling for session bootstrap failures: Implement a client-safe error response payload in session_bootstrap.py and update Streamlit routes to use this new error handling.
Refactor session bootstrap handling and Streamlit app startup: Update start.sh to launch the app using uvicorn, enhance session bootstrap logic in session_bootstrap.py with retry mechanisms for transient errors, and modify streamlit_app.py to conditionally use a new route for session initialization. Add tests for retry behavior and error handling in session bootstrap payload generation.
Refactor metrics handling in MetricsCollector and UI: Consolidate latency calculations, enhance live metrics updates for agent roles, and improve test coverage for EOU latencies without LLM or TTS. Streamline code for clarity and accuracy in metric reporting.
Refactor Streamlit app and UI for session management: Replace token generation with session bootstrap URL, update client rendering logic, and enhance error handling for session initialization. Improve metrics logging in agent and metrics collector for better tracking of session metadata.
Add agent state change handling and improve metrics collection: Introduce AgentStateChangedEvent to track agent state transitions. Update MetricsCollector to record timestamps for first assistant audio when entering the speaking state. Enhance test coverage for new functionality in agent state management.
efactor MetricsCollector and UI to enhance latency tracking and simplify display: Update latency calculations to include STT finalization and LLM generation wait metrics. Remove unused session and trace ID elements from the UI for a cleaner interface. Improve test coverage for new latency metrics and ensure accurate reporting in conversation turns.
Enhance VAD configuration and add fallback participant ID support: Update VAD_MIN_SPEECH_DURATION and VAD_MIN_SILENCE_DURATION for faster response times. Introduce fallback participant ID logic in MetricsCollector to handle cases where participant metadata is absent, ensuring accurate trace reporting.
Add fallback session ID support in MetricsCollector: Introduce a mechanism to generate a console-prefixed fallback session ID when metadata is absent. Update session handling logic to utilize the fallback ID and enhance test coverage for fallback scenarios.
Refactor MetricsCollector to improve latency metrics tracking: Update logic for calculating STT span duration and add support for conversation latency metrics. Enhance test coverage to validate new metrics in tracing spans.
Update Langfuse tracing configuration and enhance metrics collection: Increase trace finalize timeout in .env.example and settings.py. Add support for speech created events in MetricsCollector to capture assistant text. Refactor metrics handling to include additional latency metrics and improve test coverage for speech handling scenarios.
Enhance Langfuse tracing functionality: Add new configuration options for trace timeouts and maximum pending tasks in .env.example and settings.py. Update MetricsCollector to handle assistant text finalization and improve trace task management. Refactor agent logic to ensure accurate trace status reporting and enhance test coverage for tracing behavior.
Add Langfuse tracing support and enhance agent dispatch logic: Introduce optional Langfuse tracing configuration in .env.example and settings.py. Update agent and metrics collector to handle Langfuse traces per user turn. Refactor agent dispatch logic to ensure proper agent management and session metadata handling in the Streamlit app. Enhance UI to display session and trace information.
Enhance Pocket TTS configuration and update documentation: Add new Pocket TTS settings to .env.example, including voice and sample rate options. Update README to reflect new features and improvements in Pocket TTS, including streaming synthesis capabilities and error handling. Refactor Pocket TTS class to streamline voice loading and improve error management during initialization.