Teaching AI to sell food


How do you get better at AI? Experiment.

Demo at the end ↓

Being a software engineer, I thought: “What would it take to build an AI agent for ordering food via WhatsApp?” In Lagos, WhatsApp is a standard channel for ordering food: you message the restaurant, they send the menu, you send a transfer, someone confirms it. So I reached out to my friend and built an AI solution around his business, Chow45.

Then I got to work.

Getting WhatsApp to talk

I got credentials from Meta and started sending automated messages. Then I built an environment for the agent: a simple chat page, configurations for the agent like the restaurant name, things like that.

Realization

Taking an order for a human is trivial. For an AI agent to do the same thing, it needs tools to help it: look up the menu, give the customer payment details, escalate to staff, and so on.

On top of that, these tools need to work reliably and the agent needs to use them correctly.

At this point, I started to realise what I’d gotten myself into. The environment kept changing. The agent needed more tools. The prompt needed tweaking, so the agent did what I wanted.

The environment needed tests: example scenarios (evals, in technical terms), including tricky ones, to be sure the agent acted how I wanted. For example: in one eval scenario I designed, a customer told the agent they’d paid, repeatedly, when they hadn’t. The agent checked, saw nothing, and held its ground. Its exact words were: “Still not showing on my end, Dayo… If it doesn’t come through shortly, your bank may be able to help.”

Different models had to be tested. When putting agents in real business processes, you don’t always need the most powerful models. Cheap models can go surprisingly far. After testing 10 models on the same 69 chats, I settled on DeepSeek V4.1 Flash as the main model. It passed 96% of them at $0.0014 per chat, ahead of Claude Haiku ($0.0038 per chat) and Gemini Flash ($0.011 per chat), which cost 3–8 times more.

Connecting it to the real world

Once the agent was reliable in the test environment, I had to connect it to the real world. Paystack for payment. Bumpa for reading the up-to-date menu. Telegram for escalations to staff, and so on. Dear God.

It’s working

Eventually, I connected everything. It’s working now, in closed beta, test payments only. Fun experiment. On to the next.

Ordering from Chow45's agent on WhatsApp (sped up)

By the way, if this interests you, it’s the kind of thing we build at Matik for businesses.