The agent stopped guessing (Ship AI with Laravel EP3)
Hey,
Episode 3 of Ship AI with Laravel is out!
Up until now our support agent could talk and classify tickets, but if a customer asked "where's my order?" it made something up. Confidently. With fake details. Not great for a support platform.
So in this episode we give it tools. An OrderLookup tool that takes an order ID and returns real data from the database, and a CustomerHistory tool that takes an email and pulls their last five orders. I build the model, migration, and relationships to power them, register both on the agent, seed some test data, and watch it go from guessing to pulling actual records.
I also add a MaxSteps limit so the agent can't chain unlimited tool calls on a single prompt and blow through your API budget.
Full code on GitHub as always: ⭐ GitHub repo
Next up: conversation memory. Right now every prompt is a blank slate. The agent forgets everything after each message. We fix that in Episode 4.
Talk soon, Harris