r2luna/brain
Brain is an AI agent framework for Laravel. Build LLM-powered agents with tools, memory, and multi-step workflows using simple PHP classes, then connect them to your app's data, services, and existing Laravel features.
#[Sensitive] work is the difference between "we can put this in a workflow that touches passwords, tokens, or customer data" and "we can't." Redaction now holds across the workflow lifecycle — skipped, cancelled, and earlier events, validation errors, nested workflows, and exception messages in failure events and brain:run. That closes the class of bug most likely to cause a reportable data exposure.APP_KEY at queue time. This is a compliance answer, not just a feature: queued payloads in Redis/SQS/database no longer carry plaintext secrets.#[OnQueue]), nested workflows, run history, and a CLI (brain:run, brain:show, brain:migrate) is a meaningful head start on a bespoke state machine, and the parts you'd hand-roll worst (secret handling, audit output) are the parts now hardened.APP_KEY rotation (see below). Treat key-rotation guidance as a release dependency, not documentation debt.SensitiveValue payloads queued pre-encryption. But the APP_KEY dependency makes this operationally significant: rotating keys before draining queued jobs will strand payloads. That is a deployment-runbook change and a support-readiness item.rules() now validates real values (previously redacted ones), and exception messages in failure events are now redacted. Anything downstream that parsed failure-event text or relied on validating masked input needs a pass. Also confirm APP_KEY/APP_PREVIOUS_KEYS handling in every environment, including ephemeral CI and preview environments that regenerate keys.Workflow/Process split) and Laravel 13.34 / Testbench 11.5 compatibility. This is the profile of a maintained dependency rather than an abandoned one — useful evidence when justifying adoption over an internal build.Consider it when:
brain:run with hidden-input prompts and masked previews means support staff can trigger workflows without seeing or leaking secrets.#[Sensitive], inherited from parent classes, dot notation like user.password) rather than sprinkled through logging code by hand.APP_PREVIOUS_KEYS) and a drain-queues-before-rotation step.Look elsewhere when:
APP_KEY; multi-tenant key isolation would need to be built around it.For executives: Release 4.1.4 closes a set of redaction gaps in how the workflow engine handles sensitive values. Sensitive data is now encrypted with the application key before it enters a queue, and it stays masked across the full workflow — including steps that were skipped or cancelled, nested workflows, validation errors, failure events, and CLI output. In plain terms: the two highest-risk leak paths for this class of software — secrets sitting in a queue, and secrets surfacing in error output an engineer reads at 2am — are now addressed.
What we're asking for: (1) schedule the upgrade — it's non-breaking and in-flight jobs keep working; (2) update the deployment runbook so APP_KEY rotation retains the old key in APP_PREVIOUS_KEYS until queued jobs drain; (3) fund one regression pass on validation behavior (rules() now sees real values) and on any alerting or log parsing that touches failure-event messages.
For engineering: Treat this as a security release with an operational tail rather than a routine patch bump. The encryption-at-rest behavior is a durable improvement, but it converts APP_KEY into a runtime dependency for in-flight work — that coupling belongs in your rotation and disaster-recovery docs, not just the changelog. The maintainer is also enforcing 100% coverage, capped complexity, and CRAP thresholds, so expect the codebase to stay readable and the upgrade surface to stay predictable; that's a reason to keep this dependency current rather than fork it.
How can I help you explore Laravel packages today?