Download the PHP package rickphp/laravel-rick without Composer
On this page you can find all versions of the php package rickphp/laravel-rick. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-rick
Laravel Rick
Durable AI workflows for Laravel.
Rick is a runtime for long-running, recoverable, cost-aware AI workflows. It wraps your Laravel AI agents and plain PHP steps in durable execution — with recovery, provider-attempt accounting, token and cost budgets, tenant isolation, human input gates, and a testing façade.
Why Rick?
A single Agent::prompt() call is easy. A business process is not:
- a crash after the provider charged you should not charge you again on retry;
- a human approval may arrive hours later, in a different process;
- every tenant must see only its own runs;
- token and cost budgets must hold even under queue redelivery.
Rick wraps the Laravel AI agents you already write in a persisted, recoverable workflow. The agent stays an agent; Rick owns the durable process around it.
Before Rick / With Rick
| Without Rick | With Rick |
|---|---|
| A worker crash re-pays work the provider already charged for. | Successful invocations are reused on recovery. |
| A failed run is rewritten in place. | retry() creates an immutable child run with lineage. |
| Tenant scoping and budgets are hand-rolled per feature. | Built-in tenant isolation and enforced token/cost budgets. |
| "Did the provider charge me?" is guesswork. | Per-attempt token and cost accounting. |
| A redelivered job can double a paid call. | Duplicate delivery never re-authorizes a paid attempt. |
Core features
- Durable execution — runs survive process restarts; suspended runs stay readable across deploys.
- Recovery — immutable recovery lineage, and reuse of already-succeeded provider work.
- Provider-attempt accounting — every paid call is tracked; redelivery never double-charges.
- Token & cost budgets — enforced across recovery, with a known-pricing policy.
- Tenant isolation — runs, steps, and observations are tenant-scoped.
- Transactional outbox — events and jobs are delivered durably after commit (at least once; workers stay idempotent).
- Plain PHP steps — any invokable is a workflow step; write business logic, not engine primitives.
- Laravel AI agents —
->agent(MyAgent::class)adapts an agent into exactly one audited call. - Human input gates —
awaitHuman()with JSON-schema validation. - Testing façade —
Rick::fake()asserts against the real snapshot and timeline.
Design principles
- One engine. The public API compiles into the same execution engine — no second runtime.
- Explicit durability. At-least-once semantics are stated, never implied.
- Deterministic persistence. Versioned JSON codecs and encrypted payloads; no PHP serialization.
- A small public surface. A workflow reads like the business process, not the engine.
- Fail loud. Unsupported agent capabilities are rejected, not silently downgraded.
What a workflow looks like
An application step is an ordinary invokable class:
An agent is an ordinary Laravel AI agent:
Start it and drive it:
When a run fails, retry it without mutating history or re-paying for work that already succeeded:
Installation
Laravel Rick requires PHP 8.3+ and Laravel 12 or 13.
Provider setup
For OpenRouter, add your key and model to .env:
Publish the package configuration:
Then route the medium tier in config/rick.php:
After changing .env or configuration, run php artisan config:clear.
Quick start
Generate a workflow and run a minimal durable prompt:
The lowest-friction start is still a raw prompt as a durable workflow:
Testing without provider calls
Documentation
- Installation and configuration
- Building workflows
- Application steps
- Laravel AI agents
- Workflow state
- Runs and progress
- Public API
- Testing without provider calls
- Queues and transactional outbox
- Recovery
Project
- See CHANGELOG.md for release history.
- Laravel Rick is released under the MIT License.
All versions of laravel-rick with dependencies
ext-mbstring Version *
php Version ^8.3
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/pipeline Version ^12.0|^13.0
illuminate/queue Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/ai Version ^0.9.1 || ^0.10.0
opis/json-schema Version ^2.6