From 06626789d7e9392ba45c74e983ad8009f199dd5f Mon Sep 17 00:00:00 2001 From: JR Boos Date: Tue, 5 Aug 2025 11:24:16 -0400 Subject: [PATCH] Initialize agent in get_agent function to ensure proper setup before processing requests. --- src/app/endpoints/streaming_query.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/endpoints/streaming_query.py b/src/app/endpoints/streaming_query.py index e4663327c..b0963923d 100644 --- a/src/app/endpoints/streaming_query.py +++ b/src/app/endpoints/streaming_query.py @@ -73,6 +73,8 @@ async def get_agent( enable_session_persistence=True, ) + await agent.initialize() + if existing_agent_id and conversation_id: orphan_agent_id = agent.agent_id agent._agent_id = conversation_id # type: ignore[assignment] # pylint: disable=protected-access