Download the PHP package claude-php/agent without Composer

On this page you can find all versions of the php package claude-php/agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package agent

Claude PHP Agent Framework

Tests Code Quality Security PHP Version License: MIT Latest Stable Version Total Downloads

A powerful PHP framework for building AI agents with Claude, featuring ReAct loops, tool orchestration, hierarchical agents, and advanced agentic patterns.

Features

Installation

Quick Start

Real-Time Streaming Flow Execution ๐ŸŒŠ

NEW! Stream agent execution with token-by-token LLM responses, progress tracking, and event broadcasting:

Features:

๐Ÿ“š Examples

Error Handling Service

Convert technical API errors into user-friendly messages. Inspired by Langflow's error handling approach:

Error Pattern Coverage:

Features:

๐Ÿ“š Examples

Template/Starter Project System

The framework includes a comprehensive template system with 22+ ready-to-use agent configurations:

Quick Start

Available Templates (22+)

Basic Agents (5): Basic Agent, ReAct, Chain-of-Thought, Reflex, Model-Based
Advanced Agents (5): Reflection, Plan-Execute, Tree-of-Thoughts, MAKER, Adaptive
Specialized (5): Hierarchical, Coordinator, Dialog, Intent Classifier, Monitoring
RAG & Knowledge (3): RAG Agent, Memory Chatbot, Knowledge Manager
Workflows (2): Sequential Tasks, Debate System
Production (2): Production Agent, Async Batch Processor

Features

๐Ÿ“š Creating Templates

Progress Updates (Legacy)

You can also receive progress events via onUpdate():

MCP Server Integration

The framework includes a full Model Context Protocol (MCP) server that exposes agent capabilities to MCP clients like Claude Desktop, IDEs, and other AI tools.

Quick Start

Features

Available Tools

Agent Discovery: search_agents, list_agent_types, get_agent_details, count_agents
Execution: run_agent, get_execution_status
Tool Management: list_tools, search_tools, get_tool_details
Visualization: visualize_workflow, get_agent_graph, export_agent_config
Configuration: update_agent_config, create_agent_instance, validate_agent_config

๐Ÿ“š Full MCP Documentation

Core Concepts

Loop Strategies

The framework provides multiple loop strategies for different types of tasks:

ReactLoop (Default)

The Reason-Act-Observe pattern for general-purpose tasks:

PlanExecuteLoop

Plan first, then execute systematically for complex multi-step tasks:

ReflectionLoop

Generate, reflect, and refine for high-quality outputs:

See the Loop Strategies Guide for detailed documentation.

Tools

Tools give Claude the ability to interact with the world:

Agent Patterns

Basic ReAct Agent

Hierarchical Agent (Master-Worker)

Reflection Agent

Memory & State

Production Features

MAKER Agent (Massively Decomposed Agentic Processes)

โšก NEW: Solve million-step tasks with near-zero error rates!

Key Features:

Paper Results: Successfully solved 20-disk Towers of Hanoi (1,048,575 moves) with ZERO errors!

See MakerAgent Documentation for detailed documentation.

Adaptive Agent Service

๐ŸŽฏ NEW: Intelligent agent selection with automatic validation and adaptation!

Key Features:

See docs/adaptive-agent-service.md for detailed documentation.

Agent Patterns Reference

