Download the PHP package phpclaw/phpclaw-laravel without Composer
On this page you can find all versions of the php package phpclaw/phpclaw-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package phpclaw-laravel
This is a read-only mirror, auto-published from
phpclaw-monorepo. Please open issues and pull requests there, not here.
Give your Laravel app an agent, not a chatbot.
An agent engine with tools, guards and memory, native to Artisan, DI and queues. Laravel 10 to 13, PHP 8.1+.
Most "AI in Laravel" setups mean gluing an HTTP client to your app and hoping the prompt holds up. phpClaw is a real dependency: autowired via the container, driven by Artisan, backed by your database, with tools that actually query your application instead of guessing.
Ask it something and it picks a tool, runs it against your live app, and answers with real data. No fine-tuning, no separate service to run.
Just ask
CLI
The agent from your terminal, scriptable and CI-friendly:
phpclaw:chat opens an interactive session with slash commands; --conv-id, --continue and --trace are in the
Laravel guide.
Programmatic use
Autowired via the container. Inject ClawInterface anywhere:
REST API
Enabled by default (phpclaw.api.enabled, from PHPCLAW_API_ENABLED, which defaults to true); set it to false to close both routes. Two routes, under a configurable prefix (default /phpclaw):
Both require an authenticated user: every conversation is stored against auth()->id(), and a
caller only ever reaches their own conversations. Point phpclaw.api.middleware at the guard your
app authenticates API callers with. Two things grant cross-user access, and both are off by
default: the phpclaw.manage-all Gate ability, which denies unless your app defines it, and the
PHPCLAW_ADMIN_IDS env list, whose user IDs bypass the Gate entirely. The API also needs a memory
driver that keeps conversations per user (database, the default); with any other driver both
routes answer 503.
Pause for approval and finish later
Off by default. Set PHPCLAW_DURABLE_RUNS=true (needs PHPCLAW_STORE_MESSAGES on) and every chat run is
saved after each step. A tool that changes data then pauses the run instead of being refused: send
answers 202 with the run id and the paused call, and the stream sends an approval_required event.
A run that uses up PHPCLAW_DURABLE_STEP_BUDGET steps or PHPCLAW_DURABLE_DEADLINE_SECONDS seconds
answers 202 with status suspended (stream event run_suspended) and is finished later.
Only the user who started the run's conversation, or a manage-all user, may decide it. The finished
answer is added to that conversation. From the shell, php artisan phpclaw:runs list|approve|deny|resume|resume-due
does the same as the run's owner, and the scheduler runs phpclaw:runs resume-due every minute, so add
Laravel's schedule:run to cron. An interactive php artisan phpclaw keeps its Y/n prompt.
Installation
Set one provider key in .env (e.g. ANTHROPIC_API_KEY=sk-ant-…), then run your first agent:
Full setup, configuration, and provider options are documented at phpclaw.ai/docs/adapters/laravel.
Key features
✅ Native Artisan CLI: phpclaw, phpclaw:mcp-server, phpclaw:about, phpclaw:guide, phpclaw:stats, phpclaw:jobs:list, phpclaw:jobs:status, phpclaw:runs
✅ Database-backed memory: conversation + key-value drivers via the query builder, plus a cache-store driver
✅ 6 Laravel-native tools: database (read-only SELECT), log tail, route list, config read, cache inspect, queue status. Opt-in: list their classes in config('phpclaw.tools'), the same way as shell, HTTP, file write and file edit
✅ Telescope integration: every agent run, model call with its token counts, tool call, and guard block recorded on Telescope's Events tab for local debugging, while the raw phpclaw.* events, which carry message text, are kept out of Telescope (auto-detected, off if Telescope isn't installed)
✅ REST API: on by default behind your API middleware, two endpoints: send and chat/stream. Set PHPCLAW_API_ENABLED=false to close them
✅ Multiple AI providers: Anthropic, OpenAI, Groq, Gemini, Mistral, DeepSeek, Ollama, and any custom OpenAI-compatible endpoint
✅ Conversation memory: context carries across a session by default
How it fits together
Documentation
This README gets you installed. Everything else (configuration, providers, memory, skills, Cloud, the full tool reference, REST API, CLI, code examples, upgrading, troubleshooting) lives at:
phpclaw.ai/docs/adapters/laravel
Contributing
Contributions are welcome. See the contributing guide.
Security
Please review our security policy for reporting vulnerabilities.
License
MIT. See phpClaw project.
Laravel is a trademark of Laravel Holdings Inc. phpClaw is an independent open-source project and is not affiliated with or endorsed by Laravel Holdings Inc.
All versions of phpclaw-laravel with dependencies
phpclaw/phpclaw Version ^0.1
phpclaw/phpclaw-cloud Version ^0.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/bus Version ^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^10.0|^11.0|^12.0|^13.0
laravel/prompts Version ^0.1.9|^0.2|^0.3
phpclaw/phpclaw-mcp Version ^0.1