Download the PHP package genaker/agento-ai without Composer

On this page you can find all versions of the php package genaker/agento-ai. 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 agento-ai

Agento - Magento MCP AI Assistant Agent

A powerful AI assistant for Magento 2 that helps you interact with your store's data using natural language queries.

Features

1. Natural Language to SQL

2. Token Usage Analytics

3. Session Management

4. Security Features

5. Error Handling

6. Architecture

7. Customer Service Chatbot

8. Product Chat with RAG

Installation

  1. Install the module using Composer:

  2. Enable the module:

  3. Run setup upgrade:

  4. Clear cache:

Configuration

1. API Keys

2. AI Rules

3. Model Selection & Custom Model Override

Example:

4. Documentation

5. Database Connection

Database Configuration

Adding a Read-Only MySQL User

To create a read-only MySQL user for Magento, follow these steps:

  1. Connect to MySQL as root:

  2. Create a new read-only user (replace username and password with your desired values):

  3. Grant read-only privileges to the Magento database (replace magento_db with your database name):

  4. For remote access (if needed), create the user with host '%':

  5. Flush privileges to apply changes:

  6. Verify the user's privileges:

Using the Read-Only User in env.php

Add the read-only user credentials to your app/etc/env.php file:

Security Considerations

  1. Always use strong passwords
  2. Restrict access to specific IP addresses if possible
  3. Regularly audit user privileges
  4. Consider using SSL for remote connections
  5. Monitor database access logs

Usage

1. Accessing the Assistant

2. Making Queries

3. Managing Conversations

4. Monitoring Token Usage

5. Error Handling

6. Using Product Chat

Architecture

1. OpenAI Service

The module now uses a dedicated OpenAI service class (OpenAiService) that:

Benefits:

2. Token Usage Tracking

The token tracking system:

3. RAG Implementation

The Retrieval Augmented Generation system:

Fine-Tuning the LLM

1. System Message Customization

The AI assistant uses a customizable system message to define its behavior. You can modify this in the admin configuration:

sql SELECT * FROM table;

2. Custom Rules Configuration

Add your own rules in the admin configuration:

  1. Navigate to Stores > Configuration > Genaker > Magento MCP AI
  2. In the "AI Rules" field, add your custom rules
  3. Each rule should be on a new line
  4. Rules will override the default system message

Example custom rules:

3. Documentation Context

Add store-specific documentation to improve query accuracy:

  1. Navigate to Stores > Configuration > Genaker > Magento MCP AI
  2. In the "Documentation" field, add your store's specific information
  3. Include:
    • Table structures and relationships
    • Custom attributes and their usage
    • Business logic and rules
    • Common query patterns

Example documentation:

4. Fine-Tuning Best Practices

a. Rule Structure

b. Documentation Format

c. Context Management

d. Testing and Validation

Troubleshooting

1. API Key Problems

2. Query Errors

3. Performance Issues

Support

For support, please contact:

License

This module is licensed under the MIT License.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Advanced Media Processing Features

1. Image Recognition (Google Cloud Vision)

Usage Examples:

2. Speech-to-Text Processing (Google Cloud Speech)

Usage Examples:

3. File Processing (OpenAI Files API)

Usage Examples:

4. Text Embeddings (OpenAI Embeddings API)

Basic cURL Example:

Batch Processing Example:

The embeddings API returns vector representations of text that can be used to measure semantic similarity between pieces of text. This is useful for:

5. Image Generation (DALL-E)

Basic cURL Example:

The image generation API creates vivid, detailed images based on your text prompts, opening up new possibilities for e-commerce visual content creation without the need for expensive photography or design resources.

6. Integration Capabilities

Cross-Modal Examples:

7. Cache-Augmented Generation (CAG)

Implementation Areas:

Benefits in Magento:

Cache-Augmented Generation works by:

  1. Checking if a similar query exists in the cache
  2. Retrieving and adapting cached responses when appropriate
  3. Only calling the AI API for truly novel requests
  4. Gradually building a knowledge repository specific to your store

This approach is especially valuable in e-commerce where many customer questions follow predictable patterns and where response speed directly impacts conversion rates.

8. Retrieval-Augmented Generation (RAG)

Implementation Areas:

How RAG Works in Magento:

  1. Customer query is analyzed to identify information needs
  2. Relevant data is retrieved from your Magento database or document store
  3. Retrieved information is fed to the LLM as context alongside the query
  4. AI generates a response that incorporates the retrieved facts
  5. Result is an answer that's both helpful and factually accurate about your specific store

Benefits Over Standard LLM Responses:

RAG is particularly valuable for Magento stores with:

9. Function Calling

How Function Calling Works:

  1. Define functions that represent actions in your Magento store
  2. The AI analyzes user requests to determine which function to call
  3. AI extracts parameters from natural language and formats them correctly
  4. Your application receives structured function calls rather than raw text
  5. Execute the function with the provided parameters and return results

Implementation Areas:

Example Function Call:

AI Response (converts natural language to structured function call):

Function calling bridges the gap between conversational AI and your Magento backend systems, enabling rich, action-oriented customer experiences while maintaining control over business logic and data access.

10. Audio Transcription (Whisper)

Basic cURL Example:

The Audio Transcription API uses OpenAI's Whisper model to accurately convert spoken audio to text, supporting multiple languages and various output formats for different use cases.

11. Text-to-Speech (TTS)

Basic cURL Example:

The Text-to-Speech API transforms written text into natural-sounding speech, enabling you to create audio content dynamically from your Magento store's data.

12. Configuration

Google Cloud API Setup

  1. Create a Google Cloud project
  2. Enable Vision API and Speech-to-Text API
  3. Create service account credentials
  4. Generate access token using:

OpenAI Files API Setup

  1. Configure OpenAI API key in admin panel
  2. Set appropriate file size limits
  3. Configure allowed file types:

13. Security Considerations

Sending Magento Data to AI

Customer Service Chatbot

The Customer Service Chatbot is a powerful AI-powered interface for your storefront that helps answer customer questions, provide product information, and handle common support requests.

Key Features

Configuration

  1. Navigate to Stores > Configuration > Genaker > Magento MCP AI > Customer Chatbot Configuration
  2. Configure the following settings:
    • Enable Customer Chatbot: Turn the chatbot on/off
    • Theme Type: Choose between Standard Magento or Hyva Theme
    • Chatbot Title: Set the title displayed in the header
    • Welcome Message: Customize the initial message
    • AI Model: Select which AI model to use for responses
    • Suggested Queries: Define common questions to display
    • Chatbot Logo: Upload a custom logo (64x64px recommended)
    • Frequently Asked Questions: Add common Q&A to cache

Customer Experience

Once configured, the chatbot appears as a floating button in the bottom-right corner of your store. Customers can:

  1. Click to open the chat interface
  2. Select from suggested questions or type their own
  3. Receive AI-powered responses about products, policies, etc.
  4. Maintain conversation history during their session

Technical Details

Overview

The "Send Magento Data to AI" configuration allows you to control whether Magento data is sent to the AI for processing. This setting is useful for managing data privacy and ensuring that only necessary data is shared with the AI.

Configuration

Usage

When enabled, this configuration allows the AI to receive and process Magento data, which can be used to generate SQL queries or provide insights based on the data. The AI can assist with tasks such as:

Data Handling

Important Notes

Configurable OpenAI API Domain & Custom AI Engines

Overview

Magento MCP AI allows you to configure the base domain for the OpenAI API. This means you can use not only the official OpenAI endpoints, but also self-hosted, proxy, or alternative OpenAI-compatible AI engines (such as local LLMs, OpenRouter, or other providers that implement the OpenAI API spec).

How to Configure the API Domain

  1. Go to Magento Admin:
    • Navigate to Stores > Configuration > Genaker > Magento MCP AI > General Configuration.
  2. Find the "AI API Domain" field:
    • Default: https://api.openai.com
    • You can set this to any OpenAI-compatible endpoint, e.g.:
      • Official: https://api.openai.com
      • Local server: http://localhost:8000
      • Proxy: https://your-proxy.example.com
      • OpenRouter: https://openrouter.ai/api/v1
  3. Save the configuration and flush cache.

Example Use Cases

Best Practices

Troubleshooting

Example: Using LocalAI

  1. Start LocalAI on your server:

  2. In Magento admin, set AI API Domain to:

  3. Use a compatible model name (e.g., gpt-3.5-turbo if supported by your engine).

Example: Using OpenRouter

  1. Get your OpenRouter API key from https://openrouter.ai/
  2. Set AI API Domain to:

  3. Use your OpenRouter API key in the API Key field.

Known OpenAI-Compatible API Providers & Engines

Below is a list of popular AI engines and providers that implement the OpenAI API (chat/completions, embeddings, etc.) and can be used with Magento MCP AI by setting the API domain and using a compatible API key:

Commercial/Cloud Providers

Open Source / Self-Hosted Engines

Notes


This flexibility allows you to use the Magento MCP AI Assistant with a wide range of AI backends, including private, on-premise, or alternative cloud providers, as long as they are OpenAI API compatible.


All versions of agento-ai with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
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 genaker/agento-ai contains the following files

Loading the files please wait ....