Dynamic Few-Shot Prompting for AI Agents