Agriculture is being revolutionized by the integration of the Internet of Things (IoT) and Artificial Intelligence (AI). Traditional farming techniques frequently rely on delayed observations and manual decisions, resulting in inefficient resource management and suboptimal yields. This study introduces an innovative IoT-AI system framework designed for real-time decision-making in agriculture. By combining IoT-based sensor data collection with AI models deployed at the edge, the framework provides immediate, actionable insights for improved irrigation, fertilization, and pest management. The system prioritizes low latency, scalability, and cost-effectiveness to support both small-scale and commercial farms. Initial tests demonstrate notable improvements in resource efficiency, prediction accuracy, and system responsiveness.