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 Cache Message Store Laravel Package

symfony/ai-cache-message-store

PSR-6 cache message store for Symfony AI Chat: persist and retrieve conversation messages through any PSR-6 cache implementation, keeping chat history fast and simple to manage.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for conversational memory. The package is a ~one-class bridge that adapts a PSR-6 cache pool to Symfony AI Chat's MessageStore interface. That makes it a buy decision only if we've already bought into symfony/ai-chat; otherwise we'd be adopting a Symfony component to get an interface we could define ourselves in roughly a day of Laravel-native engineering. Frame the decision as "adopt Symfony AI Chat?" first, "adopt this bridge?" second.
  • Feature scoping: persistence without new infrastructure. Its one genuine product property is that chat history survives across requests using a cache backend we already run (Redis/Memcached). That supports a "conversational continuity" feature without a schema migration or a new datastore — attractive for a pilot, an internal tool, or a low-stakes assistant.
  • Roadmap sequencing. It argues for ordering: (a) decide the AI chat layer, (b) pick the message store, (c) define the durable store of record, (d) treat cache as an optimization. Committing to this package before (a) and (c) is solving a storage problem we may not have. It should not appear on a roadmap as its own line item.
  • Use cases it fits: short-lived, single-tenant or per-session assistants where losing history on eviction is acceptable and Redis is already provisioned. Use cases it does not fit: anything with retention, audit, compliance, or "the conversation must still be there tomorrow" requirements — cache eviction is data loss, not a performance event.
  • Non-decision it should not be used to justify: generic "cache our chat messages in Redis" work. If that's the actual goal, Laravel's own PSR-16 Cache facade (and Cache::tags() for invalidation) does it without a Symfony dependency.
  • Deferral is a legitimate outcome. With 1 star, 0 dependents, a stub README, and a 0.x version line, "no decision now, revisit if we adopt Symfony AI Chat" is defensible and cheap.

When to Consider This Package

Consider it when all of these hold:

  • We have committed (or are actively spiking) to symfony/ai-chat as the AI chat layer — the real dependency to evaluate is that component's maturity, provider coverage, and release cadence, not this bridge.
  • We need message persistence behind the MessageStore contract with no schema migration.
  • Redis or Memcached is already operated by the platform team, and cache eviction of a conversation is an acceptable failure mode.
  • We can pin exact versions and accept a 0.x dependency in the path being built.
  • We have a named engineer who will own the thing, since there is no vendor SLA and the documentation is effectively a link list.

Look elsewhere when:

  • The AI layer is Laravel-native. Laravel's Cache facade is PSR-16, not PSR-6 (a correction worth repeating loudly — the opposite has appeared in earlier drafts). Bridging means pulling in symfony/cache and configuring a second Redis connection outside config/cache.php, losing Laravel's key prefixing and tag support. That's a real integration tax for a thin adapter.
  • Conversations are the system of record. Cache-only is wrong; a durable store is required regardless of whether we use this package.
  • We want a supported, documented, versioned dependency with an SLA or meaningful adoption signal.
  • Requirements are simple enough that a small internal MessageStore implementation over Laravel's cache is cheaper than the Symfony coupling. Price this one-day option explicitly alongside adoption — the near-empty 0.14.0 changelog is itself evidence the adapter is very thin.
  • We're being asked to justify it with performance or cost numbers. The "~70% cost reduction," ">10K messages/sec," and "sub-50ms" figures circulating internally have no benchmark behind them and must not reach a stakeholder deck or a finance model without our own measurement.

Before any commitment, resolve: the exact MessageStore method set (append-only vs. full-history read/write), whether our real message shapes (tool calls, multimodal parts, enums) round-trip through the cache driver, TTL ownership (store vs. pool), and the invalidation convention given there are no cache tags. A 2–3 day spike against the current v0.14.0 source — not the v0.8-era snippets in our drafts — should produce a short internal API note.

How to Pitch It (Stakeholders)

For executives (one paragraph): This is a small, free, MIT-licensed adapter that lets an AI chat component remember conversations using the Redis cache we already run, with no database changes. It is not a platform or a product in itself — it only matters if we choose Symfony's AI Chat component as our conversational layer, and a decision on that should come first. The package is early-stage (pre-1.0, negligible adoption, no vendor support, minimal documentation), so the honest recommendation is to treat it as an input to the chat-framework decision rather than an approved dependency. If we do adopt Symfony AI Chat, this bridge is a low-effort option worth a short spike; if we build the chat layer on Laravel-native tooling, a comparable adapter is roughly a day of internal work and this package should be skipped. Either way, cache is an optimization on top of a durable conversation store — never the store itself — and no cost or performance benefits should be quoted until we've measured them ourselves.

For engineering (three bullets):

  • Evaluate symfony/ai-chat, not this bridge; the bridge inherits every risk of that component. The bridge itself is a thin PSR-6 adapter inside the symfony/ai monorepo, currently at v0.14.0.
  • Day-one blocker is the PSR-6 vs. PSR-16 mismatch — Laravel's cache is PSR-16, so integration requires symfony/cache and a separately configured Redis connection. Budget for two cache configs and no Cache::tags().
  • Two-day spike: install at a pinned v0.14.0, read the source, verify serialization round-trip on real message shapes, prototype a fallback read path, and produce an internal API note. Deliverable is a go/no-go with measured latency, hit ratio, and memory per session — not a benchmark-free business case.

Ask: approve a 2–3 day spike conditional on the chat-framework decision, not a production commitment. The recurring cost of tracking the 0.x line is real but small (v0.14.0 was a version bump with no functional change — we still have to bump, regression-test, and ship it); the real decision is which chat layer we're building on.

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.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin