Capabilities

Everything you need to ship an agent.

phpClaw is not a thin LLM wrapper. It is a complete agent engine: tool-calling, memory, security, streaming, and framework integration, all in one self-hosted package. Here is exactly what it does.

ReAct loop

A real agent, not a wrapper

phpClaw runs a reason-act-observe loop: the model decides a step, calls a tool, reads the actual result, and continues until the task is done. You get answers grounded in your real data, not guesses.

7 built-in tools

Tools that touch your system

Shell (allowlisted), HTTP, FileRead, FileWrite, FileEdit, CodeSearch, and ProjectInfo ship in the core and register automatically. DatabaseQuery (read-only SQL) and ZipPackager are opt-in. Add your own by implementing one interface. Framework adapters register extra native tools on top.

8 providers

Any LLM, one API key

Anthropic, OpenAI, Groq, Gemini, Mistral, DeepSeek, and local Ollama are first-class, plus a Custom option for any OpenAI-compatible endpoint. Set one key; switch providers without changing application code.

8 guards

Security before the model

Eight guards run by default: prompt injection, code injection, destructive SQL, role-switching, homoglyph, unicode, message-length, and PII detection. A rate-limit guard is available opt-in. Unsafe input is blocked before it ever reaches the LLM.

Persistent memory

Context that survives

Pluggable memory drivers (file, array, Redis, namespace router, and framework-native stores) keep conversation history and state. Multi-turn conversations remember what came before.

MCP built in

Speak the agent protocol

Expose any phpClaw app as a Model Context Protocol server, over stdio or Streamable HTTP, so Claude Code, Cursor, or Claude Desktop can call your tools directly.

Streaming

Token-by-token responses

Stream output as it is generated for responsive chat interfaces, or collect the full response with per-run metrics: provider, model, iterations, duration, and token counts.

8 adapters

Native to your framework

Laravel, Symfony, WordPress, Drupal, Joomla, PrestaShop, OpenCart, and Magento each get an adapter that feels built-in: native CLI commands, the framework database layer for memory, and idiomatic config.

40 events

Observable by design

Forty lifecycle events fire across the agent, tools, providers, memory, conversations, and guards, so you can hook logging, metrics, or custom behavior into every step of a run.

In practice

From a question to a real answer.

Ask "how many orders came in today?" and the agent reasons about your request, runs a safe read-only query with the Database tool, reads the real result, and replies in plain language. No prompt engineering, no training data, no separate service. Just your app, your data, and one API key.

See it running in minutes.

MIT licensed. Runs locally with Ollama at zero cost.