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 Redis Message Store

Ai Redis Message Store Laravel Package

symfony/ai-redis-message-store

Redis-backed message store for Symfony AI Chat. Persists and retrieves chat messages using Redis (phpredis) for fast, durable conversation history and session state. Part of the Symfony AI ecosystem; issues and PRs handled in the main symfony/ai repo.

View on GitHub
Deep Wiki
Context7

Redis message store bridge for Symfony AI Chat

Frequently asked questions about Ai Redis Message Store
Can I use this package in a Laravel app without Symfony components?
No, this package is tightly coupled to Symfony AI Chat and requires Symfony Messenger and Dependency Injection. If your Laravel app doesn’t already use Symfony components, you’ll face significant integration friction, including service container conflicts and manual bootstrapping.
How do I prevent Redis key collisions with Laravel’s existing cache/queue keys?
Use a dedicated Redis database for this package (e.g., `DB 2` in Laravel’s config) or prefix all keys with a unique namespace like `symfony_ai:`. The package doesn’t enforce isolation, so collisions with `cache:*` or `queue:*` keys are possible without explicit separation.
Does this support Laravel’s job queues for async message processing?
No, this package relies on Symfony’s event-driven Messenger component, which doesn’t natively integrate with Laravel’s queue system. You’d need to manually bridge Symfony events to Laravel jobs or use a custom solution like mapping events to queue listeners.
What Laravel versions are officially supported?
The package doesn’t explicitly list Laravel versions, but it depends on Symfony components that may not align with Laravel’s release cycle. Test thoroughly in your target Laravel version (e.g., 10.x) as compatibility isn’t guaranteed.
How do I enforce message expiration (TTL) to avoid Redis memory bloat?
The package doesn’t include built-in TTL policies. You must manually set expiration on Redis keys (e.g., `redis->set($key, $value, 'EX', 86400)`) or use a Laravel scheduler to prune old messages via a custom command.
What happens if Redis fails during a chat session?
Without additional configuration, message loss is possible. The package lacks built-in fallbacks like database backups or in-memory caching. You’d need to implement a custom recovery strategy, such as writing critical messages to a database table as a backup.
Are there Laravel-native alternatives for AI chat message storage?
Yes, consider using Laravel’s built-in database caching (`cache:store=database`) or packages like `spatie/laravel-redis-query` for Redis-based storage with Eloquent-like abstractions. For AI-specific needs, a custom Redis repository or a database table with TTL might be simpler.
How do I monitor Redis performance for this package in production?
Use Redis monitoring tools like `redis-cli --latency` or integrate with Laravel’s existing stack (e.g., Prometheus via `spatie/laravel-prometheus`). The package doesn’t include observability features, so you’ll need to track key operations (e.g., `SET`/`GET` latency) manually.
Will this package break if Symfony AI Chat changes its API?
Yes, since this is a bridge to Symfony AI, any breaking changes in Symfony’s Messenger or AI components could require updates. The package’s small community and lack of changelog suggest higher risk of abandonment or compatibility issues.
Can I use this for high-scale real-time chat in Laravel?
Technically yes, but only if you’re already using Symfony components and can handle the integration overhead. For pure Laravel apps, the performance benefits may not outweigh the complexity—especially if you need features like Eloquent relationships or query filtering.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky