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.
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.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.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.
Consider it when:
symfony/ai and the AI Agent chat components already present.v0.9 through v0.14, most with "no significant changes") shows an active but lightly-tested surface.Look elsewhere when:
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.SCRIPT migrations with no artisan migrate equivalent.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.
How can I help you explore Laravel packages today?