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

Laravel Ai Engine Laravel Package

m-tech-stack/laravel-ai-engine

Laravel AI Engine provides a clean, configurable layer for adding AI features to Laravel apps, with a unified API for providers, prompt and chat workflows, embeddings, and tool calling—keeping AI logic testable and maintainable.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

The package is a conventional Laravel package (service provider + publishable config/ai-engine.php and config/ai-agent.php) that layers an agent runtime over a multi-provider LLM abstraction. That is a good structural fit for any Laravel monolith or modular app that wants an in-process agent layer rather than a sidecar service. The opinionated decomposition is the strongest part of the design:

  • Tools (AgentTool / SimpleAgentTool) are the unit of action, registered declaratively in config and bound through the container.
  • Skills (AgentSkill, AgentSkillRegistry, AgentSkillMatcher) orchestrate multi-step flows and declare required tools/final tools — the matcher is a stopword-stripped keyword match, which is simple and debuggable but not semantic.
  • AiNativeRuntime is an explicit planner loop scoped to a ToolRegistry, and domain sub-agents get an EmptySkillRegistry deliberately so global skills cannot hijack them. That is a thoughtful guardrail, and it signals the author has been burned by planner loops.
  • AiResource::for(Model::class) generates find/create/show tools without hand-written CRUD — high leverage, but also the highest-risk surface because it writes to your domain models.
  • Fail-closed scoping (AIScopeResolver, scope_columns, 'public' => true opt-in) is the correct default for multi-tenant data, and is applied consistently across data_query, RAG, vector search, and memory.

The architecture asks you to accept a framework inside your framework: its own planner, its own tool registry, its own memory/transcript store, its own credit system, its own observability events. That is a real adoption cost — you are standardizing on this package's vocabulary, not on Laravel's.

Integration feasibility

Feasible for a single team with Laravel depth; not a drop-in. Concretely:

  • Composer install, publish configs, configure engines with API keys, then php artisan ai:doctor to validate key health per engine. The CLI (~80 ai: commands) is unusually complete for a package at this adoption level and is the main reason I would not dismiss it outright.
  • The documented ground rule — verify the class in src/ before using the API, do not invent methods — is the single most important signal in the supplied material. A package that instructs its own consumers to verify source before use is telling you the API surface is large and drifting relative to its guides. Budget for reading src/.
  • Optionality is broad but each optional subsystem is a separate operational dependency: Neo4j (graph/hybrid RAG), MongoDB/Redis/file (memory drivers), FAL/Replicate (video), ElevenLabs/Google TTS, Pexels/Unsplash, laravel-ai-engine-federation as a sibling package. Assume only the Laravel/DB/queue core path is safe on day one.

Technical risk

  • Maturity and support risk is the dominant risk. 1 star, 0 dependents, a single-maintainer repository, and a release dated 2026-08-13 create a profile with essentially zero third-party production evidence. The future-dated release metadata warrants a supply-chain and provenance check before it enters a dependency manifest — confirm tags, signed releases, CI status, and commit history rather than trusting the metadata field.
  • Provider-contract sprawl. Dozens of external APIs (OpenAI, Anthropic, Azure, xAI, DeepSeek, FAL, Replicate, ComfyUI, Midjourney, ElevenLabs, Pexels, Unsplash, Neo4j, Mongo) means a permanently moving breakage surface. Failover (ai-engine.error_handling.fallback_engines) mitigates outages but silently changes output quality and cost.
  • Behavioral nondeterminism. The package's guidance (mock AIEngineService in CI, keep live calls manual) is correct but means your CI validates plumbing, not agent quality. You own the eval harness.
  • Scope failures present as empty answers. The docs are explicit that a domain agent returning 0 for data that exists is usually misconfigured scope, not a planner bug. That is a debugging trap for every new engineer.
  • Convergence fallback can return a stale-but-plausible answer (metadata.converged_via = 'tool_result_fallback') when the planner exhausts steps. Acceptable as a backstop; dangerous if surfaced to users without a confidence marker.

Key questions

  1. What Laravel and PHP versions are in the support matrix, and what does the test suite actually cover — tools/skills deterministically, or planner loops too?
  2. Which engines and drivers are exercised in CI? Which are "written but unverified"?
  3. Who maintains this, what is the commit cadence, and is there any stated deprecation/semver policy across 80 commands and a large config tree?
  4. Is ai-agent.php tool registration and AiResource write generation safe by default (confirmation, validation, authorization), or is requiresConfirmation() opt-in per tool?
  5. What is the data-egress contract — what leaves the app to which provider, and is there a redaction path for PII before analyze_file or RAG indexing?
  6. Is CreditManager authoritative for billing, or advisory? What happens to an in-flight multi-step skill when InsufficientCreditsException fires?
  7. Does the failover chain preserve prompt/tool-schema compatibility, or can a fallback engine silently drop tool-calling support?

Integration Approach

Stack fit

