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(11mo ago)0175[3 PRs](https://github.com/lenorix/php-ai/pulls)2UnlicensePHPPHP ^8.2|^8.3|^8.4CI passing

Since May 21Pushed 1mo 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 1mo ago

READMEChangelogDependencies (5)Versions (20)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

40

—

FairBetter than 88% of packages

Maintenance72

Regular maintenance activity

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

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

359d 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://www.gravatar.com/avatar/487ac224aa3cc183acf32af3eed52e49ca14a903e9ee676418195170b6beb920?d=identicon)[lenorix](/maintainers/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

[wordpress/mcp-adapter

Adapter for Abilities API, letting WordPress abilities to be used as MCP tools, resources or prompts

74855.8k1](/packages/wordpress-mcp-adapter)[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)[moe-mizrak/laravel-openrouter

Laravel package for OpenRouter (A unified interface for LLMs)

153107.2k2](/packages/moe-mizrak-laravel-openrouter)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

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