Weave Code
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 Cloudflare Store

Ai Cloudflare Store Laravel Package

symfony/ai-cloudflare-store

Integrates Cloudflare Vectorize as a vector store for Symfony AI Store. Supports indexing and querying embeddings plus upserts and deletions via the Vectorize APIs, making it easy to connect Symfony AI apps to Cloudflare’s managed vector database.

View on GitHub
Deep Wiki
Context7

Cloudflare Vectorize vector store bridge for Symfony AI

Frequently asked questions about Ai Cloudflare Store
Can I use this package directly in Laravel without Symfony AI?
No, this package requires Symfony AI as a dependency. You’ll need to install `symfony/ai` and bridge it into Laravel’s service container, which may introduce versioning conflicts or require custom Laravel service providers. If you’re not already using Symfony AI, consider alternatives like dedicated Laravel vector store packages.
What Laravel versions does this package support?
The package assumes PHP 8.1+ and Laravel 9/10+, but explicit Laravel version constraints aren’t documented. Verify compatibility with Symfony AI’s requirements, as Laravel’s DI system may need adjustments to resolve Symfony-specific interfaces. Test thoroughly in your Laravel version before production use.
How do I integrate Cloudflare Vectorize into Laravel’s service container?
You’ll need to create a Laravel service provider to bind the Symfony AI `Store` interface to the Cloudflare store implementation. Use Laravel’s `bind()` method in a provider’s `register()` method, then publish the configuration for Cloudflare API credentials. Example: `app()->bind(StoreInterface::class, function ($app) { return new CloudflareStore($app['config']['cloudflare']); });`
What happens if Cloudflare Vectorize’s API changes or goes down?
The package doesn’t include built-in retry logic or fallback mechanisms. Implement Laravel’s HTTP client with exponential backoff for retries, and log failures using Laravel’s logging system. For high availability, consider caching frequent queries locally or using a secondary vector store as a backup.
Are there cost implications for using Cloudflare Vectorize in production?
Yes, Cloudflare Vectorize operates on a pay-per-query and storage model. Monitor usage via Cloudflare’s dashboard or API, and set budget alerts. For cost-sensitive applications, evaluate batch operations to reduce query volume or explore self-hosted alternatives like Milvus or Qdrant.
How do I handle data migration from an existing vector store to Cloudflare?
Use Cloudflare’s bulk upsert API (NDJSON format) to migrate existing vectors. Ensure your Laravel models or DTOs align with Cloudflare’s schema requirements (e.g., unique IDs, embedding dimensions). For large datasets, implement chunked upserts and verify idempotency to avoid duplicates during retries.
What are the alternatives to this package for Laravel?
For Laravel-native solutions, consider packages like `spatie/laravel-ai` (for Pinecone/Weaviate) or `meilisearch/meilisearch-php` (for Meilisearch). If you need self-hosted options, explore `milvus-io/php-sdk` or `qdrant/qdrant-client`. These avoid Symfony AI dependencies and may offer better Laravel ecosystem integration.
Does this package support hybrid search (e.g., combining vector and keyword search)?
No, this package only supports vector similarity search via Cloudflare Vectorize. Hybrid search would require extending the package or using Cloudflare’s full-text search capabilities separately. For Laravel, consider combining this with a dedicated search engine like Algolia or Meilisearch.
How do I test this package in a Laravel application?
Mock the Cloudflare API responses using Laravel’s HTTP client or a testing library like `mockery`. Test upserts, queries, and deletions in isolation, then integrate with your Laravel models. Use Laravel’s `fresh()` method to reset the store between tests and verify error handling for API failures.
Will this package work with Laravel’s queue system for async operations?
Yes, but you’ll need to wrap Cloudflare operations in Laravel jobs. Use the `dispatch()` method to queue upserts or queries, and handle failures in the job’s `handle()` method. For long-running operations, consider Laravel’s `dispatchSync()` for immediate feedback during development.
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi