praveendias1180 / a2a-laravel
Laravel bridge for the A2A PHP SDK: Route::a2a(), queued execution with live SSE streaming, Redis Streams or database event log, owner-scoped storage.
v0.2.0
2026-09-25 13:15 UTC
Requires
- php: ^8.2
- illuminate/bus: ^11.0 || ^12.0 || ^13.0
- illuminate/cache: ^11.0 || ^12.0 || ^13.0
- illuminate/console: ^11.0 || ^12.0 || ^13.0
- illuminate/contracts: ^11.0 || ^12.0 || ^13.0
- illuminate/database: ^11.0 || ^12.0 || ^13.0
- illuminate/http: ^11.0 || ^12.0 || ^13.0
- illuminate/log: ^11.0 || ^12.0 || ^13.0
- illuminate/queue: ^11.0 || ^12.0 || ^13.0
- illuminate/routing: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
- praveendias1180/a2a-php: ^0.2
- symfony/process: ^7.0 || ^8.0
Requires (Dev)
None
Suggests
- ext-redis: Redis Streams event log (a2a.events.driver = redis) with phpredis
- illuminate/redis: Needed for the redis events driver
- predis/predis: Redis Streams event log (a2a.events.driver = redis) without the extension
Provides
None
Conflicts
None
Replaces
None
README
Laravel bridge for the A2A PHP SDK: serve and call A2A (Agent2Agent) agents from Laravel 12 and 13 (Laravel 11 is allowed but untested; Composer blocks its releases for security advisories).
Read-only split. Development happens in
praveendias1180/a2a-phpunderpackages/laravel. Open issues and PRs there.
📖 Guide: https://praveendias1180.github.io/a2a-php/guides/laravel/
composer require praveendias1180/a2a-laravel
php artisan vendor:publish --tag=a2a-migrations && php artisan migrate
php artisan a2a:make-executor Hello
// routes/api.php Route::a2a('/a2a', agentCard: HelloAgentCard::class, executor: HelloExecutor::class) ->middleware('auth:sanctum');
- One route macro mounts the Agent Card (
/.well-known/agent-card.json), JSON-RPC and HTTP+JSON, and fills the card's interface URLs in from your routes.route:cachesafe. - Queued execution (
A2A_RUNNER=queued): executors run on your queue workers (Horizon, supervisor), and the web request streams their events live over SSE. Tasks outlive the request that started them; cancel reaches the worker. - Event log on Redis Streams or your database. Tasks, events and encrypted push-notification configs are stored on your DB connection, scoped to the authenticated user.
- Client:
A2A::client('https://agent.example.com')->sendMessage(...). - Artisan:
a2a:make-executor,a2a:card,a2a:prune,a2a:tck.
Proven with the official A2A TCK: a Laravel app on PHP-FPM + nginx with the queued runner passes the MUST level (conformance).
Apache-2.0.