Download the PHP package mageprince/magento2-mage-ai-predict without Composer

On this page you can find all versions of the php package mageprince/magento2-mage-ai-predict. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-mage-ai-predict

Magento 2 MageAI Predict Extension

This Magento 2 extension is an AI-powered Predictive Inventory & Raw Material Forecaster. It analyses your store's historical sales, predicts next month's demand for every product, and turns that into clear, actionable advice: what to reorder and by when, and what is overstocked or dead stock tying up your capital. It uses OpenAI (GPT), Anthropic (Claude), or Google Gemini — reusing the AI provider you already configured in the MageAI extension.

❤️ This is a companion to the open-source MageAI extension. The goal is the same: keep it fully open-source and continuously expand the ways AI can help run a Magento 2 store — this time on the operations side, helping merchants avoid lost sales from stock-outs and frozen cash from over-stocking. If you're into Magento, AI, or supply-chain, your ideas and contributions are always welcome. Let's build something useful together!

Why not just ask an LLM to predict the numbers? Because LLMs are poor at raw numeric forecasting. This extension does the maths with a deterministic statistical engine, then uses the AI only for what it's genuinely good at — reasoning over trend/seasonality/context and explaining the recommendation in plain language. The AI can be turned off entirely for free, instant, statistics-only forecasts.

Features

Supported AI Providers

Provider, models and API keys are inherited from the MageAI extension configuration.

Provider Models
Google Gemini (default) gemini-2.5-flash, gemini-2.5-pro, gemini-1.5-flash, gemini-1.5-pro
OpenAI (ChatGPT) gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4, gpt-3.5-turbo
Anthropic (Claude) claude-opus-4-5, claude-sonnet-4-6, claude-haiku-4-5

Usage

Setup

  1. Make sure the MageAI extension is installed and its AI provider + API key are configured (Stores > Configuration > Mageprince > MageAI)
  2. Go to Stores > Configuration > Mageprince > MageAI Predict (Demand Forecast)
  3. Enable Forecasting, and choose whether to Use AI Adjustment (off = statistics only, no API calls)
  4. Set your Sales History (years), Restock Lead Time, Safety Stock (days) and Overstock Threshold
  5. Optionally set a Max Products Per Run and enable the Scheduled Forecast with a cron expression
  6. Save the configuration

Generate a forecast

  1. Open MageAI Predict > Demand Forecast from the admin menu
  2. Click "Generate Forecasts Now" (or wait for the scheduled cron)
  3. The grid fills with per-product forecasts, statuses, reorder recommendations and AI rationales

Read the grid

Column Meaning
Baseline Forecast Prediction from pure statistics (sales history only)
Forecast (units) Final prediction after AI adjustment (falls back to baseline if AI is off/unavailable)
Current Stock On-hand quantity right now
Reorder Qty / Reorder By How many units to order, and the deadline to order them
Status 🔴 Out-of-stock risk · 🟠 Reorder soon · 🔵 Overstock / dead stock · 🟢 Healthy
Confidence How much history backs the forecast (high / medium / low)
AI Recommendation Plain-language reasoning for the number

The AI is only called for products with at least 2 months of sales history — there's no point spending an API call on a product with nothing to reason about. Products below that threshold use the statistical baseline.

How to Install

Install via Composer

Run the following commands in your Magento 2 root folder:

Requires the MageAI extension (mageprince/magento2-mage-ai), which is pulled in automatically as a dependency.

Contribution

Contributions are highly welcome and encouraged! 🙌

This project is a personal open-source effort to bring the power of AI to Magento 2. Whether you want to:

You're very welcome to join in.

To contribute:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add new feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Create a new Pull Request

Roadmap

Admin Grid Screenshot

mageprince-mageai-AI-Demand-Forecast-MageAI-Predict-Magento-Admin-07-22-2026_07_50_PM

All versions of magento2-mage-ai-predict with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
mageprince/magento2-mage-ai Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mageprince/magento2-mage-ai-predict contains the following files

Loading the files please wait ...