phpClaw

Open-source AI agent framework for PHP with tools, memory and guards

Visit website →

About

phpClaw is an AI agent framework for PHP. It provides a ready-made ReAct loop with tools, swappable memory and security guards — eight security guards are enabled by default covering prompt injection, PII leaks, code injection and more. It works with any LLM provider: Anthropic, OpenAI, Groq, Gemini, Mistral, DeepSeek and Ollama.

The framework supports eight platforms and CMSs: Laravel, Symfony, WordPress, Drupal, Magento, Joomla, OpenCart and PrestaShop. Each adapter wires phpClaw into the platform native tools: Eloquent for Laravel, Doctrine for Symfony, WP-CLI for WordPress. There is also an MCP server that lets Claude Desktop and Cursor call your tools directly.

The project is open-source under the MIT license. The core has zero framework dependencies — just ext-curl, ext-json and ext-mbstring. Agents install via Composer in seconds.

AI-assisted draft, human-reviewed before publishing — see how we choose & review tools.

Why we picked it

PHP powers over 70 percent of the web but AI agents in PHP were hand-rolled. phpClaw gives PHP what LangChain gave Python: a complete agent loop with real security. WordPress and Magento support means immediate practical applications.