LaravelStarter

a2a-laravel-starter — Laravel Starter Template

By praveendias1180

A Laravel-based A2A agent starter project with a built-in unit conversion example agent; clone it, run it, and replace it with your own agent logic.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-14View source

What stands out

A quick read of the recorded project description.

01

Runs immediately after cloning; the agent listens at http://localhost:8000 by default

02

Provides three types of A2A entry points: Agent Card, JSON-RPC, and HTTP+JSON

03

Includes a built-in unit conversion example agent supporting length, mass, volume, and temperature

04

Demonstrates multi-turn tasks: asks for the missing target unit, then completes in the same task after the answer

05

Only four files are related to A2A; the rest is a normal Laravel application

06

Provides php artisan a2a:make-executor and php artisan a2a:card commands to assist development

Template Details

This is a Laravel application template that is itself already an A2A (Agent2Agent) agent. It is built on praveendias1180/a2a-laravel, a Laravel bridge layer for the A2A PHP SDK; the README states that the SDK targets A2A 1.0, is structurally similar to the official Python SDK, and passes the official A2A TCK.

According to the README, you can create the project with composer create-project praveendias1180/a2a-laravel-starter my-agent, or use GitHub's Use this template and then run composer run setup, followed by php artisan serve to start; the agent runs at http://localhost:8000. Once started, it provides three entry points: /.well-known/agent-card.json returns the Agent Card, /a2a/jsonrpc is the JSON-RPC endpoint, and /a2a/rest/... is the HTTP+JSON endpoint.

The example agent is a unit converter supporting length, mass, volume, and temperature. If the request is missing the target unit (for example, convert 10 km), it asks To which unit?; after you answer miles in the same task, it continues and completes, demonstrating a multi-turn A2A task (first INPUT_REQUIRED, then COMPLETED). The README notes that only four files are related to A2A: routes/a2a.php mounts the card and the two endpoints with a single line Route::a2a(...); app/A2A/UnitConverterAgentCard.php defines the card; app/A2A/UnitConverterExecutor.php converts messages into task events; app/A2A/UnitConverter.php is pure PHP conversion logic with no A2A code. The rest is a normal Laravel application.

The README does not provide information about this template's performance, concurrency capability, or production readiness; production-related suggestions include only adding authentication middleware to the routes, using queued execution via A2A_RUNNER=queued, disabling response buffering for nginx to support streaming, and cleaning up old tasks with php artisan a2a:prune.

LaravelStarter

Is it right for your project?

Use Cases

  • Send messages to the local agent with the official A2A CLI or curl and observe streaming responses
  • Use the unit conversion agent as a starting point and replace it with an agent that calls an LLM, database, or external API
  • Refer to tests/Feature/UnitConverterAgentTest.php to write your own agent tests
  • Follow the README's production suggestions to add authentication to routes, enable queued execution, or configure nginx streaming

Suitable For

  • Laravel developers who want a runnable A2A agent quickly
  • Developers who need a reference for implementing A2A task events and multi-turn interactions
  • Teams planning to integrate the A2A PHP SDK into a Laravel application

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Create the project with composer create-project praveendias1180/a2a-laravel-starter my-agent, or use the GitHub template and then run composer run setup

  2. 2

    Run php artisan serve to start; the agent runs at http://localhost:8000

  3. 3

    Test with a2a send -a http://localhost:8000 --stream "convert 10 km to miles" or call /a2a/rest/message:send with curl

  4. 4

    Run php artisan test to execute tests; php artisan a2a:card prints and validates the Agent Card

  5. 5

    Production-related configuration (authentication middleware, A2A_RUNNER=queued, disabling nginx buffering, a2a:prune scheduling) must be set up yourself according to the README

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This listing covers the free version in the public repository under the Apache-2.0 license; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution are permitted; when distributing, include the Apache-2.0 license.
  • Modified files must prominently indicate changes, and relevant copyright, patent, trademark, and attribution notices must be retained.
  • If the original project includes a NOTICE file, applicable attribution notices in it must be retained when distributing derivative works.
  • The license includes an applicable contributor patent grant; initiating patent litigation as described in the license terminates that patent grant, and no trademark use rights are granted.
  • The code is provided as-is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's Apache-2.0 license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
View Original Text Basis

Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 80 / 100
Technologies
Laravel
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-14
Screenshot last checked
2026-10-14

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Laravel as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: codex-user-requested-batch-review-20261015 · 2026-10-15

Inspect the recorded source material

SHA-256: 3b24de5b894d746bec069230bbdd9b1e7ec049d6f9ad9b98229ebb8cd602f1a8

2026-10-14T16:06:47.570Z

Source file / repository
# A2A Laravel Starter

