This paper presents a particle swarm optimization-based framework aimed at improving the accuracy of effort and cost estimation in agile software development projects. By applying this optimization technique, the authors demonstrate a significant reduction in the mean magnitude of relative error (MMRE) for estimating software development efforts, achieving an MMRE of 5.12%, which is better than traditional models. The study emphasizes the importance of precise estimation for project success, highlighting the role of agile methodologies in software development.