Mastering the Fundamentals of Building Effective AI Agents