PHPackages                             hristijans/spatie-agent-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. hristijans/spatie-agent-tools

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

hristijans/spatie-agent-tools
=============================

Laravel AI SDK agent tools for Spatie packages

1.1.1(3mo ago)40MITPHPPHP ^8.2

Since Apr 3Pushed 3mo agoCompare

[ Source](https://github.com/hristijans/spatie-agent-tools)[ Packagist](https://packagist.org/packages/hristijans/spatie-agent-tools)[ RSS](/packages/hristijans-spatie-agent-tools/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (19)Versions (5)Used By (0)

Spatie Agent Tools
==================

[](#spatie-agent-tools)

[![Latest Version on Packagist](https://camo.githubusercontent.com/16cd99cfc0c0b9f10d8aa7ac1b00a2eab2beb8839b5af59a1f8f488efe4a4249/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6872697374696a616e732f7370617469652d6167656e742d746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hristijans/spatie-agent-tools)

Laravel AI SDK agent tools for Spatie packages. Drop-in tools that give your AI agents the ability to query and interact with data managed by popular Spatie packages — no glue code required.

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

[](#requirements)

- PHP 8.2+
- Laravel 12+
- [Laravel AI SDK](https://laravel.com/docs/ai-sdk) (`laravel/ai`)

Each tool requires its corresponding Spatie package to be installed. See the individual tool documentation for specific package requirements.

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

[](#installation)

```
composer require hristijans/spatie-agent-tools
```

The package auto-discovers its service provider — no manual registration needed.

Available Tools
---------------

[](#available-tools)

ToolSpatie PackageDescription[`QueryActivityLogTool`](docs/activity-log.md)[`spatie/laravel-activitylog`](https://github.com/spatie/laravel-activitylog)Query and filter activity log entries[`QueryPermissionsTool`](docs/laravel-permission.md)[`spatie/laravel-permission`](https://github.com/spatie/laravel-permission)Query roles, permissions, and user access[`QueryMediaLibraryTool`](docs/laravel-medialibrary.md)[`spatie/laravel-medialibrary`](https://github.com/spatie/laravel-medialibrary)Query and filter media files[`QueryTagsTool`](docs/laravel-tags.md)[`spatie/laravel-tags`](https://github.com/spatie/laravel-tags)Query tags, tag types, and tagged models[`QueryTranslatableTool`](docs/laravel-translatable.md)[`spatie/laravel-translatable`](https://github.com/spatie/laravel-translatable)Query model translations across locales[`QuerySettingsTool`](docs/laravel-settings.md)[`spatie/laravel-settings`](https://github.com/spatie/laravel-settings)Query application settings groups and valuesQuick Start
-----------

[](#quick-start)

Register the tools you need on your Laravel AI SDK agent:

```
use Hristijans\SpatieAgentTools\Tools\QueryActivityLogTool;
use Hristijans\SpatieAgentTools\Tools\QueryMediaLibraryTool;
use Hristijans\SpatieAgentTools\Tools\QueryPermissionsTool;
use Hristijans\SpatieAgentTools\Tools\QuerySettingsTool;
use Hristijans\SpatieAgentTools\Tools\QueryTagsTool;
use Hristijans\SpatieAgentTools\Tools\QueryTranslatableTool;
use Laravel\Ai\Agents\Agent;
use Laravel\Ai\Contracts\HasTools;

class MyAgent implements Agent, HasTools
{
    public function tools(): iterable
    {
        return [
            new QueryActivityLogTool,
            new QueryPermissionsTool,
            new QueryMediaLibraryTool,
            new QueryTagsTool,
            new QueryTranslatableTool,
            new QuerySettingsTool,
        ];
    }
}
```

Your agent can now query activity logs, roles and permissions, media files, tags, translations, and application settings through natural language — no extra configuration required.

> **Tip:** You only need to register the tools for packages you have installed. If you only use `spatie/laravel-permission`, just register `QueryPermissionsTool`.

Documentation
-------------

[](#documentation)

Comprehensive documentation for each tool is available in the [`docs/`](docs/) directory:

- [Activity Log Tool](docs/activity-log.md) — Query and filter activity log entries by causer, subject, log name, description, and date range.
- [Laravel Permission Tool](docs/laravel-permission.md) — List roles and permissions, look up what a role can do, find which roles hold a permission, and audit a user's full access breakdown.
- [Media Library Tool](docs/laravel-medialibrary.md) — Query media files by model, collection, mime type, disk, file name, size, and upload date.
- [Tags Tool](docs/laravel-tags.md) — List and search tags, discover tag types, find tags on a model, and look up which models use a specific tag.
- [Translatable Tool](docs/laravel-translatable.md) — Get translations for a model, check which locales exist, find missing translations, and discover models with a specific locale.
- [Settings Tool](docs/laravel-settings.md) — List registered settings groups, read current values, inspect individual properties, and check locked status.

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

4

Last Release

92d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8149688?v=4)[Hristijan Stojanoski](/maintainers/hristijans)[@hristijans](https://github.com/hristijans)

---

Top Contributors

[![hristijans](https://avatars.githubusercontent.com/u/8149688?v=4)](https://github.com/hristijans "hristijans (11 commits)")

---

Tags

spatielaravelAgenttools

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/hristijans-spatie-agent-tools/health.svg)

```
[![Health](https://phpackages.com/badges/hristijans-spatie-agent-tools/health.svg)](https://phpackages.com/packages/hristijans-spatie-agent-tools)
```

###  Alternatives

[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43411.2k](/packages/venturedrake-laravel-crm)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[webcrafts-studio/lens-for-laravel

A local-first WCAG accessibility auditor for Laravel with axe-core, source mapping, CI workflows, and optional AI fixes.

402.6k](/packages/webcrafts-studio-lens-for-laravel)

PHPackages © 2026

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