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(8y ago)551Apache-2.0PHPPHP &gt;=5.3.3

Since Nov 18Pushed 8y 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 2mo 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 37% 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

3280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7428a6d360240d2dbfa53479b39d09c88ac6fdac7d10be8c2e88a9effe3e49df?d=identicon)[walkah](/maintainers/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.

47073.9k5](/packages/deepseek-php-deepseek-php-client)

PHPackages © 2026

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