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

symfony/ai-surreal-db-message-store

SurrealDB message store integration for Symfony AI Chat, letting you persist and retrieve conversation messages in SurrealDB via its HTTP integration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Roadmap: persistent conversation memory. This package is a concrete signal that the Symfony AI Agent stack now treats "message store" as a pluggable abstraction rather than a hard-coded concern. For a Laravel/PHP roadmap, that validates a product bet: chat history and context persistence are becoming table stakes, not differentiators. Treat the package as evidence for prioritising the capability, not as the delivery vehicle.
  • Build vs. buy for the storage layer. The decision it informs is narrow and real: do we persist conversations in the relational store we already operate (Eloquent + PostgreSQL/MySQL jsonb), a cache-first store (Redis), or a document/graph engine (SurrealDB)? SurrealDB's pitch — flexible schema, graph traversal, real-time subscriptions — matters if the product needs dynamic per-message attributes (embeddings, sentiment, tool traces) and live-updating threads. If the need is "a table called messages," this is over-engineering.
  • Architecture: define the interface before the driver. The strongest transferable idea is the MessageStore interface itself. A PM can push engineering to ship a MessageStore contract in the Laravel app and back it with Eloquent on day one, keeping the SurrealDB driver optional. That decision costs little now and preserves optionality.
  • Vendor and datastore concentration risk. Adopting SurrealDB for AI chat means a second datastore to operate, secure, back up, and hire for. That is a durable cost decision, and it should be made against a benchmark, not against enthusiasm for a 2-star package.
  • Prototyping budget. If the team is already on Symfony AI, this is a same-day spike: install, point it at a SurrealDB instance, prove persistence. That is a legitimate "spend two days to learn" decision independent of whether it ships.

Where it does not help: it is not a Laravel package. It ships Symfony's HttpClient, Serializer, and container wiring. There is no Illuminate integration, no service provider, no config file. Any "we'll just install it" framing should be rejected in the decision record.

When to Consider This Package

Consider it when:

  • The project is genuinely on Symfony (not Laravel) with symfony/ai and the AI Agent chat components already present.
  • The team already runs SurrealDB for another workload, so the operational cost is already sunk.
  • You need persistence with no PHP extension — the HTTP integration means zero native build steps, which matters in constrained container environments.
  • You are running a time-boxed spike or prototype and can accept pre-1.0 API churn; the release history (v0.9 through v0.14, most with "no significant changes") shows an active but lightly-tested surface.
  • You want a reference implementation of the message-store contract to copy into a Laravel-native class, not a dependency to install.

Look elsewhere when:

  • The stack is Laravel. The adaptation cost (replacing HttpClient with the Http facade, swapping the serializer, bridging the DI container and any Symfony events, remapping exception types) exceeds the value of a ~600-line bridge. Write the store yourself against SurrealDB's HTTP API; you will end up owning the fork anyway.
  • You need stability guarantees. Zero dependents, two stars, and no 1.0 tag means no meaningful ecosystem pressure to keep it correct. The one substantive changelog entry across eight releases is a UUID-corruption bug fix (#2324) — a reminder that message identity and ordering are exactly where immature persistence code breaks.
  • Low-latency or high-throughput chat is the requirement. HTTP-per-operation against SurrealDB adds a network hop you would not pay with a co-located relational store.
  • Compliance, audit, or retention obligations apply — you will want a store your team can operate, monitor, and defend in a review.
  • Nobody on the team has operated SurrealDB. Schema-less flexibility is a cost when there is no one enforcing a message shape; you will get inconsistent documents and manual SCRIPT migrations with no artisan migrate equivalent.

How to Pitch It (Stakeholders)

For the executive summary: "We evaluated an open-source bridge that stores AI conversation history in SurrealDB. It's MIT-licensed, maintained inside the official Symfony AI monorepo, and requires no exotic setup. It is not a Laravel package and is pre-1.0 with essentially no adoption. Recommendation: do not adopt as a dependency. Do use it as market intelligence and a design reference — it confirms that conversation memory is standardising into a swappable interface, which is the architecture we should copy. Cost to act on that insight: roughly two engineer-days to define a MessageStore contract and ship an Eloquent-backed implementation. That gives us the same capability without a new datastore, a fork, or a maintenance liability."

For engineering: "Don't vendor it. Read the README and the HTTP integration notes, then implement MessageStore natively — Laravel Http facade, our own auth handling for SurrealDB's NSM model, our own exception mapping. Keep the driver behind an interface so swapping Postgres → SurrealDB is a config change, not a rewrite. If we ever need the real thing, the port is a weekend, not a quarter."

The one-line risk to carry into the decision log: message-layer bugs are silent and expensive — the package's only substantive fix to date was a UUID corruption defect. Whatever we build, conversation identity and ordering need explicit tests from day one.

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.
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode