redberry/synapse
Redberry Synapse is a Laravel package for structured state management. It provides a clean, expressive API for defining states and transitions, helping you keep complex application workflows predictable, maintainable, and easy to test.
Architecture fit. Synapse is a dev-tooling package in the Telescope/Horizon lineage: a service provider registers routes, a React SPA shell, publishable config and migrations, and console commands. It is explicitly not on the request path of your application — it is a browser dashboard over agent executions. That distinction drives the entire evaluation: it is an observability/authoring surface for the Laravel AI SDK (laravel/ai), not a runtime dependency of your AI features.
The architectural choices are disciplined and appropriate. Three self-contained synapse_* tables; a hard rule against touching the SDK's agent_conversations table; discovery, invocation, approval and recording split into distinct namespaces (Chat/, Discovery/); a repository layer for cascade deletes shared by prune, clear and endpoint delete. Committed dist/ assets inlined at request time removes Node from the deployment story entirely, which is the right call for a dev-only package.
Integration feasibility. High in the narrow case, zero in the broad case. The hard prerequisite is that you already run the Laravel AI SDK. Synapse is a companion tool — it offers value only to teams that have agents to chat with, test, and approve. Because it registers its own routes, views, and migrations under a publish-only model, installation is one Composer command plus a gate stub and a config publish. There is no interception of your application code, no service container surgery, no event listeners on your models.
The real integration risk is version coupling: Synapse tracks the internals of laravel/ai — discovery of agent metadata, tool call shape, streaming event format. An SDK that shifts its contract invalidates the dashboard's parsing. That is a tight, non-negotiable coupling.
Technical risk. Ranked:
laravel/ai is the whole product. If the SDK is pre-1.0 or iterating on streaming/tool-call contracts, Synapse upgrades become forced marches.viewSynapse gate is the only guard, and it is a published stub — meaning the failure mode of a forgotten publish is a default gate. Confirm default-deny in your environment matrix before anything else.Agent::fake() in tests, but nothing structurally prevents a developer from pointing it at a real provider.Key questions for the vendor / spike:
laravel/ai versions are supported, and is that range enforced in composer.json or merely documented?APP_ENV?synapse:install mutate/reshape existing tables on upgrade?UPGRADE.md exists — how complete is it for major versions)?Stack fit. Clean for Laravel 11/12 + Livewire-free frontends; the SPA is self-contained and ships compiled. No Node toolchain, no Vite config changes, no npm audit surface added to your app. The only stack-level question is whether your environment serves large inline asset responses acceptably (asset tags are inlined at request time — fine for a dev tool, unexamined for a shared staging box).
Migration path. Treat it as an additive, reversible dev dependency:
composer require --dev redberry/synapse.snapse-config) and the gate stub (snapse-* provider) — review the gate before first boot.synapse_* migrations; optionally point them at a dedicated connection via SYNAPSE_DB_CONNECTION to keep dev telemetry out of your primary schema.SYNAPSE_ENABLED and the viewSynapse gate to explicit local-only.Rollback is composer remove plus dropping three tables. That reversibility is the strongest argument for a spike.
Compatibility. Pin the SDK and the dashboard together in composer.json and upgrade them as a pair. Do not allow a floating laravel/ai constraint alongside Synapse. Verify PHP/Laravel matrix against your target versions explicitly — with zero dependents there is no community signal, so you are the compatibility test.
Sequencing.
| Phase | Action | Exit criteria |
|---|---|---|
| 1. Gate check | Install in a throwaway branch; confirm default-deny and local-only binding | Gate denies for non-local users, verified by test |
| 2. Spike | One real agent, one tool call, one approval flow end-to-end | Dashboard renders, streams, records token usage |
| 3. Team pilot | Roll out to 2–3 developers on a pinned SDK version | No install/runtime friction; assets serve in each local runtime |
| 4. Standardize | Add to the team's dev bootstrap; document upgrade cadence | Named owner; upgrade runbook written |
| 5. Reassess | After one SDK upgrade cycle | Upgrade cost measured — continue, or drop |
Stop at phase 2 if the gate cannot be made default-deny or the SDK constraint cannot be pinned.
Maintenance. Low ongoing cost, one sharp edge: the SDK coupling means Synapse upgrades are reactive, triggered by laravel/ai upgrades rather than chosen on your own schedule. Budget an upgrade-and-verify task per SDK bump, and require a manual pass of the maintainer's browser e2e suite (or your own smoke test of chat, stream, tool detail, approval) after each. Pin exact versions; a floating constraint on either side turns a routine upgrade into an unplanned incident.
Support. Single-vendor, single-repo. No dependents means no Stack Overflow corpus, no third-party tutorials, no one else's bug reports to learn from. Escalation is GitHub issues against a 60-star project — response time is a courtesy, not a contract. Internally, name an owner. This is not a package to let the team adopt organically and hope someone understands.
Scaling. Scales in the direction that matters (per-developer, one dashboard per local environment) and not in the direction it wasn't built for. Do not run a shared multi-tenant instance: concurrent browser sessions stream SSE against a shared conversation store, and the maintainer's own guidance notes that parallel suites race on the migration/testbench surface. If a shared staging instance is genuinely wanted, provision it as a single-tenant, gate-restricted, retention-capped deployment and accept that this is off the intended path.
Failure modes.
dist/ after a partial upgrade. Rare but confusing; resolved by clean reinstall.Agent::fake() discipline.Ramp-up. Fast for anyone fluent in Laravel dev tooling — the mental model transfers directly from Telescope and Horizon, and the UI vocabulary (agents, tool calls, approvals, tokens) is self-explanatory to anyone already building with the AI SDK. Expect under an hour to first productive use. The non-trivial learning is operational, not conceptual: understanding that this is a development surface, that the gate is the only thing between it and the internet, and that its correctness is chained to an external SDK. That framing needs to come from you, not from the README.
How can I help you explore Laravel packages today?