How Frontleap Built an AI Platform That Helps Distributors Process 3× More Orders

Built on Mastra, the platform combines task-specific tools, configurable reviews, and a feedback loop that captures the customer rules experienced order-desk staff carry in their heads.

~3×

More orders processed

60–80%

Repetitive manual work automated

Frontleap is a software company that built an AI platform for manufacturers and distributors. Frontleap’s customers include Canac, a 6,000-employee SAP enterprise with 34 stores and 4 distribution centres, and Stella-Jones where deployment is underway.

Built on Mastra, the platform combines AI agents with an interface where employees can manage orders and sales operations. An agent turns a customer’s email into a validated draft order that staff can review and submit to SAP. With Frontleap sales clerks process up to 3× more orders, and up to 80% of an order-desk operator’s work is AI-assisted.

From emails to agents that learn

Building AI for the manufacturing industry means bringing solutions into the daily work of people on sales desks, in stores, and on the factory floor.

Picture a veteran sales clerk at a hardware store, in a store polo, working alongside AI agents. This is rarely the user people have in mind when they talk about AI adoption. For Frontleap, it is exactly who the interface needs to serve.

The basic sales order process looks simple: receive a purchase order, create an order, and deliver it. But each business has specialized info and exceptions. The employees have learned all of that for years, but it’s not documented anywhere.

That is why Frontleap treats the product as an ongoing operational system with a learning loop, not a one-off agent deployment. A user can provide feedback when an agent misses an exception. Frontleap captures that in a knowledge base and progressively covers a broader range of orders.

“There’s this idea that SaaS is dead and we won’t need apps anymore. I don’t believe it’s true, especially in manufacturing and distribution. People need visual feedback. I really believe the future will be humans and agents interacting in the same workspace.” — Bruno Marchand, Head of GTM

Why Frontleap chose Mastra

To build the product, Frontleap needed a TypeScript-based framework for tight integration between the front end and back end. They also didn’t want to depend on a closed platform’s abstractions, so it had to be open-source.

A sales representative works with emails, order changes, and delivery notifications, not agent tools and skills. So the team needed the freedom to translate technical components into familiar tasks for users.

Mastra gave them the primitives they could configure in code. Frontleap built its own business-facing layer on top, so a change to the task configuration can shape both the interface and the agent’s behavior.

Larger Frontleap customers also needed the option to run the platform on-premises, which ruled out closed, hosted-only platforms.

“We start from the business process, not the framework. Mastra being open source and TypeScript means we can put an agent exactly where the work happens, including in our customers’ own environments.” — Bruno Marchand, Head of GTM

The architecture behind email-to-order flow

An email triggers an agent to create a draft order using task-specific tools to add products, adjust quantities, and set delivery dates. Each tool limits what the agent can change and applies business rules and validation.

In the background, an agent checks and corrects the draft, then routes it through the customer’s configured review steps. Employees can read the agent’s comments, talk to it, and make changes before approving. Once approved, the order is posted to the customer’s ERP, whether SAP, Oracle or Microsoft. Every correction helps the agent learn the customer’s own rules for the next orders.

In a way this means that Frontleap creates an agent for each email-to-order process. But the architecture reuses configurable agent logic rather than a separately coded agent for every business variation.

The layer describes the task, and Mastra’s request context provides the information needed to adapt the agent’s prompt and behavior at runtime. A sales advisor for paint and a sales advisor for roofing can share an agent implementation but get different configurations.

Connecting agents with the interface

Mastra workflows handle internal workflows and the agent controller supports the frontend interaction, including session state and token usage.

Together, these pieces let Frontleap expose business tasks to employees and control the agent behavior underneath. This way the order-desk staff doesn’t have to understand the underlying agent framework.

"Behind a single chat, several agents work on the order at once. Agent Controller handles the layer between them and the user: persistent sessions, streaming, background sub-agents that report back when they're done, and visibility into token usage and cost per session. We'd otherwise have had to build and maintain that layer ourselves. Now our time goes into the order logic, not the plumbing." — Thomas Laberge, Co-founder & CTO

Results and next steps

Frontleap is already used in production by several large customers, with more on the way. The platform can be configured for each customer and Frontleap’s forward-deployed engineers work on the floor with employees to understand the process and support implementation.

The practical change is already visible in Frontleap’s customers’ workflows. The platform automates 60–80% of repetitive manual work and enables customers to process ~3× more orders.

Frontleap is now working on expanding the context and exceptions the platform can handle. They are also testing the Mastra factory. Email automation is the entry point. The longer-term value is a business process that retains the order desk’s knowledge and makes it available to both staff and agents.

Start building today

Quickstart