Tools, memory, security, and a ReAct loop, already built. Zero framework dependencies in core. Any LLM provider.
Documentation · Adapters · Why phpClaw · Install · MCP · Security
composer require phpclaw/phpclaw
export ANTHROPIC_API_KEY="sk-ant-..."
$agent = PhpClaw\Claw::builder()->build();
echo $agent->send('What can you help me with?')->text;
One env var, one builder, one send()
. The builder checks ANTHROPIC_API_KEY
, then OPENAI_API_KEY
, GROQ_API_KEY
, GEMINI_API_KEY
, MISTRAL_API_KEY
, DEEPSEEK_API_KEY
, OLLAMA_HOST
, in that order, and uses whichever it finds first. No YAML, no agent framework to learn, no vendor lock-in.
An agent without tools can only talk. Register the ones your application needs and it starts doing real work:
use PhpClaw\Claw;
use PhpClaw\Tools\ShellTool;
use PhpClaw\Tools\HttpTool;
use PhpClaw\Tools\FileReadTool;
use PhpClaw\Tools\DatabaseQueryTool;
use PhpClaw\Tools\CodeSearchTool;
$agent = Claw::builder()
->tools([
new ShellTool(allowlist: ['ls', 'df', 'tail']),
new HttpTool(),
new FileReadTool(),
new DatabaseQueryTool($pdo),
new CodeSearchTool(),
])
->build();
> Check disk usage and tail the last 20 lines of the error log
> Is api.example.com responding right now?
> Run a read-only SELECT to count today's orders
> Find every place UserService is used in this codebase
The agent…