A Laravel app that is already an [A2A (Agent2Agent)](https://a2a-protocol.org/latest/specification/) agent. Clone it, run it, then swap the example agent for your own.

![The starter's agent answering the A2A CLI: its Agent Card, a streamed conversion, and a multi-turn task that asks for the missing unit](art/demo.gif)

It is built on [`praveendias1180/a2a-laravel`](https://github.com/praveendias1180/a2a-php), the Laravel bridge for the A2A PHP SDK. That SDK targets **A2A 1.0**, has the same shape as the official Python SDK, and passes the official A2A TCK.

## Run it in 2 minutes

```bash
composer create-project praveendias1180/a2a-laravel-starter my-agent
cd my-agent
php artisan serve
```

Or click **Use this template** on GitHub, clone your copy, and run `composer run setup`, then `php artisan serve`.

Your agent is now live at `http://localhost:8000`:

| URL | What |
|---|---|
| `/.well-known/agent-card.json` | the Agent Card, which tells other agents what yours can do |
| `/a2a/jsonrpc` | the JSON-RPC endpoint |
| `/a2a/rest/...` | the HTTP+JSON endpoint |

## Talk to it

With the official [A2A CLI](https://github.com/a2aproject/a2a-cli):

```bash
a2a send -a http://localhost:8000 --stream "convert 10 km to miles"
```

Or with curl:

```bash
curl -s http://localhost:8000/a2a/rest/message:send \
  -H 'Content-Type: application/json' -H 'A2A-Version: 1.0' \
  -d '{"message":{"messageId":"1","role":"ROLE_USER","parts":[{"text":"72 f in c"}]}}'
```

The example agent is a unit converter. It knows length, mass, volume and temperature. Leave out the target unit (`convert 10 km`) and it asks `To which unit?`. Answer `miles` on the same task, and it finishes the job. That shows a multi-turn A2A task (`INPUT_REQUIRED`, then `COMPLETED`).

## What's inside

Only four files are about A2A:

| File | What it does |
|---|---|
| [`routes/a2a.php`](routes/a2a.php) | One `Route::a2a(...)` line mounts the card and both endpoints |
| [`app/A2A/UnitConverterAgentCard.php`](app/A2A/UnitConverterAgentCard.php) | The Agent Card: name, skills, capabilities |
| [`app/A2A/UnitConverterExecutor.php`](app/A2A/UnitConverterExecutor.php) | Turns a message into task events (working, artifact, completed) |
| [`app/A2A/UnitConverter.php`](app/A2A/UnitConverter.php) | The agent's actual logic: plain PHP, with no A2A in it |

Everything else is a normal Laravel 13 app.

## Make it your own

1. **Replace the logic.** Edit `app/A2A/UnitConverter.php`, or write a new class that calls an LLM, your database or an API. The executor only needs a string back.
2. **Update the card.** Change the name, description and skills in `UnitConverterAgentCard.php`. Other agents read these to decide whether to call you.
3. **Or start a fresh agent.** `php artisan a2a:make-executor Support` writes `app/A2A/SupportExecutor.php`. Then point the route at it.
4. **Check the card.** `php artisan a2a:card` prints it as served and validates it.

## Tests

```bash
php artisan test
```

[`tests/Feature/UnitConverterAgentTest.php`](tests/Feature/UnitConverterAgentTest.php) calls the agent the way another agent would: over JSON-RPC and HTTP+JSON, with streaming and with a multi-turn task. Copy its helpers when you test your own agent.

## Going to production

- **Protect it.** Add `->middleware('auth:sanctum')` (or any auth) to the route in `routes/a2a.php`. The Agent Card stays public, which discovery needs. Tasks are scoped to the signed-in user.
- **Long-running work.** Set `A2A_RUNNER=queued` so executors run on your queue workers instead of in the web request. See [queued execution](https://praveendias1180.github.io/a2a-php/guides/laravel-queues/).
- **Streaming behind nginx.** Turn off response buffering for the A2A routes. See [SSE with nginx and PHP-FPM](https://praveendias1180.github.io/a2a-php/guides/laravel-sse-nginx/).
- **Clean up old tasks.** Schedule `php artisan a2a:prune`.

## Learn more

- [Laravel guide](https://praveendias1180.github.io/a2a-php/guides/laravel/)
- [A2A in five minutes](https://praveendias1180.github.io/a2a-php/concepts/a2a-in-five-minutes/)
- [A2A PHP SDK on GitHub](https://github.com/praveendias1180/a2a-php)
- [The A2A specification](https://a2a-protocol.org/latest/specification/)

## License

Apache-2.0. The Laravel skeleton this starts from is MIT-licensed.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.