Download the PHP package lvlup-dev/laravel-agent-editable-prompts without Composer

On this page you can find all versions of the php package lvlup-dev/laravel-agent-editable-prompts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-agent-editable-prompts

Laravel Agent Editable Prompts

Latest Version on Packagist

Store LLM / agent prompts in the database, group them by agent_slug, order them with priority, and resolve them at runtime as ordered segments or a single concatenated string. Optionally register an Inertia + Vue CRUD so non-developers can edit prompts without deploys.

Requires inertiajs/inertia-laravel (and a Vue/React frontend) if you use the bundled admin UI.

Quick example

Installation

1. Composer

Laravel auto-discovers AgentEditablePromptsServiceProvider (see composer.json → extra.laravel.providers).

2. Migrations

The package loads its migration automatically. Create the table:

Default table name: agent_editable_prompts. Override with AGENT_EDITABLE_PROMPTS_TABLE (see below) if needed.

3. Configuration (recommended)

Publish the config file so you can tune behaviour and .env overrides in one place:

This copies config/agent-editable-prompts.php into your application. Until you publish, merged defaults from the package still apply.

4. Inertia / Vue pages (if you use the bundled CRUD)

The HTTP controllers render Inertia pages under *`Vendor/AgentPrompts/**. Those components **must exist** in your app (Vite only bundles yourresources/js` tree).

Publish the starter pages:

Then adapt them to your layout (e.g. wrap with your admin shell), run your frontend build, and ensure Wayfinder or your route helpers know the package routes if you link from the sidebar.

If you do not want the package routes at all, set AGENT_EDITABLE_PROMPTS_REGISTER_ROUTES=false and build your own controllers/UI while still using AgentPrompt + AgentPromptService.

5. Environment variables

All keys are optional; defaults match config/agent-editable-prompts.php.

Variable Default (if unset) Role
AGENT_EDITABLE_PROMPTS_TABLE agent_editable_prompts Database table name.
AGENT_EDITABLE_PROMPTS_SEPARATOR \n\n Separator used by AgentPromptService::resolve().
AGENT_EDITABLE_PROMPTS_PRIORITY_SORT asc asc or desc — order of priority when resolving.
AGENT_EDITABLE_PROMPTS_REGISTER_ROUTES true Set to false to disable the Inertia CRUD routes entirely.
AGENT_EDITABLE_PROMPTS_MIDDLEWARE web Comma-separated middleware list for the CRUD routes. Include web when using Inertia (session, cookies, CSRF). Example: web,auth or web,auth,admin.
AGENT_EDITABLE_PROMPTS_ROUTE_PREFIX (empty) URL prefix (no leading slash required; it is trimmed). Example: admin → /admin/agent-editable-prompts.
AGENT_EDITABLE_PROMPTS_ROUTE_NAME_PREFIX (empty) Prepended to route names. Example: admin. → admin.agent-editable-prompts.index.

Important: routes registered by the package are not defined in your routes/web.php; they only receive the middleware you list in AGENT_EDITABLE_PROMPTS_MIDDLEWARE. For a typical Inertia app, use at least web,auth (and your admin gate if you have one).

Usage

Model

LvlupDev\AgentEditablePrompts\Models\AgentPrompt uses the configured table and fillable fields:

Service

AgentPromptService is registered as a singleton:

HTTP routes (when enabled)

Resource basename: agent-editable-prompts.
Route parameter name: agent_prompt.

Default route names (no AGENT_EDITABLE_PROMPTS_ROUTE_NAME_PREFIX):

AgentPromptService::routeName('index') respects the configured name prefix.

Scope and alternatives

This package is intentionally focused: one table, slug + priority, optional generic CRUD. It does not ship authorization policies, prompt versioning, A/B testing, or provider-specific prompt formats.

For richer CMS-style content or team workflows, consider integrating a headless CMS, a dedicated prompts product, or your own tables and UI on top of the same ideas.

Credits

laravel-agent-editable-prompts is built and maintained by LVLUP. We help businesses drive operational efficiency through strategic consulting, tailored software development, and advanced AI agent integrations.

License

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


All versions of laravel-agent-editable-prompts with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
inertiajs/inertia-laravel Version ^1.0|^2.0|^3.0
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lvlup-dev/laravel-agent-editable-prompts contains the following files

Loading the files please wait ...