Building Autonomous AI Agents in Python: Perception to Action