PHPackages                             brdv/forerunner - 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. brdv/forerunner

ActiveLibrary[API Development](/categories/api)

brdv/forerunner
===============

A Laravel package that provides an elegant, migration-inspired API for defining JSON schemas that ensure your LLM responses are perfectly structured every time.

v0.3.0(3mo ago)0382↓24.7%MITPHPPHP ^8.3CI passing

Since Nov 28Pushed 3mo agoCompare

[ Source](https://github.com/brdv/forerunner)[ Packagist](https://packagist.org/packages/brdv/forerunner)[ RSS](/packages/brdv-forerunner/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

 [![Forerunner Logo](assets/icon.png)](assets/icon.png)

 [![Tests](https://camo.githubusercontent.com/4bb361fc2d0aa590765ea5301688a9c7e9f43d78930c0a254642e75dcd7dbd8f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f627264762f666f726572756e6e65722f6d61696e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/brdv/forerunner/actions?query=workflow%3Amain+branch%3Amain) [![Total Downloads](https://camo.githubusercontent.com/13dedf2595665f1f6a2163ca0fb9a02c54e27983884f4c31e3646b3e2c5da8c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f627264762f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brdv/forerunner) [![Latest Version on Packagist](https://camo.githubusercontent.com/07e25dc240eb619a6f42814122e2c8444747cbc1944df83ea6e1587f6f1502a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627264762f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brdv/forerunner) [![License](https://camo.githubusercontent.com/6bfaa1e57cf1d297735423a6db4d18f70c3d9a9ece07df8851fd768c803eff47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f627264762f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brdv/forerunner)

Forerunner - Build structured LLM outputs the Laravel way
=========================================================

[](#forerunner---build-structured-llm-outputs-the-laravel-way)

A Laravel package that provides an elegant, migration-inspired API for defining JSON schemas that ensure your LLM responses are perfectly structured every time.

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

[](#installation)

You can install the package via composer:

```
composer require brdv/forerunner
```

> **Note**: This is a pre-release version (0.x). The API may change as we gather feedback and iterate towards 1.0.0.

The package will automatically register its service provider.

### Upgrading from 0.1.x

[](#upgrading-from-01x)

If you're upgrading from version 0.1.x, please note there are breaking changes. See the [v0.2.0 release notes](https://github.com/Blaspsoft/forerunner/releases/tag/v0.2.0) for a complete migration guide.

Quick Start
-----------

[](#quick-start)

### Using the Artisan Command

[](#using-the-artisan-command)

Generate a new structure class:

```
php artisan make:struct UserProfile
```

This creates a structure class at `app/Structures/UserProfile.php`:

```
