top of page

Using Leapter with Langflow: Giving AI Agents a Logic Layer They Can Trust

AI agents are great at talking to users. They’re much less reliable when you ask them to do things like pricing, eligibility checks, or anything that has to be exact.


In a joint demo with Langflow, we showed how to separate those concerns cleanly:


  • Langflow handles the conversation and orchestration.

  • Leapter provides a deterministic logic tool that the agent can call whenever the rules really matter.


To keep it concrete, we built a simple pizza-ordering agent. 🍕


The demo in a nutshell


In Langflow, Phil Nash (Developer Relations Engineer at IBM, working on Langflow) built an agent that:


  • Chats with the user about their pizza order

  • Decides when it has collected all necessary details

  • Calls tools to:

    • Check the current date (to see if it’s a weekend)

    • Calculate the final pizza price via a Leapter MCP tool

  • Returns both a natural-language confirmation and a structured JSON order summary


On the Leapter side, Robert Werner (co-founder and CTO at Leapter) modelled the pizza pricing logic as a visual blueprint:


  • Base price by pizza size

  • Extra charges for toppings

  • Weekend surcharge

  • Delivery fees

  • Promo code handling


The key point: this pricing logic is deterministic, visual, and human-verifiable. You can step through edge cases, see exactly how a total is calculated, and only then expose it as a tool.


Build a price calculation tool for an AI Agent

How Leapter plugs into Langflow


Leapter exposes the pizza pricing blueprint as an MCP server with one tool, e.g., extended_pizza_pricing, with parameters like:

  • size

  • extras

  • weekend

  • delivery

  • promo_code


Langflow imports that MCP tool, and the agent is prompted to:

  • Collect those fields from the user

  • Call the pricing tool only when all required data is present

  • Use the deterministic result as the source of truth for the final price


If the user changes their mind, for example, adds toppings, or remembers a promo code, the agent simply calls the Leapter tool again with updated inputs. The front-end updates, but the underlying logic remains a verified, shared blueprint.


Langflow and Leapter: Better Together!
Langflow and Leapter: Better Together!

Why this pattern matters


The pizza example is playful, but the pattern is serious:


  • Let agents handle natural language, coordination, and UX.

  • Let Leapter handle logic that must be consistent, auditable, and safe to run in production.


Anywhere you have real money, risk, or policy involved — pricing, approvals, routing, compliance — you get the flexibility of agentic workflows without trusting an LLM to improvise business rules.


Try it yourself


You can:


Together, they show a practical way to build AI applications where agents stay flexible, but the logic they rely on is transparent, explainable, and under your control.




bottom of page