Blog

Lua: From Worrying About Infrastructure to Focusing on Growing Partnerships

Lua is building a chat bot and assistant marketplace that connects businesses with consumers. They allow brands to respond to users via WhatsApp  to answer questions about the company, and provide tailored commerce experiences.

Founded in 2024 with a distributed team across Africa and Europe, Lua recently closed seed funding and has launched across three African markets. In these markets, WhatsApp has become the operating system for daily life—used by close to 200 million Africans who often bypass traditional banking entirely, conducting everything from government services to P2P commerce; in Nigeria, 95% of the population are daily active users. 

Lua orchestrating a food order through WhatsApp, connecting users to restaurant partners like ChowPadi through simple chat

Co-founders Stefan Kruger and Lorcan O Cathain have lived and built in Africa for their entire professional lives. Lorcan (CEO) grew up in Ireland but lived in East Africa for most of a decade, advising the Rwandan government on trade policy, then building and running an African fintech for both financial and insurance products in Kenya. Stefan (CTO) founded Nigerian YC (W '16) fintech Paystack and then was VP of Engineering at Stripe for 4 years after Paystack's acquisition. 

Building the initial systems

The Lua team needed to stand up core infrastructure to support 500k+ users at launch, and Stefan spent over 9 months building the core systems —  agent orchestration, monitoring systems, workflow management, and evaluation frameworks — to support over 100 business partners.

The team was already serving 4,500 daily users in pre-launch while quickly approaching an April 1st launch. Stefan had been wrestling with performance optimization—disabling semantic searches under load due to memory and CPU constraints, fine-tuning the balance between cost and latency for their WhatsApp integration where response times are critical, and debugging complex stack traces through wrapped tool implementations. 

Tossing their internal framework, moving to Mastra

Stefan's discovery of Mastra marked a turning point. Mastra provided exactly what they'd been building from scratch: workflows, agents, RAG, integrations, and evals—all in TypeScript, matching Lua's existing stack.

"I've been building since November last year, spending a lot of time figuring out just the foundational side of things—how to build agents very quickly, how do we monitor and how do we keep it solid," Stefan recalls. "I discovered your platform, I was like, holy, that would have saved me a ton of time." Stefan made a quick decision to move on from months of work on their own internal agent framework in favor of using Mastra's off the shelf primitives

The migration was fast. Stefan quickly got Lua's prototype fully running on Mastra, with agent orchestrations replicated quickly. Using Mastra's workflow primitives, the team was able to rapidly test complex orchestration scenarios, including hotel and flight booking integrations with end-to-end authentication flows.

As Stefan put it in March: "I wish I found you guys three months ago. I would have had less gray hair."

Lua's deployment architecture

Lua currently runs Mastra agents inside Hono servers, bundled into Docker containers within a Kubernetes cluster deployed on AWS EKS, with Neon handling their serverless Postgres backend. They're now running a parallel deployment on Mastra Cloud to test performance and reliability before fully migrating their business partners and potentially thousands of agents to eliminate infrastructure management overhead.

"We have 100 partners. I don't want to really manage 100 infrastructure components," Stefan explains. The built-in observability was particularly attractive: "Even the tracing and monitoring, like even running a separate stack for the monitoring side for us is just an overkill if you already have that all in there."

Stefan noted the improvements to Lua's development velocity. "Now we can just focus on the business side, which is more exciting for us. Just getting these businesses out, partnering up and getting it out to consumers." 

Growth after launch

The launch was a huge success, and right now, the Lua team is running quickly to keep up with demand both in the Middle East as well as East Africa. It's still early, but at one point in May, they were getting 200 new users every 10 minutes. At the last check-in, infrastructure and tooling were not fires they were fighting, or had recently fought.

Share

Stay up to date