How AI Agents Work: The Technology Behind Autonomous AI