Download the PHP package padosoft/laravel-ai-regolo without Composer

On this page you can find all versions of the php package padosoft/laravel-ai-regolo. 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-ai-regolo

laravel-ai-regolo

The fastest way to ship a Laravel app on Italian sovereign AI infrastructure.
A first-class Seeweb Regolo provider for the official laravel/ai SDK — chat, embeddings, reranking, image generation, audio transcription, text-to-speech, plus a 30+ open-model catalog hosted entirely in Italy.

CI status Packagist version Total downloads PHP version Laravel version GitHub issues


📚 Public docs: doc.laravel-ai-regolo.padosoft.com

Table of contents

  1. Why this package
  2. Design rationale
  3. Features at a glance
  4. See it in action — laravel-ai-chat demo
  5. Comparison vs alternatives
  6. When to use Regolo vs OpenAI
  7. Installation
  8. Quick start
  9. Usage examples
  10. Configuration reference
  11. Architecture
  12. 🚀 AI vibe-coding pack included
  13. Testing
    • Default suite — offline
    • Running the live test suite
  14. Roadmap
  15. Contributing
  16. Security
  17. License & credits

Why this package

laravel/ai is the official Laravel AI SDK, and it ships 14+ providers out of the box (OpenAI, Anthropic, Gemini, Mistral, Groq, Cohere, DeepSeek, Bedrock, Azure OpenAI, OpenRouter, Ollama, Jina, VoyageAI, xAI, ElevenLabs).

What it does not ship is a provider for Regolo — Seeweb's Italian sovereign AI cloud. Regolo gives you:

This package fills the gap. Drop it in alongside laravel/ai, set a single env var, and Regolo becomes available through the same unified Agent::for() / Embeddings::for() / Reranking::of() APIs the SDK already exposes — no adapter, no wrapper, no learning curve.

Italian sovereign cloud, official Laravel API, zero leakage of provider concepts into your domain code.

Design rationale

A few decisions are worth surfacing up front, because they shape the package's footprint and the kind of bugs you can or cannot have.

1. Provider extension, not SDK fork

laravel/ai is a young but well-architected SDK. Forking it to add Regolo would split the ecosystem and force consumers to choose. Instead, this package implements the public capability contracts (TextProvider, EmbeddingProvider, RerankingProvider) and the public gateway contracts (TextGateway, EmbeddingGateway, RerankingGateway). A single Padosoft\LaravelAiRegolo\LaravelAiRegoloServiceProvider registers the binding ai.provider.regolo, and the SDK takes it from there.

The blast radius is small: when laravel/ai ships a new minor version, you get the upgrade for free; only a contract change in those interfaces would force a release here.

2. OpenAI-classic, not OpenAI-Responses

The upstream OpenAiGateway targets OpenAI's newer Responses API (POST /v1/responses). Regolo is OpenAI-compatible on the classic Chat Completions surface (POST /v1/chat/completions). The closest upstream template is therefore MistralGateway — we mirror its concern split (BuildsTextRequests / MapsMessages / MapsTools / MapsAttachments / HandlesTextStreaming / ParsesTextResponses) and adapt only the namespace and the provider name in the validation exception. See docs/laravel-ai-integration-notes.md for the full audit.

3. Stateless gateway, configuration on the provider

RegoloGateway::__construct(Dispatcher $events) takes only the event dispatcher. Credentials and base URL are read from the Provider argument on each call via providerCredentials()['key'] and additionalConfiguration()['url']. Two consequences:

4. Standalone, agnostic

The package has zero dependencies on AskMyDocs, Padosoft proprietary code, or any sister package. It works in any Laravel 12 or 13 application that has laravel/ai installed (Laravel 11 is unsupported because the upstream laravel/ai SDK itself requires illuminate/support: ^12.0|^13.0 — see the Features at a glance note). The reverse is true too: lopadova/askmydocs and padosoft/askmydocs-pro consume this package, never the inverse.

Features at a glance

See it in action — laravel-ai-chat demo

