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 Sqlite Store

Ai Sqlite Store Laravel Package

symfony/ai-sqlite-store

SQLite vector store integration for Symfony AI Store. Supports full-text search via SQLite FTS5 and computes vector similarity distances in PHP. Compatible with sqlite-vec (vec0) extension for embedding storage and retrieval.

View on GitHub
Deep Wiki
Context7

SQLite vector store bridge for Symfony AI

Frequently asked questions about Ai Sqlite Store
How do I install symfony/ai-sqlite-store in a Laravel application?
Install it with Composer alongside symfony/ai (version 0.8 or later), which the bridge depends on. The package ships no Laravel service provider or config file, so you register the SQLite store and bind it to the Symfony AI Store interface yourself in one of your app's service providers. Once bound, you can inject the store anywhere you write embeddings or run retrieval queries. There are no Artisan commands or publishable assets to worry about.
Is the sqlite-vec extension required to use this package?
No. Vector similarity works out of the box because distances are calculated in PHP, and SQLite FTS5 handles keyword and full-text search. The optional sqlite-vec extension, which provides the vec0 virtual table, adds native embedding storage and retrieval for better performance on larger datasets. If you cannot install the extension on shared hosting, stay on the pure PHP path and size your dataset accordingly.
Does symfony/ai-sqlite-store work with Laravel, or is it Symfony-only?
It is a Symfony AI bridge rather than a Laravel package, but it does not require the Symfony framework kernel, so it runs fine inside a Laravel app. The catch is that you adopt Symfony AI's Store interface and abstractions for your AI features instead of a Laravel-native facade. Expect to wire configuration manually, since there are no Laravel-style facades, config files, or Scout-like helpers.
How does hybrid search work with SQLite FTS5 and vector similarity?
Full-text queries are handled by SQLite FTS5, which gives you keyword and phrase matching with built-in ranking. Vector similarity is a separate code path computed in PHP, or by sqlite-vec when the extension is installed. You combine both result sets in your own application code to get semantic plus keyword retrieval. There is no built-in fusion or re-ranking, so score normalization and weighting are your responsibility.
How many vectors can this store handle before performance becomes a problem?
With PHP-side distance calculation every query is a linear scan, so latency becomes noticeable in the low hundreds of thousands of vectors. Enabling sqlite-vec pushes much of that work into SQLite and raises the practical ceiling. If you expect millions of vectors or real-time recommendation traffic, plan a migration to PostgreSQL with pgvector or a dedicated vector database instead.
Can I safely write embeddings from Laravel queue workers and concurrent requests?
SQLite uses file-level locking, so only one writer can commit at a time and concurrent HTTP requests or queue workers will contend for the file. The usual fix is to serialize embedding writes through a single queue or a dedicated job so reads stay fast. Read-heavy workloads are generally fine, but write-heavy ingestion pipelines are not a good fit for this store.
Do I need to run migrations or create tables for the vector store?
No. The store is schema-less from your perspective and initializes its SQLite file automatically, which fits Laravel's convention-over-configuration style. You point it at a database path and start storing documents and embeddings. If you need to inspect the sqlite-vec vec0 tables directly, that requires custom SQL rather than Eloquent.
How should I test AI features built on top of this store?
Use an in-memory SQLite database so tests are fast and never touch a real file, then rebind the store in your test case. Keep in mind that each in-memory connection is isolated, so avoid patterns that open multiple connections expecting shared state. Assert on retrieval results through the Store interface instead of querying raw tables.
How do I deploy this in Docker or a serverless environment?
The PHP package installs with Composer like any dependency, but sqlite-vec must be compiled and enabled inside your image, which is the part that usually breaks serverless runtimes. Also confirm that the SQLite build you ship was compiled with FTS5, since some minimal images disable it. If extension installation is not viable, ship with the pure PHP fallback and accept slower vector queries.
Is this package maintained, and when should I pick pgvector or Qdrant instead?
It lives inside the main Symfony AI monorepo, so issues and pull requests go through the symfony/ai repository and releases follow that project's cadence. The larger risk is the optional sqlite-vec extension, which is a niche project with limited documentation and a small maintainer base. Choose this store for embedded, single-node, or prototype workloads, and move to PostgreSQL with pgvector or Qdrant once you need concurrent writes, high query throughput, or millions of vectors. Validate extension compatibility across every target environment before going live.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections