I’m attempting to use the built-in memory feature in connection with an Azure OpenAI model, but it seems to be struggling with retrieving the message history. When I ask it “What’s my first message?” the response is typically along the lines of, “I’m currently unable to access your initial message. Could I assist you with something else, or do you have any further questions?”
Agent config:
Agent(
name="Normal",
agent_id="normal",
user_id=user_id,
session_id=session_id,
model=AzureOpenAI(id=model_id),
markdown=True,
add_datetime_to_instructions=True,
add_history_to_messages=True,
num_history_responses=3,
read_chat_history=True,
debug_mode=debug_mode,
read_tool_call_history=True,
)
Metrics output:
EBUG ************************************ Async Agent Run Start: 39d24242-c32c-4293-894b-9510022881db *************************************
DEBUG Processing tools for model
DEBUG Included function get_chat_history
DEBUG Included function get_tool_call_history
…
DEBUG ************************************************************* METRICS **************************************************************
DEBUG Getting function get_chat_history
DEBUG Running: get_chat_history(num_chats=1)
DEBUG ================================================================ tool ================================================================
DEBUG Tool call Id: call_c0H3nIum1dR5YAjxxjHklLKL
DEBUG *********************************************************** TOOL METRICS ***********************************************************
DEBUG * Time: 0.0005s
DEBUG *********************************************************** TOOL METRICS ************************
…
DEBUG -------------------------------------------------- Azure Async Response Stream End ---------------------------------------------------
DEBUG Added 4 Messages to AgentMemory
DEBUG Added AgentRun to AgentMemory
DEBUG Logging Agent Run (Async)
DEBUG **************************************** Agent Run End: 39d24242-c32c-4293-894b-9510022881db *****************************************