Source-available · 100% local · Any AI agent

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
Automotive Semiconductors Electronics Industrials Pharma Chemicals

Built for procurement and engineering teams in manufacturing companies.

the problem

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.

scope

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.
what you get
$

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.

how it works

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.

How P2Predict works You talk to your AI agent in plain language. Your agent calls P2Predict, which runs two layers (a math layer and a judgment layer) locally on your spend data, then answers you. You never touch P2Predict directly. you in plain words your prompt your answer your AI agent Claude · GPT · local it drives P2Predict you talk to this, nothing else calls it the result P2Predict JUDGMENT LAYER what to run · what to ask you MATH LAYER the price · the likely range your spend data 100% local, never leaves
you Ask in plain words your prompts, as normal
your agent Claude · GPT · local it drives P2Predict for you
p2predict Two layers, 100% local reads your spend data, never uploads it

inside p2predict

judgment layer

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.

math layer

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.

in practice

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?

What does tightening tolerance from ±0.1mm to ±0.05mm add to the price?
p2predict+$0.42 a unit, about 18%. Nothing in your data says the application needs it, so you'd be buying precision the product won't use.

Price the spec before it's frozen.

Where are we overpaying?

Score last year's parts against our own pricing. Worst offenders?
p2predict1,840 parts scored, 68 above their range. The top 20 carry about $2.1M a year, mostly supplier premium on parts with a cheaper equivalent already in your data.

A cost-recovery list ranked by dollars.

What does this chip cost across suppliers?

Same 1-cell BMIC, every supplier. Show me the spread.
p2predictSame chip, same spec, only the maker changes. TI's the baseline at $2.31. Microchip runs 42% under it, Analog Devices 127% over.
Same chip, priced by supplier predicted price · identical 1-cell I2C BMIC TI baseline $2.31 Analog Devices $5.23 +127% Infineon $3.84 +66% ADI / Maxim $3.40 +47% NXP $2.81 +22% onsemi $2.49 +8% STMicro $2.41 +4% Texas Instruments $2.31 baseline Microchip $1.33 −42% $0$1$2$3$4$5$6

Inferred range: 4× from value pick to premium.

Price these, and how sure are you?

Price these three parts, with the range. Generate me a chart please.
p2predictEach with its 90% range. The 16-cell monitor is wide (few like it in your data); the 1-cell parts are tight, so lean on them harder.
Each prediction comes with a 90% range predicted unit price at qty 1 TI BQ29700-class 1-cell protection IC $1.60 $0.00* $3.65 ADI/Maxim MAX17841 16-cell BMS monitor $5.48 $3.42 $7.53 Microchip MCP73833 1-cell charge controller $1.33 $0.00* $3.38 $0$1$2$3$4$5$6$7$8 * lower bound clipped to $0

Tight range: negotiate hard. Wide range: Get a quote first.

under the hood

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.

Package complexity, priced every pin adds cost · baseline 1-cell BMIC 8-pin · $2.31 48-pin · $4.88 81624324048 $2$4$6 package pin count · shaded band = 90% range
Complexity is priced, not assumed. Each package pin adds about $0.06, with an honest range.
What the model leans on share of total importance · top 8 attributes manufacturer 45.6% Battery Chemistry 19.7% Interface 17.9% is_multi_cell 9.7% package_pins 3.0% op_temp_max_C 1.7% max_cells_supported 1.4% op_temp_min_C 1.0% 0%10%20%30%40%50%
What drives the price. Manufacturer, chemistry and interface: 83% of it.
Predicted vs actual, on unseen parts 30-part holdout · parts the model never trained on perfect prediction $1$2$3$4$5$6 $2$4$6 actual unit price ($) → predicted on the y-axis typical miss 16% · 9 in 10 within 73% · n = 30
On parts it never saw. Within 16% of actual half the time, 73% nine in ten.
licensing

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.

proof on public data

Three worked examples you can run yourself.

faq

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]