TierCraft AI: A Practical Deep Dive into Auto-Generating SaaS Pricing Plans with LangGraph + OpenAI

TierCraft AI: An open-source project using LangGraph to orchestrate AI Agents for automatic SaaS pricing generation
TierCraft AI is an open-source project combining LangGraph workflow orchestration with OpenAI's o4-mini model to automatically generate three-tier SaaS pricing plans based on target markets (country and user segment). Key highlights include a Reality-Check self-verification loop ensuring pricing reasonableness, context-aware differentiated pricing, and interactive design supporting user iteration feedback—making it an excellent case study for learning practical LangGraph Agent applications.
Project Overview: An AI-Powered SaaS Pricing Generator
TierCraft AI is an open-source project built on an AI Agent architecture, designed to automatically generate pricing plans for SaaS products. It combines LangGraph workflow orchestration with OpenAI's o4-mini model to analyze target market contexts (country and user segment), automatically output three-tier pricing packages, refine them through a built-in "reality check" loop, and present the results as polished pricing cards in a Next.js frontend interface.
The project is relatively small in scope, but its architectural design offers valuable insights—it clearly demonstrates how to apply LangGraph's multi-step orchestration capabilities to a concrete business scenario.
Core Technical Architecture Breakdown
LangGraph Workflow Orchestration: From Chain Calls to Graph Orchestration
At its core, TierCraft AI uses LangGraph to orchestrate the entire pricing generation pipeline. LangGraph is a framework within the LangChain ecosystem specifically designed for building stateful, multi-step AI Agents, offering clear advantages over traditional chain-based approaches for complex task orchestration.
To appreciate LangGraph's value, it helps to understand the evolution of AI Agent orchestration paradigms. Early LangChain applications relied primarily on linear chain calls—executing steps in a fixed sequence: Prompt → LLM → Parse → Next Step. This approach works fine for simple scenarios, but falls short when dealing with conditional branching, retry loops, or parallel execution. LangGraph introduces the concept of directed graphs, abstracting each processing step as a node in the graph, connected by edges, with support for conditional edges that enable dynamic routing. More critically, LangGraph includes a built-in state management mechanism—through StateGraph, you define a global state schema that every node can read from and write to, making complex multi-turn interactions and context passing natural and elegant. This graph orchestration paradigm has become the mainstream choice for building production-grade AI Agents, with frameworks like Microsoft's AutoGen and CrewAI adopting similar design philosophies.
In this project, the workflow contains the following key nodes:
- Market Analysis Node: Receives user inputs for country and target audience, analyzes the local market environment and spending levels
- Plan Generation Node: Based on market analysis results, outputs three pricing tiers (Basic, Pro, Enterprise)
- Reality-Check Loop: Validates the generated plans for reasonableness, ensuring prices align with market expectations
- Output Optimization Node: Formats the final plan into structured data that the frontend can render directly
This graph-based orchestration approach offers two practical benefits: first, each node's inputs and outputs are clearly traceable, improving debugging efficiency; second, you can flexibly insert human intervention or additional validation logic at any point, providing strong extensibility.
OpenAI o4-mini: A Cost-Effective Model Choice
The project uses OpenAI's o4-mini as its reasoning engine. o4-mini is the lightweight version in OpenAI's reasoning model lineup—its logical reasoning capabilities are solid, but at significantly lower cost than o4.
It's worth clarifying the fundamental difference between OpenAI's Reasoning Models and traditional GPT-series models. Traditional models like GPT-4o use a "fast thinking" mode—they receive input and directly generate responses with no explicit reasoning process in between. The o-series reasoning models (from o1 to o3 to o4) introduce a "slow thinking" mechanism where the model performs internal chain-of-thought reasoning before outputting a final answer, step-by-step decomposing problems and verifying intermediate steps. This makes them significantly better than traditional models at math, logical analysis, and multi-step planning tasks. As a streamlined version of o4, o4-mini retains core reasoning capabilities with a smaller parameter count, costing roughly one-third to one-quarter of o4 in API calls with lower latency. For pricing plan generation—a task requiring structured analysis but not extreme reasoning complexity—o4-mini strikes an excellent balance between capability and cost.
For tasks like pricing plan generation—requiring some reasoning and analytical ability but not ultra-long context handling or extremely complex logic—o4-mini is a pragmatic choice. This reminds us that in real projects, model selection shouldn't blindly chase the most powerful option; matching the scenario's requirements is what matters.
Next.js Frontend: Interactive AI Experience
The frontend is built with Next.js, providing an intuitive interface. One clever design element is the "Make it cheaper" button—when clicked, the AI regenerates a lower-priced plan.
This feature seems simple but embodies the core philosophy of AI Agent interaction design: users aren't passively accepting one-shot results; they can continuously guide the AI to iterate and optimize through feedback. This human-AI collaboration model is known in academia as Human-in-the-Loop (HITL), with the core idea of embedding human judgment into the AI's decision loop rather than letting AI run fully autonomously. At the product design level, the key challenge of HITL is reducing the cost of user feedback—the "Make it cheaper" button is an excellent demonstration: it simplifies complex pricing preference expression into a single click, requiring no detailed modification instructions for the AI to understand intent and adjust output. This "low-friction feedback" design philosophy is becoming a standard interaction pattern in AI-native products, from Midjourney's Vary button to ChatGPT's Regenerate—all following the same logic.
Design Highlights: In-Depth Analysis
Reality-Check Loop: Teaching AI Self-Correction
The "reality-check loop" is TierCraft AI's most noteworthy design pattern. In AI content generation scenarios, the quality of single-pass outputs is often unstable. By introducing a self-verification mechanism, the Agent can:
- Validate price reasonableness: Check whether pricing aligns with the target market's actual spending levels
- Verify tier logic: Ensure price differences and feature progression across the three tiers make sense
- Audit business logic: Confirm that feature allocation effectively drives users to upgrade
This "generate → verify → correct" loop pattern has deep theoretical foundations in AI Agent research. The Reflexion framework proposed by Noah Shinn et al. in 2023 was the first to systematically demonstrate the effectiveness of "having LLMs reflect on their own output and iteratively improve"—in coding tasks, adding a self-reflection loop improved code pass rates from 67% to 91%. Similarly, Anthropic's Constitutional AI method employs a "generate → self-critique → correct" paradigm to align model behavior. In engineering practice, Reality-Check Loops are typically implemented in two ways: using different prompt roles for the same model (generator vs. reviewer), or introducing a second model specifically for quality control. TierCraft AI uses the former approach, leveraging LangGraph's conditional edges to implement "if verification fails, return to the generation node and re-execute" loop logic, with a maximum iteration count to prevent infinite loops.
This "generate → verify → correct" loop pattern is essentially a universal reliability paradigm for AI Agents. Whether generating pricing plans, writing technical documentation, or coding, this approach can be applied to improve output quality.
Context-Aware Pricing: More Than Template Filling
TierCraft AI doesn't take the shortcut of "filling numbers into templates." Instead, it treats country and user segment as core contextual variables. The same SaaS product should have drastically different pricing strategies when targeting U.S. enterprise customers versus Southeast Asian indie developers.
Behind this design lies an important but often overlooked practice in the SaaS industry—Purchasing Power Parity (PPP) Pricing and geographic price differentiation. When global SaaS products use uniform USD pricing, they often face extremely low conversion rates in developing markets. Take Notion, for example: its personal plan is priced at $10/month in the U.S., but adjusted to lower price points in markets like India through regional pricing. Beyond geographic factors, user segment differentiation is equally critical: B2B enterprise pricing typically follows value-based pricing, emphasizing ROI and efficiency gains; pricing for individual developers (B2C/Prosumer) more often uses competitive pricing, referencing market prices of similar tools. TierCraft AI internalizes this complex pricing strategy knowledge into the AI's reasoning process, enabling it to output differentiated plans for different market-user combinations rather than simply adjusting numbers on a fixed template.
This context-awareness capability gives the generated results practical reference value, rather than being merely a technical demonstration.
Use Cases and Practical Insights
TierCraft AI is still in its early stages, but it offers valuable reference points for different roles:
- SaaS Founders: Quickly validate pricing hypotheses before product launch, getting market-analysis-based pricing recommendations
- Product Managers: Use AI-generated plans as a starting point for discussion when setting or adjusting pricing strategies
- AI Developers: Learn practical LangGraph Agent application patterns and understand how graph orchestration lands in real business scenarios
From a technical learning perspective, this project is an excellent introductory LangGraph case study. It's concise enough to quickly grasp core graph orchestration concepts, while containing complete business logic (market analysis, plan generation, self-verification) so it doesn't devolve into a purely technical demo disconnected from reality.
Summary and Outlook
TierCraft AI demonstrates one direction for AI Agents in the business decision support domain. Through LangGraph's multi-step workflow orchestration, OpenAI o4-mini's reasoning capabilities, and the Reality-Check self-verification loop working together, it delivers an end-to-end SaaS pricing plan generation system.
For developers exploring LangGraph use cases, or product teams needing SaaS pricing references, TierCraft AI is an open-source project worth following and studying. Its architectural approach—particularly the reality-check loop and context-aware generation—applies equally to broader AI Agent applications.
Key Takeaways
- TierCraft AI uses LangGraph to orchestrate multi-step workflows, combined with OpenAI's o4-mini model to automatically generate three-tier SaaS pricing plans
- The project includes a built-in Reality-Check Loop mechanism that ensures generated pricing plans align with market reality through self-verification cycles
- Supports context-aware pricing, dynamically adjusting pricing strategies based on target country and user segment
- The frontend provides a "Make it cheaper" interaction button, demonstrating the iterative optimization characteristics of AI Agents
- The project serves as an excellent introductory case study for learning practical LangGraph Agent application patterns
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.