Add memeory to langchain AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION agent
Labels: name: area: memory, name: area: agent, name: auto:improvement, name: area: models

### System Info

I am write a code and i want to add history to my langchain agent. History is present in chats list



### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [x] My own modified scripts

### Related Components

- [x] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [x] Memory
- [x] Agents / Agent Executors
- [x] Tools / Toolkits
- [x] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

`async def chat_with_agent(user_input, formatting_data, chats: list):
    """
    Initiates a chat with the agent based on the user input.
    """
    try:
        # Initialize the chat model
        llm_model = "gpt-4-1106-preview"
        llm = ChatOpenAI(temperature=0.3, model=llm_model)

        # Load necessary tools
        tool = StructuredTool.from_function(get_human_input)
        tools = load_tools(["serpapi"], llm=llm)
        tools_list = [tool, exposure, get_user_profile, get_user_risk_profile, get_stock_technical_analysis,
                      get_stock_fundamental_analysis, get_mutual_fund_exposure, get_stock_based_news,
                      user_agent_chat_history]

        # Initialize the agent
        agent = initialize_agent(
            tools + tools_list,
            llm,
            agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
            handle_parsing_errors=True,
            verbose=True,
            max_execution_time=1800,
            max_iterations=300,
            agent_kwargs={
                'prefix': "Answer the  questions as best you can. Use tools when needed. First task is check user "
                          "If the query requires and domain specific experts and mention it in response there are other"
                          "experts in system like stock expert, tax expert, mutual fund expert "
                          "First: you task is to answer only financial question only"

            },
            return_intermediate_steps=True
        )

        # Add additional prompt
        extra_prompt = ("You are Relationship Manager. All values are in Indian Rupees. Answers or tasks always lie "
                        "in the capacity of the tools. So ensure you are not expecting anything outside of it."
                        )
        final_input = "This is user input " + user_input + "  This is helping prompt " + extra_prompt
        try:
            logger.info(f"User input + extra prompt: {user_input + extra_prompt}")
            # Run the agent
            result = agent(final_input)
        except Exception as e:
            logger.exception(f"Error while running the agent: {e}")
            result = str(e)
        logger.info(f"Agent chat result: {result['output']}")
        response = personalised_response_from_ai(final_input, str(result['output']), str(result["intermediate_steps"]),
                                                 formatting_data)
        """report = report_writing_tool(user_input, str(result['output']), str(result["intermediate_steps"]))"""
        logger.info(f"Response from GPT: {response}")
        # return f" {response}, Report: {report}"
        if response:
            return response
        else:
            return str(result['output'])

    except Exception as e:
        logger.error(f"Error while talking with RM Agent: {str(e)}")
        raise HTTPException(status_code=500, detail=str(e))`

### Expected behavior

I want add history to my agent