Saints lost 3-2 at home to Hibs on Saturday after falling behind in the sixth minute when goalkeeper Craig Samson lost possession to Leigh Griffiths.
Lennon was keen to heap praise Samson for his overall contribution and the way he bounced back but he is wary of Ayr, who have already knocked Inverness and Hearts out of the competition.
“They are a very, very difficult team,” Lennon said. “They are very, very well organised.
“What we can’t afford to do, as we did on Saturday, is gift teams a start. If they [Ayr] do manage to get into a lead . . . that would make it even more difficult.”