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.
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.
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:
- Watch the demo
- Explore Leapter’s beta at lab.leapter.com to model your own logic visually and expose it as tools.
- Check out Langflow at langflow.org to build and debug agent flows in a visual canvas.
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.