Want to see this package powering a real ChatGPT-style chatbot? padosoft/laravel-ai-chat is a runnable, MIT-licensed demo on Laravel 13 + React that drops this provider behind the Vercel AI SDK UI (@ai-sdk/react's useChat() hook + ai v6 message-stream protocol). Five suggested prompts trigger five tools that render inline as image / document / link-list / code-snippet / data-table artifacts — token-by-token streaming end-to-end, no glue code on top of laravel/ai and this package.

▶ Open the demo on GitHub →

Clone it, paste your Regolo key, run three commands, and you have a working chat in five minutes — the cleanest way to verify this package end-to-end and the fastest starting point for your own AI product on top of it.

Comparison vs alternatives

If you are evaluating how to call Regolo from a Laravel app, here are the realistic options on the table today.

Capability Custom Http:: client prism-php/prism OpenAI-PHP repurposed laravel/ai + this package
Chat completion
Streaming (SSE) ⚠️ DIY ⚠️ partial
Embeddings ⚠️ DIY
Reranking ⚠️ DIY
Tool calling ⚠️ DIY
Multi-step tool loops ⚠️ DIY
Italian sovereign hosting
Same API as 14+ other providers
First-class Laravel facade & queue support ⚠️ partial
Vercel AI SDK UI compatibility (streaming)
94 tests / 6-cell CI matrix N/A
Maintenance burden when SDK ships features you N/A you you get them free

Bottom line: if you want Regolo behind the same API surface that powers OpenAI, Anthropic, Gemini, Mistral, and Ollama in laravel/ai, this is the only package that does it.

When to use Regolo vs OpenAI

laravel/ai ships an OpenAI provider out of the box, so the natural follow-up question is "why would I send traffic to Regolo instead of OpenAI?" Both are valid choices for Laravel apps; they optimise for different things.

Pick Regolo when at least one of these is true

Pick OpenAI (or stay on it) when

Mix-and-match is fine and expected

Because both providers register through laravel/ai's identical SDK surface, you can route per-feature in a single Laravel app:

This is also why the Comparison table above emphasises "same API as 14+ other providers" — the value of laravel/ai is precisely that you can rebalance traffic across providers without touching application code.

Installation

The package auto-registers via Laravel's package discovery — no manual provider entry in config/app.php needed.

Add the regolo entry to your config/ai.php (publish it from laravel/ai if you haven't yet):

In your .env:

Quick start

That's it. Five lines.

Usage examples

Chat completion

Streaming (token-by-token)

Streaming with a Vercel AI SDK UI frontend

The response is a Vercel-compatible byte stream you can consume directly from @ai-sdk/react's useChat() hook on the frontend.

Tool calling

Embeddings (single + batch)

Reranking (Cohere/Jina-shaped)

The original index and document are preserved on each result so you can map back to your source data without a second lookup.

Configuration reference

Key Type Default Notes
ai.providers.regolo.driver string regolo Required. Resolves the binding ai.provider.regolo.
ai.providers.regolo.name string regolo Echoed in Meta::$provider.
ai.providers.regolo.key string env('REGOLO_API_KEY') Required. Bearer token sent on every request.
ai.providers.regolo.url string https://api.regolo.ai/v1 Override for staging or self-hosted Regolo instances.
ai.providers.regolo.timeout int 60 Per-call timeout in seconds. Override at call-time via $timeout.
ai.providers.regolo.models.text.default string Llama-3.1-8B-Instruct Model used when Agent::using('regolo') is called without a model.
ai.providers.regolo.models.text.cheapest string Llama-3.1-8B-Instruct Used by Lab::Cheapest shorthand.
ai.providers.regolo.models.text.smartest string Llama-3.3-70B-Instruct Used by Lab::Smartest shorthand.
ai.providers.regolo.models.embeddings.default string Qwen3-Embedding-8B Used by Embeddings::for()->generate('regolo').
ai.providers.regolo.models.embeddings.dimensions int 4096 Embedding vector dimension. Must match downstream vector store.
ai.providers.regolo.models.reranking.default string Qwen3-Reranker-4B Used by Reranking::of()->rerank(..., 'regolo').
ai.providers.regolo.models.image.default string Qwen-Image Used by Image::of(...)->generate('regolo'). Wire to env('REGOLO_IMAGE_MODEL', 'Qwen-Image') in config/ai.php for env-var override.
ai.providers.regolo.models.transcription.default string faster-whisper-large-v3 Used by Transcription::of($audio)->using('regolo')->generate(). Wire to env('REGOLO_TRANSCRIPTION_MODEL', 'faster-whisper-large-v3').
ai.providers.regolo.models.audio.default string empty Used by Audio::for(...)->generate('regolo') (TTS). Regolo's TTS catalogue is not on GET /v1/models yet; pass the model id explicitly. Wire to env('REGOLO_AUDIO_MODEL').

Architecture

The package contributes only the orange box. Everything else is upstream laravel/ai. A change to your prompt does not need a single line of provider code touched.

🚀 AI vibe-coding pack included

No other Laravel AI provider package on Packagist ships this today.

Every release of this package includes the Claude Code, the agent automatically picks up the pack and applies it.

What ships in the pack

Why this matters

When a contributor (you, a team-mate, the Seeweb engineer doing wire-compatibility verification, or a random open-source PR author) opens this repo in Claude Code:

  1. The agent reads the pack on session start.
  2. The R36 PR-review skill kicks in automatically the first time the contributor types gh pr create. The agent uses --reviewer copilot, waits for CI, waits for Copilot review, addresses comments, re-checks CI, and only merges when both gates are green.
  3. Future skills (style enforcement, security review, release-note generator, ...) plug into the same pack with zero configuration on the consumer side.

The result: you get the Padosoft AI engineering culture in the same composer require that gets you the Regolo provider. Drop-in vibe-coding for any team that wants to ship Italian-sovereign AI without re-inventing the development workflow.

Opting out

Do not want the pack? Add .claude/ to your .gitignore (or delete it locally). The package code under src/ works completely independently of the pack — the pack is purely a developer-experience layer for repos that use Claude Code.

Want to contribute a skill?

The same pack is shared across padosoft/laravel-ai-regolo, padosoft/laravel-flow, padosoft/eval-harness, padosoft/laravel-pii-redactor, and the upcoming padosoft/laravel-patent-box-tracker — open a PR on any of those repos and we will sync the skill across the family.

Testing

Default suite — offline, zero cost, runs everywhere

The package ships 94 unit tests / 196 assertions that run against a fake HTTP layer (Http::fake()), so the test suite never hits the real Regolo API and is safe to run in CI on every PR. No API key needed; no network needed; no money spent.

Coverage breakdown:

Suite Tests Description
RegoloGatewayChatTest 21 4 ported from Regolo Python SDK + 17 robustness (streaming, errors)
RegoloGatewayEmbeddingsTest 12 1 ported + 11 robustness (empty / batch / Unicode / 4xx / 429 / 503)
RegoloGatewayRerankTest 13 1 ported + 12 robustness (top_n / score-ordering / index integrity)
RegoloGatewayImageTest 8 images/generations happy + size/quality + edit-rejection + timeout const + provider-config precedence
RegoloGatewayAudioTest 6 audio/speech (TTS) happy + voice/instructions forwarding + empty-body resilience
RegoloGatewayTranscriptionTest 7 audio/transcriptions (STT) happy + diarize + Whisper usage mapping + multipart-filename MIME extension matrix
RegoloGatewayTimeoutFallbackTest 8 provider-level timeout fallback (numeric / empty / non-numeric / negative)
ServiceProviderTest 7 container binding + capability interfaces + gateway compositional

The test inventory and the rationale for each robustness scenario is documented in docs/test-coverage-vs-python-sdk.md.

CI matrix: PHP 8.3 / 8.4 / 8.5 × Laravel 12 / 13 (6 cells — Laravel 11 is unsupported because the upstream laravel/ai SDK itself requires illuminate/support: ^12.0|^13.0), plus a separate static-analysis job that runs PHPStan and Pint.

Running the live test suite (against the real Regolo API)

If you want to verify behaviour against the real Regolo servers — for example you are a Seeweb / Regolo engineer validating the package, an enterprise adopter doing a pre-deploy smoke-test, or an open-source contributor confirming wire compatibility before tagging a release — the package ships a dedicated Live PHPUnit testsuite that hits https://api.regolo.ai/v1 end-to-end.

The live suite is opt-in by design:

1. Get a Regolo API key

regolo.ai → sign up → copy your rg_live_... key.

Step 1 — open the API keys section in the Regolo dashboard:

Step 2 — create a new key and copy it:

2. Configure the environment

The bare minimum is a single env var:

Optional overrides (defaults pick the same models the package ships as defaults):

On Windows PowerShell — single var:

If you prefer keeping the live-suite credentials in a .env file at the package root (the same format .env.example ships), you can hydrate the current shell from it before invoking PHPUnit. PHPUnit itself does not read .env — it reads only what the shell (or <php><env> in phpunit.xml) hands it — so a small loader is the standard pattern:

PowerShell:

Bash / zsh:

3. Run the live suite

…or, with the testdox formatter so each scenario prints by name:

Expected output (with a working REGOLO_API_KEY + the default models, and REGOLO_LIVE_AUDIO_MODEL / REGOLO_LIVE_TRANSCRIPTION_AUDIO_PATH left unset — the package's intentional default state):

The two S are the audio-TTS and transcription tests self-skipping by design — Regolo's TTS catalogue is not on /v1/models yet (Seeweb-only model id) and transcription needs a real speech recording on disk. Set both vars and the full 9/9 runs.

If the API key is unset:

What the live suite verifies

File What it asserts on the real API Cost
RegoloChatLiveTest POST /v1/chat/completions returns non-empty text + non-zero token usage ~200 tokens
RegoloStreamingLiveTest POST /v1/chat/completions with stream: true emits SSE → TextDelta events ~150 tokens
RegoloEmbeddingsLiveTest POST /v1/embeddings returns non-empty vectors with uniform length across a batch ~100 tokens
RegoloRerankLiveTest POST /v1/rerank orders documents by relevance, top-1 matches the obvious answer minimal
RegoloImageLiveTest POST /v1/images/generations (Qwen-Image) returns a valid base64 image — image/png, image/jpeg, image/webp, or image/gif, cross-checked against the canonical magic-byte signature for the gateway-claimed MIME (Qwen-Image empirically returns JPEG today) ~€0.001
RegoloAudioLiveTest POST /v1/audio/speech (TTS) returns valid base64 MP3 (ID3 tag or MPEG sync word) — self-skips unless REGOLO_LIVE_AUDIO_MODEL is set, since Regolo's TTS catalogue is not on /v1/models yet minimal
RegoloTranscriptionLiveTest POST /v1/audio/transcriptions (faster-whisper-large-v3) returns non-empty textself-skips unless REGOLO_LIVE_TRANSCRIPTION_AUDIO_PATH points at a real speech file minimal

Total cost per run: well under €0.01 with the default small-model selection. Pick a heavier text model via REGOLO_LIVE_TEXT_MODEL if you want to validate a specific catalogue entry — the cost scales linearly with the model.

The Regolo dashboard's Usage tab confirms the per-run footprint — the snapshot below is from a real vendor/bin/phpunit --testsuite Live invocation against the package defaults:

CI policy

The live suite is never run from this package's .github/workflows/ci.yml. The matrix invokes vendor/bin/phpunit (default config = Unit testsuite). To run the live suite in your own pipeline:

Open an issue or PR if you want a workflow_dispatch job added to this repo to support scheduled live verification.

Roadmap

Version Status Highlights
v0.1 shipped Chat + streaming + embeddings + reranking + 61 tests + 6-cell CI matrix + WOW README + opt-in Live testsuite + AI vibe-coding pack. First public release.
v0.2 shipped Multimodal: image generation (Image::of(...)->generate('regolo', ...) against /v1/images/generations, default Qwen-Image), audio transcription (Transcription::of($audio)->using('regolo', ...)->generate() against /v1/audio/transcriptions, default faster-whisper-large-v3), text-to-speech (Audio::for($text)->generate('regolo', ...) against /v1/audio/speech). 82 tests / 184 assertions.
v1.2 shipped laravel/ai v0.7 + v0.8 compatibility. generateTranscription now forwards $providerOptions (added to the SDK's TranscriptionGateway contract in laravel/ai v0.7.0); dependency constraint widened to ^0.6\|^0.7\|^0.8 so 0.6 consumers keep working while 0.8 apps can finally install. 94 tests / 196 assertions.
v1.2.1 shipped Raise the 0.8-line minimum to laravel/ai v0.8.1 (excludes 0.8.0): ^0.6\|^0.7\|^0.8.1.
next planned Provider-tools registry (Regolo-hosted web search / code interpreter, when published).
later exploring Adaptive routing helper — pick cheapest vs smartest model per prompt with a small classifier.
v2.0 tracking Stable contract pinned against laravel/ai ^1.0 GA.

Open issues and feature votes: github.com/padosoft/laravel-ai-regolo/issues.

Contributing

Contributions are welcome — bug reports, test cases, new robustness scenarios, documentation polish.

  1. Fork the repository.
  2. Create a feature branch (feature/your-thing) targeting main.
  3. Run vendor/bin/phpunit and vendor/bin/pint --test locally.
  4. Open a PR with a clear description and a test that covers the change.

We follow the project conventions documented in CONTRIBUTING.md. Please respect the existing concern split (src/Gateway/Regolo/Concerns/) when adding capabilities — it keeps the package legible, easy to test, and easy to align with future upstream laravel/ai releases.

Security

Found a security issue? Please do not open a public issue. Email [email protected] instead. We follow standard responsible-disclosure timelines documented in SECURITY.md.

License & credits

Apache-2.0 — see LICENSE.

Built and maintained by Padosoft. Initially developed alongside AskMyDocs, but the package is fully standalone agnostic — no AskMyDocs dependency, no Padosoft proprietary glue.

Sister packages in the Padosoft AI stack:

Each is independently usable. None requires the others. Pick what you need.


Made with ☕ in Italy by Padosoft.


All versions of laravel-ai-regolo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
laravel/ai Version ^0.6|^0.7|^0.8.1
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 padosoft/laravel-ai-regolo contains the following files

Loading the files please wait ...