neuron-core / php-vector
PHPVector adapter for the Neuron AI framework.
1.1.0
2026-06-04 13:02 UTC
Requires
- php: ^8.2
- ezimuel/phpvector: ^0.3.0
- neuron-core/neuron-ai: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.0
- rector/rector: ^2.0
- tomasvotruba/type-coverage: ^2.0
README
PHPVector adapter for the Neuron AI framework. Implements
NeuronAI\RAG\VectorStore\VectorStoreInterface on top of ezimuel/phpvector.
Dependencies
- PHP ^8.2
- ezimuel/phpvector ^0.3.0
- Neuron AI ^3.0
Installation
composer require neuron-core/php-vector
Usage
Inside a Neuron RAG class:
class MyRAG extends RAG { ... protected function vectorStore(): VectorStoreInterface { return new PHPVector( path: '/var/data/mydb', topK: 5, ); } }
Use it as a standalone component:
use NeuronAI\PHPVector\PHPVector; use PHPVector\VectorDatabase; // Persistent database: pass a path to enable on-disk storage. $store = new PHPVector( path: '/var/data/mydb', topK: 5, );
Persistence
By default, this adapter auto-saves after every mutation (addDocument, addDocuments,
deleteBy), batched to a single save() per call, so persistence "just works".
Deletion
deleteBy() removes documents by Neuron's sourceType / sourceName, which this adapter
stores as PHPVector metadata:
$store->deleteBy('pdf'); // all documents from sourceType "pdf" $store->deleteBy('pdf', 'manual.pdf'); // only that exact source