How a Stubborn AI Agent Led Me to Redesign How APIs Talk to Machines