Need analysis is essential for organisations to design efficient knowledge management (KM) practices, especially in contexts where knowledge is a critical asset and evolving fast. The research explores the application of large language model (LLM)-based agents in automating need analysis for KM practices. A two-layered model using Retrieval-Augmented Generation (RAG) architecture was developed and tested on datasets, including interviews with managers and consultants. The system automates NLP analysis, identifies stakeholder needs, and generates insights comparable to manual methods. Results demonstrate high efficiency and accuracy, with the model aligning with expert conclusions and offering actionable recommendations. This study highlights the potential of LLM-based systems to enhance KM processes, addressing challenges faced by non-technical professionals and optimising workflows.