PHPackages                             lenorix/ai - 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. lenorix/ai

ActiveLibrary[API Development](/categories/api)

lenorix/ai
==========

PHP SDK for AI APIs

v0.1.15(1y ago)0177[3 PRs](https://github.com/lenorix/php-ai/pulls)2UnlicensePHPPHP ^8.2|^8.3|^8.4CI passing

Since May 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lenorix/php-ai)[ Packagist](https://packagist.org/packages/lenorix/ai)[ Docs](https://github.com/lenorix/php-ai)[ GitHub Sponsors](https://github.com/lenorix)[ RSS](/packages/lenorix-ai/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (22)Used By (2)

Lenorix AI SDK for PHP
======================

[](#lenorix-ai-sdk-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f4f45babc5554a7fcac2ce268acbbc01d9bba9abd2b1231a13c8a681f59927a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c656e6f7269782f61692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenorix/ai)[![Tests](https://camo.githubusercontent.com/b959381f5a5588995056e63b5092bb9e45133ade5c7fbd2d9019230765e44e7a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c656e6f7269782f61692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/lenorix/ai/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/6cca3d4f5822ba11a17edab3f8077cf4e7aee6c87afe0ce8f6fef93485a82424/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c656e6f7269782f61692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lenorix/ai)

TypeScript has Vercel AI SDK, Python has LangChain, and PHP has Lenorix AI SDK.

Support us
----------

[](#support-us)

We are crafting open-source software for everyone, releasing it under the [Unlicense](LICENSE.md)to let it in the public domain. If you find our work useful, consider supporting us.

Implementations
---------------

[](#implementations)

ServiceChatStreamingToolsVisionCachingPDFStructured OutputMCP ClientOpenAI✓✕✓✕✕✕✕✕DeepSeek✓✕✓✕✕✕✕✕Anthropic✕✕✕✕✕✕✕✕Groq✕✕✕✕✕✕✕✕Mistral✕✕✕✕✕✕✕✕xAI✕✕✕✕✕✕✕✕Google✕✕✕✕✕✕✕✕Installation
------------

[](#installation)

You can install the package via composer:

```
composer require lenorix/ai
```

Usage
-----

[](#usage)

```
use Lenorix\Ai\Provider\DeepSeek;
use Lenorix\Ai\AiText;
use Lenorix\Ai\Chat\ToolFromLambda;

AiText::generate(
    provider: new DeepSeek('deepseek-chat', 'sk-********************************'),
    tools: [
        // This is only an example, you can create your tool extending from CoreTool base class.
        new ToolFromLambda(
            fn ($city = 'madrid') => $city . ' is sunny',
            'weather',
            'get weather updated'
        ),
    ],
    system: 'help users to know the weather with updated information',
    prompt: 'tell me the weather',
    messages: [
        ['role' => 'user', 'content' => 'hello'],
        ['role' => 'assistant', 'content' => 'hi!']
    ],
    maxSteps: 50
);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Jesus Hernandez](https://github.com/jhg)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance68

Regular maintenance activity

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.6% 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 ~0 days

Total

16

Last Release

404d ago

PHP version history (2 changes)v0.1.0PHP ^8.3|^8.4

v0.1.2PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/180887752?v=4)[lenorix](/maintainers/lenorix)[@lenorix](https://github.com/lenorix)

---

Top Contributors

[![jhg](https://avatars.githubusercontent.com/u/1288711?v=4)](https://github.com/jhg "jhg (70 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

mcpaideepseeklenorix

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M737](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[keboola/storage-api-client

Keboola Storage API PHP Client

10405.9k40](/packages/keboola-storage-api-client)

PHPackages © 2026

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