PHPackages                             tactical/laravel-open-ai-tools - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tactical/laravel-open-ai-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tactical/laravel-open-ai-tools
==============================

10PHP

Since Jun 6Pushed 11mo agoCompare

[ Source](https://github.com/tacticalsoftware/laravel-open-ai-tools)[ Packagist](https://packagist.org/packages/tactical/laravel-open-ai-tools)[ RSS](/packages/tactical-laravel-open-ai-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Open AI Tools
=====================

[](#laravel-open-ai-tools)

This is a small collection of tools we've used to build complex Open AI based applications. It may expand as we find more things the excellent underlying libraries don;t make easy enough out the box.

```
composer require tactical/laravel-open-ai-tools
```

At its core, the heavy lifting is done with invocable actions:

- `Tactical\OpenAiTools\Actions\Assistants\EnsureAssistantAction`
- `Tactical\OpenAiTools\Actions\Assistants\StreamAssistantResponseAction`
- `Tactical\OpenAiTools\Actions\Assistants\UpdateAssistantAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\DeleteUnlinkedFilesAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\DeleteVectorStoreAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\EmptyVectorStoreAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\EnsureVectorStoreAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\RenameVectorStoreAction`
- `Tactical\OpenAiTools\Actions\KnowledgeBase\UploadFilesAction`

These operate on a polymorphic relationship, which you can attach to any of your models:

```
class Project extends Model implements HasAssistant
{
    use HasAssistantConcern;

    // ...other nonsense
}
```

If a model has `HasAssistant` and `HasAssistantConcern`, then you can access a couple useful fields:

```
$project->assistant()->create();
$project->assistant->open_ai_assistant_id; // → null|string
$project->assistant->open_ai_vector_store_id; // → null|string
```

The actions use this relationship to store Open AI identifiers without polluting your models. You don't actually need to create the assistant yourself. Each action calls `EnsureVectorStoreAction` under the hood, which creates any missing assistant models.

You can reference these actions directly:

```
/** @var RenameVectorStoreAction $action */
$action = app(RenameVectorStoreAction::class);
$action($project, 'new project name');
```

Many assistant operations happen at the same time. For example, your application might require a complex knowledge base change:

1. creating a vector store if it's missing
2. saving the vector store ID to the database if just created
3. emptying the existing vector store of uploaded files
4. uploading a completely new set of files

This can lead to a mountain of boilerplate, and you might miss edge cases. We've made it easy to chain actions:

```
/** @var OpenAiToolsService $service */
$service = app(OpenAiToolsService::class);

$service
    ->with($project)
    ->action(ActionsEnum::EmptyVectorStore)
    ->action(ActionsEnum::UploadFiles, $files);
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/00089084814b5b79cd35b9f501bcc48d74c5afb2cb4703562a82e081f31c843c?d=identicon)[assertchris](/maintainers/assertchris)

![](https://www.gravatar.com/avatar/efb5affa53b5e0bcde6d468a9dc7f81cd2a69e7a62120d27aa8f5cf57046c011?d=identicon)[jasonadriaan](/maintainers/jasonadriaan)

---

Top Contributors

[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (6 commits)")

### Embed Badge

![Health badge](/badges/tactical-laravel-open-ai-tools/health.svg)

```
[![Health](https://phpackages.com/badges/tactical-laravel-open-ai-tools/health.svg)](https://phpackages.com/packages/tactical-laravel-open-ai-tools)
```

###  Alternatives

[symfony/emoji

Provides access to emoji characters and sequences from the Unicode CLDR

13847.1k9](/packages/symfony-emoji)[cornford/googlitics

An easy way to integrate Google Analytics with Laravel.

3310.2k](/packages/cornford-googlitics)

PHPackages © 2026

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