- What is symfony/ai-supabase-store and can I use it in a Laravel application?
- It is a Symfony AI Store bridge that stores and queries embeddings in Supabase using pgvector vector columns and the match_documents RPC for similarity search. It is Symfony-first because it implements Symfony AI's StoreInterface, but the abstraction boundary is clean enough to wrap in a Laravel service provider. Many Laravel teams use it as embedding storage and retrieval for RAG and semantic search while generating embeddings elsewhere. Expect a light adapter layer rather than a native Laravel package.
- How do I install symfony/ai-supabase-store with Composer in Laravel?
- Install via Composer alongside the Symfony AI store contracts and your Supabase credentials, then register a Laravel service provider that binds the store as a singleton. With v0.14.0 you can resolve the new StoreFactory from config and call create with Supabase credentials instead of hand-constructing the client and store. Pin an exact minor version because the package is pre-1.0 and interface additions can break custom adapters. Keep your Supabase URL and key in config/services or environment variables, not in code.
- Does symfony/ai-supabase-store integrate with Eloquent models?
- Not natively; there is no first-party Eloquent integration in the package. You map Eloquent records into the store's document contract, and v0.14.0's VectorDocumentInterface gives you a typed DTO to translate to and from rather than ad-hoc arrays. That reduces long-term adapter churn but means existing array-based glue code and tests need a one-time refactor. Plan for a small mapping layer in your Laravel app.
- What are the requirements for using the Supabase vector store with Laravel?
- You need PostgreSQL with the pgvector extension, either Supabase-managed or self-hosted with matching RPC functions, plus a Supabase project and API credentials. The store relies on vector columns and the match_documents RPC signature for similarity search, so custom schemas require manual RPC work. Laravel apps on MySQL or SQLite must proxy through Supabase's REST API and forfeit pgvector optimizations. Embeddings still need to be generated elsewhere before storage.
- How do I configure the Supabase store in a Laravel service provider?
- Register a singleton in a service provider that resolves Symfony AI's StoreFactory from your config array and calls create with Supabase credentials, then bind the resulting store for injection. The v0.14.0 StoreFactory centralizes construction and materially simplifies wiring compared with hand-building the Supabase client and store. Keep the config array in config/services.php or a dedicated config file so environment-specific credentials stay out of code. Estimated adapter effort for the happy path is roughly one to two days.
- Can I use symfony/ai-supabase-store with MySQL or SQLite?
- Not directly, because the store requires PostgreSQL with pgvector for vector columns and similarity search. MySQL and SQLite Laravel apps can still proxy through Supabase's REST API, but they forfeit pgvector-specific optimizations and inherit RPC latency. For teams already on PostgreSQL, Supabase-managed or self-hosted with adjusted RPCs is the intended path. If you cannot adopt PostgreSQL, evaluate a different vector store backend.
- How does similarity search work in the Supabase vector store?
- It uses pgvector vector columns plus Supabase's match_documents RPC function to run similarity queries inside PostgreSQL. You store embeddings as documents and call query with filters that map cleanly onto Eloquent-style where semantics, keeping the learning curve shallow for Laravel developers. The package is still tied to the match_documents RPC signature, so custom schemas need manual RPC work. Supabase's REST or direct-SQL fallback remains available if pgvector RPCs are not viable.
- Is symfony/ai-supabase-store production-ready for Laravel apps?
- The package is explicitly 0.x with a fast-moving changelog, so treat it as a viable stopgap rather than a strategic platform choice. v0.14.0 added StoreFactory, count, and VectorDocumentInterface, and those interface additions are effectively breaking for custom adapters like a Laravel wrapper. Pin an exact minor version and test upgrades deliberately. Performance versus direct pgvector or Scout/Elasticsearch is still unbenchmarked in many contexts, so measure latency before committing.
- How do I test the Supabase vector store in a Laravel application?
- Mock or fake the StoreInterface in unit tests and keep a small integration suite that runs against a disposable Supabase project or a local PostgreSQL with pgvector. The new count method gives you a quick volume and health probe for assertions and quota checks. Because v0.14.0 changed document contracts, revisit any tests written against v0.13 array-based glue. Test the match_documents RPC signature explicitly if you maintain custom schema functions.
- What alternatives to symfony/ai-supabase-store exist for Laravel vector storage?
- Laravel's AI ecosystem, including spatie/laravel-ai and laravel-ai, still lacks a first-party vector store, so this package remains a useful stopgap for RAG and semantic search. Alternatives include direct pgvector access, Laravel Scout with Elasticsearch, or other vector databases wrapped behind a custom VectorStore. If you already use Supabase and PostgreSQL, this bridge offers the shortest path to embeddings storage and similarity search. If you need MySQL or SQLite compatibility, choose a backend that does not depend on pgvector.