Download the PHP package gtstudio/module-ai-knowledge-base without Composer

On this page you can find all versions of the php package gtstudio/module-ai-knowledge-base. 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 module-ai-knowledge-base

Gtstudio_AiKnowledgeBase

Document management for AI agents in Magento 2. Upload files that agents can retrieve as context before answering queries — enabling retrieval-augmented generation (RAG) without a vector database.

Preview

AI Studio Ecosystem

Part of the AI Studio suite for Magento 2. See all modules:

Module Repository Description
Gtstudio_AiConnector module-aiconnector Core AI provider abstraction
Gtstudio_AiAgents module-ai-agents Agent & tool orchestration, cron scheduling, execution log
Gtstudio_AiWidgets module-ai-widgets Floating admin chat widget + PageBuilder AI generator
Gtstudio_AiDataQuery module-ai-data-query Natural-language store analytics (privacy-first)
Gtstudio_AiKnowledgeBase (this module) Document upload & RAG retrieval for agents
Gtstudio_AiDashboard module-ai-dashboard AI-powered KPI dashboard with ML insights

What It Does

Requirements

Installation

Usage

Uploading Documents

Navigate to AI Studio → Agents & Tools → Knowledge Base.

Click Add New, fill in:

Field Description
Title Human-readable label (auto-populated from PDF metadata on upload)
Upload PDF Document Upload a PDF file — text and metadata are extracted automatically
Content Extracted text (editable; used for retrieval)
Tags Comma-separated keywords (auto-populated from PDF metadata)
Agents Associate this document with one or more agents
Is Active Only active entries are searchable by agents

How Retrieval Works

When an agent that has knowledge base documents attached receives a question:

  1. The question is matched against document excerpts using keyword or semantic similarity
  2. Relevant excerpts are prepended to the agent's system prompt as context
  3. The agent responds with awareness of those excerpts

No full document text is sent to the LLM — only the most relevant excerpts, keeping token usage low.

Extensibility

Supporting Additional File Formats

The text extraction pipeline uses a registry pattern. Register a custom extractor for a new MIME type:

Implement Gtstudio\AiKnowledgeBase\Api\ExtractorInterface:

Custom Retrieval Strategy

Override the retrieval service to use a vector database, OpenSearch k-NN, or any other similarity search:

Chunking Strategy

Document chunking (splitting documents into excerpt-sized pieces) can be customised:

Database Tables

Table Purpose
gtstudio_ai_knowledge_base Document metadata (name, description, file path, agent association)
gtstudio_ai_knowledge_base_chunk Extracted text chunks ready for retrieval

ACL Resources

Resource Controls
Gtstudio_AiKnowledgeBase::management Access to the Knowledge Base admin section

All versions of module-ai-knowledge-base with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version >=2.4.4
gtstudio/module-aiconnector Version >=1.0.0
gtstudio/module-ai-agents Version >=1.0.0
smalot/pdfparser Version ^2.12
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 gtstudio/module-ai-knowledge-base contains the following files

Loading the files please wait ...