Download the PHP package carmelosantana/php-agents without Composer

On this page you can find all versions of the php package carmelosantana/php-agents. 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 php-agents

php-agents

CI status GitHub release PHP 8.4+ Discord

PHP 8.4+ framework for building AI agents with tool-use loops, provider abstraction, and composable toolkits.

Build agents that reason, use tools, and iterate autonomously — powered by any OpenAI-compatible API, Anthropic, local models via Ollama, or a native llama.cpp runtime. You provide the toolkits; php-agents provides a non-opinionated agent loop.

Features

Provider Feature Matrix

Feature OpenAI Compatible OpenAI Responses Ollama Anthropic Gemini xAI Mistral
chat()
stream()
structured()
Tool calling
Streaming + tool calls
Image input (base64)
Image input (URL) *
models() list
isAvailable()

* Gemini does not natively support URL image references. The provider auto-downloads URL images and converts them to base64 inlineData.

Requirements

Installation

Local Inference Modes

Fastest path to validate native llama.cpp in this repo:

The setup script writes a local .llama-cpp.env file for your machine. That file is generated runtime state and should not be committed.

Quick Start

Create an agent with a custom tool:

Make sure Ollama is running: ollama serve and a model is pulled: ollama pull llama3.2

Providers

Creating Custom Agents

Extend AbstractAgent and implement instructions():

Register toolkits in the constructor with $this->addToolkit() to give your agent capabilities.

Creating Custom Tools

Define tools with typed parameters and a callback:

Group related tools into a toolkit by implementing ToolkitInterface:

Toolkit Auto-Discovery

Publish your toolkit as a Composer package with auto-discovery:

Documentation

Guide Description
Architecture System design, Mermaid diagrams, extension points
Getting Started Installation, provider setup, first agent
Local Runtime Native llama.cpp setup, testing, benchmarking, comparison
Providers Feature matrix, streaming, structured output, images
Tools & Toolkits Parameter types, execution policies, publishing packages
Agents Agent loop, observers, cancellation, context window
Embeddings & Vector Stores Vector similarity search, embedding providers

Examples

Working examples live in the examples/ directory:

Example Description Run
CLI Chat Interactive terminal conversation with an LLM php examples/cli-chat.php
README Summarizer Web UI that auto-summarizes this README using an agent php -S localhost:8080 -t examples/web-summarizer/

php-agents In The Wild

Coqui
Your personal AI companion with a soul. Long-term memory, reflective personalities, and tools for consciousness research. Because agents deserve identity, continuity, and a good REPL.
LLM Benchy
Put your models to the test. Benchmarks tool use, creativity, code quality, and shell execution with live browser traces and a strict 100-point grading system. Local-first, reproducible, inspectable.
php-plays
AI attempts to teach itself to play fumble through Super Mario World. Reads game RAM, reasons over strategy files, and mashes buttons at ~60fps. Turns out agents are pretty good at playing games.

Building with php-agents? Lets us know on Discord or open a PR to add your project to the list!

License

MIT


All versions of php-agents with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
symfony/http-client Version ^7.0 || ^8.0
psr/log Version ^3.0
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 carmelosantana/php-agents contains the following files

Loading the files please wait ...