PHPackages                             fherryfherry/laravel-ai-agent-helper - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. fherryfherry/laravel-ai-agent-helper

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

fherryfherry/laravel-ai-agent-helper
====================================

Laravel AI Agent Helper for auto-login and metadata collection

v1.0.0(1mo ago)035MITBladePHP ^8.2

Since Apr 17Pushed 4d agoCompare

[ Source](https://github.com/fherryfherry/laravel-ai-agent-helper)[ Packagist](https://packagist.org/packages/fherryfherry/laravel-ai-agent-helper)[ RSS](/packages/fherryfherry-laravel-ai-agent-helper/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

Laravel AI Agent Helper
=======================

[](#laravel-ai-agent-helper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3d37400ec5395ccc09d844c6cb77a9277141d1f127ce3460fa31c5cf9a948505/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6668657272796668657272792f6c61726176656c2d61692d6167656e742d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fherryfherry/laravel-ai-agent-helper)[![Total Downloads](https://camo.githubusercontent.com/ae4955f6806d6a2fb62f5caa120182655118a619b0ea6cfe723e00ecf1b70b13/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6668657272796668657272792f6c61726176656c2d61692d6167656e742d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fherryfherry/laravel-ai-agent-helper)[![License](https://camo.githubusercontent.com/209c78b46a6ef3cd0d6d5c2102953f52578c7b1656a1c69511a6358288181007/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6668657272796668657272792f6c61726176656c2d61692d6167656e742d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fherryfherry/laravel-ai-agent-helper)

Laravel AI Agent Helper provides seamless integration for AI Agents to interact with your Laravel application. It includes features for secure auto-login and real-time metadata collection via iframe communication.

Features
--------

[](#features)

- **Secure Auto-Login**: Generate signed URLs for AI Agents to automatically log in to specific user accounts (local/dev environments only).
- **Metadata Reporting**: Automatically send application state (URL, Title, Route, Form Inputs, Sidebar Menus, etc.) to a parent window via `postMessage`.
- **Theme Support**: Detects and reports Dark/Light mode status.
- **Easy Integration**: Simple Blade directive to inject the helper script.

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

[](#installation)

You can install the package via composer:

```
composer require fherryfherry/laravel-ai-agent-helper
```

The package will automatically register its service provider.

Configuration
-------------

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --tag="ai-agent-helper-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Agent Login Token
    |--------------------------------------------------------------------------
    |
    | Secret token used to sign auto-login requests.
    |
    */
    'login_token' => env('AGENT_LOGIN_TOKEN', ''),

    /*
    |--------------------------------------------------------------------------
    | Allowed Environments
    |--------------------------------------------------------------------------
    |
    | Environments where the auto-login feature is allowed.
    |
    */
    'allowed_environments' => ['local', 'development'],

    /*
    |--------------------------------------------------------------------------
    | Default Target Path
    |--------------------------------------------------------------------------
    |
    | Default path to redirect after successful auto-login.
    |
    */
    'default_target_path' => '/admin/dashboard',
];
```

Usage
-----

[](#usage)

### 1. Metadata Collection Script

[](#1-metadata-collection-script)

To enable real-time metadata collection, include the following directive in your base layout file (e.g., `layout.blade.php`) before the closing `` tag:

```
@include('ai-agent-helper::metadata-script')
```

This script will collect information about the current page, forms, and navigation, then send it to the parent window (if the app is running inside an iframe).

### 2. Auto-Login Route

[](#2-auto-login-route)

The package automatically registers a route at `/agent/auto-login`.

To use this feature, ensure you have set `AGENT_LOGIN_TOKEN` in your `.env` file. The route requires a valid `signature` and `expires` timestamp generated using HMAC-SHA256 with your login token.

Example parameters for the auto-login URL:

- `signature`: HMAC-SHA256 of `target_path|expires`
- `expires`: Unix timestamp
- `target_path`: (Optional) The path to redirect after login

Security
--------

[](#security)

The auto-login feature is **strictly disabled** outside of the environments specified in `allowed_environments` (defaults to `local` and `development`).

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance95

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

53d ago

### Community

Maintainers

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

---

Top Contributors

[![ferdevelop15](https://avatars.githubusercontent.com/u/45650601?v=4)](https://github.com/ferdevelop15 "ferdevelop15 (2 commits)")

### Embed Badge

![Health badge](/badges/fherryfherry-laravel-ai-agent-helper/health.svg)

```
[![Health](https://phpackages.com/badges/fherryfherry-laravel-ai-agent-helper/health.svg)](https://phpackages.com/packages/fherryfherry-laravel-ai-agent-helper)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5742.2M16](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

9327.9M1.2k](/packages/illuminate-auth)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6753.6k5](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1432.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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