PHPackages                             fuzzy-ai/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fuzzy-ai/sdk

ActiveLibrary[API Development](/categories/api)

fuzzy-ai/sdk
============

Fuzzy.ai PHP Library

v0.3.1(9y ago)551Apache-2.0PHPPHP &gt;=5.3.3

Since Nov 18Pushed 9y ago4 watchersCompare

[ Source](https://github.com/fuzzy-ai/fuzzy.ai-php)[ Packagist](https://packagist.org/packages/fuzzy-ai/sdk)[ Docs](https://fuzzy.ai)[ RSS](/packages/fuzzy-ai-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Fuzzy.ai PHP SDK
================

[](#fuzzyai-php-sdk)

[![Build Status](https://camo.githubusercontent.com/2a501accb5fadbee12915138810c3d16da0ea78f1718147d1ce25acd93ff3696/68747470733a2f2f7472617669732d63692e6f72672f66757a7a792d61692f66757a7a792e61692d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fuzzy-ai/fuzzy.ai-php)[![Latest Stable Version](https://camo.githubusercontent.com/09707dd1a783d4ab690f76d63e54a652a8b1ecd4a262a712b928ff0c01f767da/68747470733a2f2f706f7365722e707567782e6f72672f66757a7a792d61692f73646b2f762f737461626c652e737667)](https://packagist.org/packages/fuzzy-ai/sdk)[![Total Downloads](https://camo.githubusercontent.com/67daafd959c00bd03d281e753c492193e7ec173a734434dc4810aef800ead55b/68747470733a2f2f706f7365722e707567782e6f72672f66757a7a792d61692f73646b2f646f776e6c6f6164732e737667)](https://packagist.org/packages/fuzzy-ai/sdk)[![License](https://camo.githubusercontent.com/762716cdb017d6c4b05d411423e9c2330398744f5e5b798953a6e0c55dc21385/68747470733a2f2f706f7365722e707567782e6f72672f66757a7a792d61692f73646b2f6c6963656e73652e737667)](https://packagist.org/packages/fuzzy-ai/sdk)

PHP library for accessing the fuzzy.ai API.

Requirements
------------

[](#requirements)

PHP 5.3.3 or later with the cURL extension.

Installation
------------

[](#installation)

You can install the library via [Composer](http://getcomposer.org/):

```
composer require fuzzy-ai/sdk

```

To load the library, use Composer's autoload:

```
require_once('vendor/autoload.php');
```

Usage
-----

[](#usage)

All API calls require an API key from

```
$client = new FuzzyAi\Client('YourAPIKey');

list($result, $evalID) = $client->evaluate('YourAgentID', array('input1' => 42));
```

Client
------

[](#client)

This is the main class and serves as an entry point to the API.

- **FuzzyAi\\Client($key, $root)** Constructor that takes the following arguments and returns a new Client object.
    - `key`: Your Fuzzy.ai API key
    - `root` (optional): The API endpoint (defaults to )
- **evaluate($agentId, $inputs)** The main method to use, it performs a single inference. Returns an array of outputs and an evaluation ID (for training feedback, see below).
    - `agentId`: The ID of the Agent to perform the evaluation against
    - `inputs`: An associative array of input name =&gt; values.
- **feedback($evaluationId, $performance)** This is the method used for training better results. Returns a feedback object.
    - `evaluationId`: Unique identifier returned from an evaluate() call.
    - `performance`: The performance metrics (as an associative array) to provide the learning.
- **newAgent($props)** Use this method to create a new Agent. Returns an Agent object.
    - `props`: An associative array representing an agent with at least `inputs`, `outputs`, and `rules`.
- **getAgent($agentId)** This will fetch an existing agent definition. Returns an Agent object.
    - `agentId` : ID of the agent to retrieve

Agent
-----

[](#agent)

This class represents an Agent and provides full CRUD features.

- **FuzzyAi\\Agent($client)** Constructor - takes an HTTP Client object, but it's easier to use either `newAgent` or `getAgent` from above to create the Agent object.
- **evaluate($inputs)** Like Client::evaluate, but on an existing Agent instance. ***NOTE*** Returns an Evaluation object.
    - `inputs`: An associative array of input name =&gt; values.
- **create($props)** Creates a new agent (although Client::newAgent is likely easier).
    - `props`: An associative array representing an agent with at least `inputs`, `outputs`, and `rules`.
- **read($props)** Reads an agent definition from the API. Probably easier to use Client::getAgent().
    - `id` : Agent ID to read.
- **update($props)** Updates the current agent instance with $props.
    - `props`: New agent properties.
- **delete()** Deletes current agent from the API.

Evaluation
----------

[](#evaluation)

This class represents a single evaluation.

- **read($id)** Load a single evaluation object by ID.
- **feedback($values)** Provide learning feedback data to a single evaluation . Returns a Feedback object.
    - `values`: the performance metrics to provide for feedback.

Examples
--------

[](#examples)

The `examples/` directory has some examples of using the library.

Development
-----------

[](#development)

Install dependencies:

```
composer install

```

Run the tests:

```
./vendor/bin/phpunit

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~91 days

Total

3

Last Release

3329d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15350?v=4)[James Walker](/maintainers/walkah)[@walkah](https://github.com/walkah)

---

Top Contributors

[![walkah](https://avatars.githubusercontent.com/u/15350?v=4)](https://github.com/walkah "walkah (17 commits)")

---

Tags

apiaifuzzy

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/fuzzy-ai-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/fuzzy-ai-sdk/health.svg)](https://phpackages.com/packages/fuzzy-ai-sdk)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

46784.5k5](/packages/deepseek-php-deepseek-php-client)[mozex/anthropic-php

PHP client for the Anthropic API: messages, streaming, tool use, thinking, web search, code execution, batches, and more.

47480.9k16](/packages/mozex-anthropic-php)[hosseinhezami/laravel-gemini

A production-ready Laravel package to integrate with the Google Gemini API. Supports text, image, video, audio, long-context, structured output, files, caching, function-calling and understanding capabilities.

13913.3k1](/packages/hosseinhezami-laravel-gemini)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5219.2k](/packages/claude-php-claude-php-sdk-laravel)[nlpcloud/nlpcloud-client

NLP Cloud serves high performance pre-trained or custom models for NER, sentiment-analysis, classification, summarization, paraphrasing, grammar and spelling correction, keywords and keyphrases extraction, chatbot, product description and ad generation, intent classification, text generation, image generation, code generation, question answering, automatic speech recognition, machine translation, language detection, semantic search, semantic similarity, tokenization, POS tagging, speech synthesis, embeddings, and dependency parsing. It is ready for production, served through a REST API. This is the PHP client for the API. More details here: https://nlpcloud.com. Documentation: https://docs.nlpcloud.com. Github: https://github.com/nlpcloud/nlpcloud-php

2425.5k1](/packages/nlpcloud-nlpcloud-client)[erdum/php-open-ai-assistant-sdk

A PHP class for seamless interaction with the OpenAI Assistant API, enabling developers build powerful AI assistants capable of performing a variety of tasks.

203.3k](/packages/erdum-php-open-ai-assistant-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
