Pricing Intelligence is an advanced AI-powered platform designed to analyze, reason about, and extract insights from SaaS pricing models. It combines Large Language Models (LLMs) with rigorous Constraint Satisfaction Problem (CSP) solvers to provide accurate, grounded answers to complex pricing questions. This is part of the contributions of the paper "Pricing Intelligence: Rethinking IS Engineering in Volatile SaaS Environments".
The system allows users to:
- Extract structured pricing models (Pricing2Yaml) from raw website URLs.
- Analyze pricing configurations mathematically (validity, feature combinations).
- Optimize plan selection based on user requirements (e.g., "Cheapest plan with SSO and 50 users").
- Interact via a natural language chat interface powered by the Harvey agent.
The project is composed of several microservices working in concert:
graph TD
User["User / Frontend"] --> Harvey["Harvey API (Agent)"]
Harvey --> MCP["MCP Server"]
MCP --> Analysis["Analysis API"]
MCP --> Amint["Amint API"]
Analysis --> CSP["CSP Service (Choco)"]
Amint --> OpenAI[("OpenAI")]
| Service | Directory | Description |
|---|---|---|
| Harvey API | harvey_api/ |
The AI Agent implementing the ReAct pattern. It orchestrates tools to answer user queries. |
| MCP Server | mcp_server/ |
Implements the Model Context Protocol. Exposes tools like subscriptions, optimal, and iPricing to the agent. |
| Analysis API | analysis_api/ |
Node.js/TypeScript service. Handles the core logic for pricing analysis, validation, and statistics. |
| CSP Service | csp/ |
Java-based service wrapping the Choco constraint solver. Performs the heavy mathematical lifting for validity and optimization. |
| Amint API | src/ |
Python service responsible for extracting pricing data from unstructured sources (URLs) and converting them to the Pricing2Yaml format. |
| Frontend | frontend/ |
React/Vite application providing the chat interface and visualization. |
Harvey is a specialized agent that follows the ReAct (Reasoning + Acting) pattern.
- Grounding: It verifies feature names and limits against the actual YAML data before querying tools.
- Optimization: Reduces LLM hallucinations by delegating math and logic to the Analysis API.
- Context Aware: Can compare multiple pricing models simultaneously (e.g., "Compare HubSpot vs. Salesforce").
The system exposes several powerful tools via MCP:
iPricing: Downloads and structures pricing data from a URL.subscriptions: Enumerates all valid plan configurations given a set of filters.optimal: Finds the best (cheapest/most expensive) configuration satisfying user constraints.validate: Checks if a pricing model is mathematically consistent.summary: Provides high-level statistics about a pricing model.
- Docker & Docker Compose
- OpenAI API Key
- Gemini API Key (Required for the A-MINT service)
-
Clone the repository:
git clone <repository-url> cd Pricing-Intelligence
-
Configure Environment: Create a
.envfile (or ensureapi_keys.py/ environment variables are set) with your API keys:export HARVEY_API_KEY="sk-..." export AMINT_API_KEY="sk-..." # Note: A-MINT requires a Gemini API Key. # For detailed custom instructions, visit: https://github.com/isa-group/A-MINT-repo
-
Run with Docker Compose:
docker-compose up --build
By default, the Harvey agent is configured to use a specific OpenAI model (e.g., gpt-5.1). To switch to a different model (such as gpt-4o or gpt-3.5-turbo), modify the OPENAI_MODEL environment variable in the harvey-api service within docker-compose.yml:
harvey-api:
# ...
environment:
- OPENAI_MODEL=gpt-4o # <--- Update this value
# ...- Frontend: http://localhost:5173 (or configured port)
- Harvey API: http://localhost:8086
- MCP Server: http://localhost:8085
- Analysis API: http://localhost:8002
- Amint API: http://localhost:8001
- CSP Service: http://localhost:8000
- Open the Frontend.
- Ask a question: "What is the cheapest plan for Buffer (https://buffer.com/pricing) that includes 10 channels?"
- Harvey will:
- Call
iPricingto extract the model from the URL. - Plan an
optimalsearch with filters{"usageLimits": [{"channels": 10}]}. - Return the exact plan name and cost, grounded in the extracted data.
- Call
This project is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). See the LICENSE file for details.