Good fit for a Laravel app already using the container, config, queues, events, and Eloquent. It assumes queue workers (vector indexing, video polling), a cache/DB store for memory and transcripts, and optionally Redis/Mongo/Neo4j. It does not fit well if you are on a non-Laravel PHP stack, a serverless/stateless deployment without workers, or a compliance posture that forbids multi-provider egress.

Migration path

Adopt read-only first and earn write access:

  1. Spike (timeboxed, ~2 weeks). Fresh branch, one engine, ai:doctor, a single read-only tool. Publish both configs, diff them against defaults, and pin the config as internal documentation.
  2. Read surface. data_query + aggregate_data on one or two models with explicit scope_columns; AiResource::for(...)->detailOnly() for relation-aware reads; search_knowledge over a small vector index.
  3. Write surface. AiResource writable tools or hand-written tools with requiresConfirmation() and validate() on every mutation. Nothing writes without a confirmation step and an authorization check that is independent of the model.
  4. Skills and domain agents. Add skills only with write-specific $triggers (the docs explicitly warn against read-ambiguous keywords). Use 'handler' => 'ai_native' for domain agents and accept that they do not inherit global skills.
  5. Defer credits/billing, realtime sessions, media generation, federation, Neo4j graph RAG, and the model council until a narrower slice is in production.

Compatibility

Verify Laravel/PHP constraints in composer.json before anything else, and check that optional drivers degrade rather than throw when unconfigured (the docs claim keyless engines are skipped automatically — confirm that for vector, graph, and memory drivers too). Watch for config namespace collisions: ai-engine and ai-agent are generic keys likely to clash with in-house config. Treat published config as your file and keep a diff against upstream on every bump.

Sequencing

Gate each phase on a small eval set (20–50 real prompts with expected tool calls and expected answers) run manually against live models. Do not advance phases on "it demoed well." The package gives you TraceRecorderService and ai:agent-runs:* — use those to build the eval corpus from real traces rather than writing scenarios from imagination.

Operational Impact

Maintenance

Assume you own this code. At 1 star and 0 dependents there is no upstream support channel, no security advisory feed you can rely on, and no community to absorb upgrade pain. Practical posture: pin an exact version, mirror the repository internally, and be prepared to fork. The breadth that makes the package attractive (~80 artisan commands, large config tree, many drivers) is exactly the breadth that makes upgrades expensive — every bump is a config diff plus a driver smoke test.

Support

No SLA; MIT gives you the code and nothing else. You need an internal runbook: ai:doctor for key health, AgentManifestDoctor for agent config, ai:vector-* and ai:neo4j-* for index state, ai:agent-runs:* for planner post-mortems. Wire AIRequestStarted / AIRequestCompleted / AIFailoverTriggered into existing APM on day one — failover in particular must alert, because it is a silent quality and cost change.

Scaling

Three independent scaling axes, and they fail differently:

  • Token/step cost. Planner loops multiply calls. ai-agent.ai_native.tool_selection matters as tool count grows — start at skill_scoped (the docs' own recommendation), add keyword, and reach for semantic last because it adds an embedding dependency to the hot path. limit and always (never-trimmed core) are your cost levers; find_tools progressive disclosure is the escape valve for large registries.
  • Infrastructure. Vector index size and re-embedding cost, queue depth for embeddings and video polling, and unbounded growth of transcript and conversation-memory tables (database driver is the default trap — plan retention and archival).
  • Tenancy. Scope resolution runs on every data call; keep AIScopeResolver cheap and cached, and audit 'public' => true as a privileged annotation.

Failure modes to design for

  • Provider outage → failover succeeds but output quality shifts; the user gets an answer that is subtly worse with no signal.
  • Misconfigured scope → fail-closed refusal or empty result, which reads to users as "the assistant is broken."
  • Planner step exhaustion → tool_result_fallback surfaces the last successful tool result, which may be stale or partial.
  • Credit exhaustion mid-skill → InsufficientCreditsException interrupts a multi-turn flow with no documented resume path.
  • Confirmation flows inside delegated sub-agents — the docs state these are best kept as top-level skills, so a "confirm then write" UX inside a domain agent will not work as expected.
  • Documentation drift → engineers write calls against the SKILL.md that do not exist in src/. Enforce a review rule: any tool/skill PR cites the source class path.

Ramp-up

Steep: 3–4 weeks to productivity for a solid Laravel engineer, longer for the agent-design concepts (tools vs. skills vs. sub-agents, planner scoping, RAG retrieval quality, eval design). Mitigate by assigning one owner, starting from the supplied skill map plus docs/cookbook.mdx (source-grounded, unlike the skill summary), and using ai:make-tool / ai:make-skill / ai:make-agent scaffolding so nobody hand-writes registration. The two-person-week spike in the sequencing section is the real go/no-go: if a read-only tool plus one RAG query cannot be made reliable in that window, the capability breadth is not worth the ownership burden.

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.
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
jjsquady/round-robin