symfony/ai-vektor-store
Symfony AI Store integration for the Vektor vector database. Use Vektor as a vector store backend in Symfony AI apps to store, index, and query embeddings for retrieval and semantic search. Links to Vektor docs and Symfony AI contribution resources.
symfony/http-client, symfony/console). Laravel’s ecosystem (e.g., Horizon for queues, Scout for search) could complement Vektor’s vector storage for hybrid workflows.Store interface, enabling plug-and-play replacement of vector stores (e.g., swap Vektor for Qdrant later). This aligns with Laravel’s preference for composable services.symfony/ai) is a hard dependency, adding ~20MB to Laravel’s vendor size.http-client, process), reducing friction.config/cache.php).Store interface.composer require symfony/ai centamiv/vektor
Store with Laravel’s container:
// app/Providers/VektorServiceProvider.php
use Symfony\Component\AI\Store\VectorStoreInterface;
class VektorServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton(VectorStoreInterface::class, function ($app) {
return new VektorStore($app['config']['ai.vektor']);
});
}
}
Store methods:
// Before: Custom Elasticsearch client
$results = $elasticsearch->search($query);
// After: Vektor via Symfony Store
$embedding = $vectorStore->embed($query);
$results = $vectorStore->search($embedding, limit: 5);
Engine to delegate vector queries to Vektor.Store bulk methods.http-client if Laravel already uses Guzzle).predis/predis or phpredis extension (already used for caching/queues).pgsql extension and pgvector installed (may conflict with Laravel’s migrations).Laravel Service → Symfony Store → Vektor Bridge → Redis/PostgreSQL
# Check Redis connection in Laravel
php artisan tinker
>>> Redis::connection()->ping();
# Check Vektor logs (if running locally)
tail -f vendor/centamiv/vektor/logs/*.log
queue:failed table to retry failed vector operations.redis-cluster package for sharding.How can I help you explore Laravel packages today?