Pattern Use Case Scalability Example
ReAct General-purpose autonomous tasks ~100 steps Research, calculations, data processing
Plan-Execute Complex multi-step tasks ~1K steps Project planning, workflows
Reflection Quality-critical outputs ~500 steps Code generation, writing
Hierarchical Multi-domain tasks ~5K steps Business analysis, reports
Chain-of-Thought Complex reasoning ~500 steps Math problems, logic puzzles
Tree-of-Thoughts Exploration tasks ~1K steps Creative writing, optimization
MAKER/MDAP Million-step tasks, zero errors Millions+ Long sequences, organization-level tasks
Monitoring System monitoring, anomaly detection Real-time Server metrics, performance tracking
Scheduler Task scheduling, cron jobs Continuous Automated workflows, batch processing
Alert Intelligent alerting, notifications Real-time System alerts, incident management
Reflex Rule-based responses Instant FAQs, simple automation
Model-Based State-aware decision making ~500 steps Planning, simulation
Utility-Based Optimization, trade-offs ~100 steps Resource allocation, decision support
Learning Adaptive behavior, feedback loops Continuous Personalization, strategy evolution
Collaboration Multi-agent coordination (AutoGen) ~5K steps Team workflows, complex research
TaskPrioritization Goal-driven task management (BabyAGI) ~1K steps Project breakdown, execution
Coordinator Agent orchestration, load balancing ~10K steps Distributed systems, agent networks
Dialog Conversational AI, context tracking Continuous Customer service, assistants
IntentClassifier Intent recognition, entity extraction Instant Command routing, NLU
EnvironmentSimulator What-if analysis, prediction ~100 steps Testing, planning
SolutionDiscriminator Solution evaluation, voting ~50 steps Quality assurance, selection
MemoryManager Knowledge management, retrieval Continuous Shared memory, context
AdaptiveAgentService Meta-agent selection & validation Varies Auto-optimization, quality assurance

Configuration

Streaming Flow Execution ๐ŸŒŠ

NEW! Real-time streaming flow execution with comprehensive event management, inspired by Langflow's architecture.

Features

Quick Example

SSE Streaming for Web Apps

JavaScript Client:

Multiple Listeners

Available Event Types

Flow Lifecycle: flow.started, flow.completed, flow.failed
Token Streaming: token.received, token.chunk
Iterations: iteration.started, iteration.completed, iteration.failed
Tools: tool.started, tool.completed, tool.failed
Progress: progress.update, step.started, step.completed
Errors: error, warning, info

Documentation

Architecture

The system adapts Python's async patterns to PHP:

Python (Langflow) PHP (claude-php-agent)
async/await Generator/yield
asyncio.Queue SplQueue
Async subscribers Iterator pattern
async for foreach with Generator

Async & Concurrent Execution

The framework leverages AMPHP for true asynchronous and concurrent execution:

Batch Processing

Process multiple agent tasks concurrently:

Parallel Tool Execution

Execute multiple tool calls simultaneously:

Promise-Based Workflows

Use promises for async operations:

See the examples directory for complete async/concurrent examples.

Output Parsers

Transform unstructured LLM responses into structured data:

Available Parsers:

See Parsers Documentation for complete guide.

Examples

See the examples directory for 110+ complete working examples including:

Core Examples (70+ files):

๐Ÿ†• Tutorial Examples (42 files in examples/tutorials/):

๐ŸŒŠ Streaming Flow Execution (4 examples in examples/Execution/):

๐Ÿ’ก All examples are fully runnable: php examples/Execution/basic-streaming.php

Documentation

๐ŸŽ“ Getting Started

New to AI agents? Start with our comprehensive tutorial series:

๐Ÿ†• New Features Tutorials (v0.7.0 - v0.9.0)

Master the latest framework capabilities:

๐Ÿ’ก 46 runnable examples included - Each feature comes with working code samples!

๐Ÿ“– Complete Documentation

Requirements

Installation

For detailed setup instructions, see QUICKSTART.md.

Contributing

We welcome contributions! Please see:

Support

License

MIT License - see LICENSE for details.

What's New

v1.3.0 (Latest)

v0.8.0

v0.7.0

See CHANGELOG.md for complete version history.

Acknowledgments

Built with โค๏ธ using Claude PHP SDK and inspired by the latest research in AI agents and LLM orchestration.


All versions of agent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
claude-php/claude-php-sdk Version ^0.5
psr/log Version ^3.0
php-mcp/server Version ^1.0
php-mcp/schema Version ^1.0
react/event-loop Version ^1.5
react/stream Version ^1.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package claude-php/agent contains the following files

Loading the files please wait ...