The right price is already in your data.
P2Predict is a free, local and agentic-first parametric price benchmarking tool for procurement. It learns how your spend is really priced, then prices anything against it: a supplier swap, a tighter spec, or your whole book of parts.
Set up in one command: pip install p2predict[mcp]
Built for procurement and engineering teams in manufacturing companies.
Most of your cost is decided upstream, before you ever negotiate it.
Cost gets set in design reviews procurement never attends: a tolerance tightened past what the part needs, a sole-source waved through, a premium accepted because no one had a number to challenge it. Procurement inherits the decision, not the savings.
What it does, and what it doesn't.
P2Predict does one thing very well: parametric price prediction. It learns the fundamental pricing structure in your own data and benchmarks any part against it, the ones you're about to buy and the ones you already do.
What it does
- Learns from the prices you've actually paid and tells you what a comparable part should cost.
- It learns all kinds of structures (linear and non-linear) and applies a lot of clever tricks to learn that structure.
- Shows you what each spec and the supplier add to that price, read from your pricing structure.
- Puts a range on every number and tells you when it isn't sure.
- Gets better the more of your own buying history you feed it.
What it doesn't
- It won't build a part up from its raw materials and labour. It's not a should-cost tool, and it can't tell you a supplier's real cost or margin.
- It only knows what you've shown it. Ask about something nothing in your history looks like and it'll widen the range or tell you to go get a quote.
- The breakdown shows what moves the price in your data, not the engineering reason a part costs what it does.
- It won't conjure data out of nothing. No history, no model.
A number you can stand behind
A defensible target for any part, built from what you've actually paid. This is incredibly useful in engineering workshops and supplier negotiations.
Where the number comes from
Every estimate breaks down into what each spec and the supplier contribute.
How sure it is
Every number carries a confidence range. Tight where your data runs deep, wide where it's thin. P2predict tells you how confident is the model at each price level.
No dashboard, no app. Your agent is the interface.
You talk to your AI agent as normal. It calls P2Predict, which runs entirely on your own machine and hands back an answer.
inside p2predict
Tells your agent what to do
It reads the math and steers the conversation: which analysis to run, when to stop and ask you for more, and whether a result is solid enough to quote or needs a real RFQ. It even holds weaker agents back from overstating a number.
Does the modeling
It trains on your spend, predicts the price, attributes it spec by spec, and puts a calibrated range on every estimate. The defensible statistics underneath.
The questions behind every category, answered from your own data.
Quote fairness, supplier spread, spec trade-offs, overpayment across your category.
Is this feature worth it?
Price the spec before it's frozen.
Where are we overpaying?
A cost-recovery list ranked by dollars.
What does this chip cost across suppliers?
Inferred range: 4× from value pick to premium.
Price these, and how sure are you?
Tight range: negotiate hard. Wide range: Get a quote first.
How the model holds up.
What drives price, how accurate it is on parts it never saw, and how price scales with package complexity. From the Battery Management ICs case study.
Free to run inside your company.
Source-available under the PolyForm Noncommercial License. Pull the code, read every line, and run it against your own spend at no cost on your own machine. No seats to count, no sales call to sit through. A commercial license is only needed if you deploy it for clients or embed it in a paid product.
Three worked examples you can run yourself.
Battery Management ICs
~150 parts, the size of a real category. Surfaces a supplier premium worth negotiating away, with a clear read on which numbers to trust and which need a quote first.
Read it →Used vehicles
Prices spanning orders of magnitude on a market everyone already understands. The fastest way to see the model reason about price before you trust it on your own category.
Read it →Aerospace fasteners
Shows where the data itself caps how precise a number can be, so you know which estimates to negotiate hard on and which to treat as a starting point.
Read it →Questions worth answering up front.
Is it really free?
Yes, for internal use. P2Predict is source-available under the PolyForm Noncommercial License. No seats, no trial period, no sales call. A commercial license is only needed if you deploy it for clients or embed it in a paid product.
How reliable are the numbers?
When P2Predict trains a model on your data, it will tell you exactly how reliable is the prediction and where. A good model can be great at a certain local minimum and aweful on the edges. P2predict discovers the structure of your data and tells where to trust the prediction.
Does my data ever leave my machine?
No. P2Predict trains and predicts entirely on your own machine. The only thing that leaves is whatever your AI agent normally sends to its own model. Pair it with a local model to keep that offline too.
Which AI agents does it work with?
Any agent that speaks MCP: Claude, GPT-based agents, or a model running locally. That's the core idea behind P2Predict: it's a capability for your agent to use, not a new tool for you to learn. No dashboard, no separate login. It just shows up wherever you already do your work with your agent.
Is this a should-cost tool?
No. Should-costing builds a part up from material, labor and machine time. P2Predict benchmarks against what the market has actually charged for comparable parts.
Why is this open source?
Because a closed tool only ever does what its vendor decided to ship. Source-available means you, or your AI agent, can read every line, tune the code or the interfaces to your company's ecosystem, or wire it into your own stack and other tools without waiting on anyone's roadmap. That kind of ownership doesn't exist behind a closed API. Now using coding agents, software should be easily extendable. My recommendation is give your procurement data science team the github link and let them show you a demo in a meeting. The world really has changed.
Who built P2Predict?
P2predict started in 2023 as a project in my freetime during the weekends and sporadic evenings. I spent so far about 15 years helping procurement leaders in companies across the world, deliver effective negotiations. More about me and my other work at ahmedhafsi.com.
Who do I talk to about rolling this out for my team?
Nobody, really. P2predict is installed with one pip command and runs on your own data in a few minutes. Start with INSTALL.md and TECHNICAL.md. If you'd still like a hand, want a commercial license, or want to share a dataset for a future case study, reach out at ahmedhafsi.com/contact. Happy to help.
Run it on your own data.
Free, runs in your own environment, and one command from your first benchmark.
pip install p2predict[mcp]