Incorporating intelligent agents for efficient data handling in IoT networks