Hacker News 社区展示了名为 phpClaw 的开源项目,这是一款专为 PHP 语言设计的 AI Agent 运行时 1。该项目的核心目标在于简化将人工智能能力集成到现有 PHP 应用程序中的流程,其架构基于 ReAct 循环(推理、行动、观察、重复)模式运行 1。
在功能特性方面,phpClaw 内置了工具调用、记忆管理以及安全守卫机制 1。该项目默认启用了八个安全守卫功能,涵盖提示词注入防护、个人身份信息(PII)处理及代码注入防御等关键领域 1。此外,它支持包括 Anthropic、OpenAI、Groq、Gemini、Mistral、DeepSeek 和 Ollama 在内的多种大语言模型提供商 1。
为了适应不同的开发环境,phpClaw 并不依赖特定的框架,而是提供了针对 Laravel、Symfony、WordPress 等主流框架和内容管理系统(CMS)的八个适配器 1。在协议支持上,项目包含 MCP 服务器,能够将工具暴露给 Claude Desktop 或 Cursor 等客户端使用 1。目前,phpClaw 要求运行环境为 PHP 8.1、8.2、8.3 或 8.4 版本,并采用 MIT 许可证发布 1。
The open-source project phpClaw, an AI agent runtime designed specifically for PHP, was showcased on the Hacker News community under the "Show HN" banner 1. The tool aims to simplify the integration of artificial intelligence capabilities into existing PHP applications by providing built-in mechanisms for tools, memory management, and security guards 1. Written in MIT-licensed code, phpClaw operates independently of specific frameworks while also offering eight adapters for popular ecosystems such as Laravel, Symfony, and WordPress 1. It requires PHP versions 8.1 through 8.4 to run 1.
At its core, phpClaw utilizes a ReAct loop architecture that follows a cycle of reasoning, acting, observing, and repeating 1. The runtime supports connections to multiple large language model providers, including Anthropic, OpenAI, Groq, Gemini, Mistral, DeepSeek, and Ollama 1. Security is emphasized with eight default guards enabled to protect against threats such as prompt injection, PII leakage, and code injection 1. Additionally, the system includes an MCP server that allows external clients like Claude Desktop and Cursor to access its exposed tools 1.
评论
还没有评论,欢迎留下第一条。