Download the PHP package ronu/laravel-agent-protocol without Composer

On this page you can find all versions of the php package ronu/laravel-agent-protocol. 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-protocol

Ronu Laravel Agent Protocol

Agent Discovery Protocol metadata, safety contracts and AI-ready API discovery for Laravel.

Packagist Version PHP 8.3 Laravel 11 or 12 ADP MCP ready n8n ready


What is this package?

ronu/laravel-agent-protocol publishes a Laravel API as a structured Agent Discovery Protocol (ADP) metadata graph for LLM agents, MCP adapters, n8n workflows, SDK generators and documentation tooling.

The package is intentionally metadata-only:

The backend remains the source of truth. ADP makes that backend discoverable, explainable and safer for AI-driven automation.


The problem

Modern AI agents can understand natural language, but most business APIs are not ready for agents.

Without ADP, teams usually end up with one of these fragile patterns:

Pattern Problem
Huge system prompts Expensive, hard to maintain, easy to drift from the real backend.
OpenAPI-only discovery Good for endpoint shape, weak for scenarios, business semantics, permissions and agent safety.
Direct database access Dangerous, bypasses API rules, policies, validation and domain logic.
Manual tool definitions Duplicates backend knowledge and becomes stale quickly.
n8n workflows with hardcoded endpoints Hard to scale across modules, tenants, locales and API versions.

ADP solves this by publishing a closed, structured contract that agents can inspect before making decisions.


The core idea

The LLM interprets. ADP describes. Agent Guard validates. Laravel authorizes. rest-generic-class executes.


Where this fits


Responsibilities

Layer Responsibility
Laravel application Owns business rules, policies, auth, validation, services and data.
ronu/rest-generic-class Executes reusable CRUD, filtering, relations, hierarchy, exports and mutations.
ronu/laravel-agent-protocol Publishes API capabilities as ADP metadata.
ADP Agent Guard Validates LLM/n8n/MCP tool plans before execution.
n8n Orchestrates workflows, credentials, approvals and HTTP calls.
MCP adapter Exposes ADP resources and operations as MCP resources/tools.
LLM Resolves natural language into a structured intent plan.

Key features

Metadata discovery

Laravel-native integration

rest-generic-class alignment

Designed to complement ronu/rest-generic-class, not replace it.

rest-generic-class executes:

laravel-agent-protocol describes those capabilities for agents.


ADP Agent Guard

ADP Agent Guard is the safety layer added for agentic execution.

It validates a model-generated IntentPlan against the compiled ADP graph before an adapter calls the real API.

It is deterministic PHP logic. It does not call an LLM and does not consume tokens.

It blocks

Guard flow

When the integration wants a human-friendly reply, the LLM can transform the validated API result or the safe rejection into natural language for the user. This is an optional presentation step; it does not replace Agent Guard validation, Laravel authorization or backend execution.

Example: valid query

Example: blocked sensitive field

Result:

Example: blocked out-of-domain request

Result:

Example: high-risk operation requires confirmation

Result:


Installation


Requirements


Quick configuration

Route discovery can also detect controllers extending:


Configure Agent Guard

Environment option:


Use Agent Guard


Endpoints

Bundle modes

Mode Use case
full First discovery, local development, MCP server startup, n8n first load.
slim Repeated executions, token-sensitive prompts, cached references.

Metadata model


Integration with n8n

Recommended workflow:

Recommended custom n8n nodes:

Node Responsibility
ADP Discover Load /agent/bundle.
ADP Load Resource Load one resource descriptor.
ADP Load Operation Load one operation descriptor.
ADP Resolve Intent Ask LLM to produce IntentPlan JSON.
ADP Validate Intent Apply Agent Guard semantics.
ADP Risk Gate Require confirmation for high/critical operations.
ADP Execute Query Execute safe read operations.
ADP Execute Operation Execute approved mutations.
ADP Format Response Format API JSON for the user.
ADP Audit Log Store prompt, plan, decision and execution metadata.

n8n should not contain business logic. It should orchestrate ADP metadata, credentials, approvals and HTTP calls.


Integration with MCP

This package is MCP-ready, but it is not itself an MCP server.

The MCP adapter should map:

ADP MCP
ResourceDescriptor MCP resource, for example adp://resources/security.user.
OperationDescriptor query Read-only MCP tool.
OperationDescriptor create/update/delete MCP tool with risk and confirmation metadata.
Dictionary Resource or prompt context.
Examples Prompt templates or tool examples.

MCP annotations are exported with ADP metadata:

The adapter should still validate every selected tool call through Agent Guard before executing HTTP requests.


Security model

ADP is a contract, not a permission bypass.

The execution chain must remain:

Default protections

Untrusted API data

Output:


Token-cost strategy

Agent Guard itself does not consume tokens. It runs in PHP over the compiled metadata graph.

Tokens are consumed only when an adapter sends metadata to an LLM or asks an LLM to produce or format an answer.

Recommended strategy:

Technique Benefit
Cache /agent/bundle with ETag Avoid repeated metadata transfer.
Use mode=slim after first load Reduce context size.
Send only relevant resources Lower prompt cost.
Use compact IntentPlan JSON Lower completion cost.
Validate in PHP No second LLM security pass required.
Keep reference tables small Avoid token-heavy catalogs.

Cache

ADP metadata is compiled into an AgentMetadataGraph and cached.

Use compiled-file cache for production-style metadata artifacts:

Recommended deploy flow:


Artisan commands


Exporters

Format Purpose
json Native ADP graph.
json-schema Operation input schemas derived from validation rules.
markdown Human-readable documentation from metadata.
mcp MCP-style resources/tools manifest derived from ADP.

Testing and quality

The suite covers:


Example scenarios

Query users by status

Query with relation

Bulk update requires risk handling

Expected result:


Documentation


Roadmap

Phase 1 — ADP metadata foundation

Phase 2 — Agent Guard

Phase 3 — Adapter ecosystem

Phase 4 — Enterprise governance


Design principles


License

MIT.


All versions of laravel-agent-protocol with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/cache Version ^11.0|^12.0
illuminate/config Version ^11.0|^12.0
illuminate/container Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/routing Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/validation Version ^11.0|^12.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 ronu/laravel-agent-protocol contains the following files

Loading the files please wait ...