Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ai Redis Store

Ai Redis Store Laravel Package

symfony/ai-redis-store

Redis vector store integration for Symfony AI Store. Index and query embeddings with Redis Search, using FT.CREATE and FT.SEARCH commands, KNN vector search, and DIALECT 2 querying for fast similarity lookups.

View on GitHub
Deep Wiki
Context7

Redis vector store bridge for Symfony AI

Frequently asked questions about Ai Redis Store
How do I install symfony/ai-redis-store in a Laravel application?
Install it with Composer alongside the Symfony AI store interfaces, for example composer require symfony/ai-store symfony/ai-redis-store. There is no Laravel package discovery, service provider, or published config file, so you must register the store yourself inside one of your application's service providers. Keep the dependency behind a project-owned interface so your feature code never imports Symfony store classes directly.
Does symfony/ai-redis-store work with Laravel out of the box?
No. The package is a store implementation for Symfony AI's StoreInterface and assumes Symfony-style container and service wiring, which Laravel has no awareness of. You can absolutely use it, but you write the service provider, configuration, and Redis transport adapter yourself. Treat it as an adapter you own, not a drop-in Laravel package.
Which Redis version do I need for vector search with this package?
You need a Redis deployment that exposes the Redis Query Engine, meaning FT.CREATE and FT.SEARCH with vector search support. That normally means Redis Stack 7.x, Redis 8, or a managed service that explicitly enables those commands. Many managed tiers, including several ElastiCache and Memorystore configurations and serverless variants, do not expose them, so check your actual target environment before writing any code.
How do I connect symfony/ai-redis-store to Laravel's Redis facade, PhpRedis or Predis?
The Symfony store expects a Symfony-flavored Redis client abstraction, while Laravel gives you PhpRedisConnection or PredisConnection. Bridge them with a small adapter that calls rawCommand on PhpRedis or executeRaw on Predis, and handle connection reuse, pipelining, cluster routing, and error mapping explicitly. This adapter is where most integration bugs will land, so keep it isolated and cover it with integration tests against a real Redis Stack instance.
How does KNN vector search with FT.SEARCH and DIALECT 2 work in this store?
The store issues FT.CREATE to define the index, including the vector field with its algorithm and distance metric, then queries using FT.SEARCH with a KNN clause and DIALECT 2 so query parameters are passed correctly. You supply the vector dimensions, similarity metric, and number of nearest neighbours through your configuration. Because the command construction is thin, you can extend or reimplement it in your own adapter if you need custom index options.
Will symfony/ai-redis-store conflict with Laravel's existing Symfony components?
Composer-level risk is low, since Laravel already ships many Symfony components and class collisions are unlikely. The real friction is version negotiation against symfony/ai-store, especially if you are pinned to an older Laravel release or an older set of Symfony dependencies. Run composer why on the constraints and let Composer resolve before assuming a conflict blocks the install.
Is symfony/ai-redis-store production ready or still experimental?
Treat it as unproven: it is pre-1.0 at version 0.14 with very few stars and no known dependents, even though it lives in the main Symfony AI monorepo with a genuine release process. The realistic risk is API drift rather than project abandonment, since clear() only arrived in 0.11 and VectorDocumentInterface in 0.14. Pin exact minor versions, read the changelog before every bump, and keep the package behind your own interface so replacing it stays a matter of days.
What are the alternatives to using symfony/ai-redis-store in Laravel?
Alternatives include writing your own FT.CREATE and FT.SEARCH glue directly on top of Laravel's Redis facade, or using a different vector backend such as pgvector or Qdrant behind a similar contract. The Symfony package is only a few hundred lines of command construction, so an in-house implementation is a realistic option if you want zero Symfony coupling. Choose based on whether you value the maintained document contract more than you mind the extra dependency.
How can I count documents or enforce tenant quotas without loading vectors?
Version 0.14 adds a count capability that returns index size and filtered counts without hydrating any vectors. That maps cleanly to tenant quota enforcement, showing an N results label in your UI, and pre-flight guards before expensive KNN queries. Call it through your own adapter so application code stays independent of the Symfony store API.
Should I depend on symfony/ai-store or reimplement the Redis vector commands myself?
Depending on symfony/ai-store gives you VectorDocumentInterface, a small and stable contract of id, vector, and metadata, and lets the package build the FT.CREATE and FT.SEARCH commands for you. Reimplementing that glue yourself removes the Symfony dependency and gives you full control over index options and transport. Either way, expose your own project-owned VectorStore interface so this decision remains reversible if the vendor API shifts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel