From 2c573bec51ac1d43ef2ded4bdb143f7b816e7781 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 7 Jan 2026 12:03:05 -0600 Subject: [PATCH] fix(agents): remove non-existent AsyncAgent.initialize() calls The AsyncAgent class in llama-stack-client 0.3.5 does not have an initialize() method. These calls were causing AttributeError at runtime. The agent does not require explicit initialization - create_session() works without it. Signed-off-by: Major Hayden --- src/utils/endpoints.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/utils/endpoints.py b/src/utils/endpoints.py index 372e3b4e..42ce3b43 100644 --- a/src/utils/endpoints.py +++ b/src/utils/endpoints.py @@ -355,7 +355,6 @@ async def get_agent( tool_parser=None if no_tools else GraniteToolParser.get_parser(model_id), enable_session_persistence=True, # type: ignore[call-arg] ) - await agent.initialize() # type: ignore[attr-defined] if existing_agent_id and conversation_id: logger.debug("Existing conversation ID: %s", conversation_id) @@ -412,7 +411,6 @@ async def get_temp_agent( # type: ignore[call-arg] # Temporary agent doesn't need persistence # enable_session_persistence=False, ) - await agent.initialize() # type: ignore[attr-defined] # Generate new IDs for the temporary agent # conversation_id = agent.agent_id