Download the PHP package latentkit/laravel without Composer

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

LatentKit for Laravel

Status: 0.1.0-alpha.1 source alpha

Official Laravel integration for LatentKit's canonical, route-based /v1 API. It provides an auto-discovered SDK binding, facade, connection-check command, network-free fake, and a non-streaming text provider for the official Laravel AI SDK.

Requirements

The source alpha is not published on Packagist yet. Development remains in the LatentKit monorepo and approved releases are split automatically into the public Laravel package repository. Do not add either repository as a production Composer repository.

Because this alpha depends on the prerelease PHP SDK, its first Packagist install will explicitly request both prereleases:

This command becomes usable only after 0.1.0-alpha.1 is visible on Packagist. A stable Laravel release will use the normal single-package install command after the PHP SDK is stable.

Configure

Set an app-scoped runtime key in the server environment:

Optional server-owned settings are LATENTKIT_BASE_URL, LATENTKIT_TIMEOUT, and LATENTKIT_RESPONSE_PROFILE. Never commit the key or put it in client-side Laravel configuration. The package reads these values through config/latentkit.php, so php artisan config:cache remains supported.

Publish the configuration only when it needs to be customized:

Check the connection

The command uses the PHP SDK's typed /v1/me context. It displays workspace, app, assigned route, model count, credits, and the latest winning provider/model without printing the API key, prompts, generated content, or provider response bodies.

Use the PHP SDK directly

Inject the framework-neutral client:

The facade exposes the same bound client:

Use Laravel AI

The package registers the latentkit driver. Laravel AI uses one logical model, latentkit-route; the integration consumes that label and never sends it to the gateway. The app key's assigned published route selects the live provider and model.

Set AI_PROVIDER=latentkit if LatentKit should be Laravel AI's default text provider. Passing any model other than latentkit-route fails before a network request. Do not configure an upstream provider or model in Laravel.

Version 0.1.0-alpha.1 supports non-streaming, text-only prompts. Streaming, tools, structured output, and attachments fail with an explicit unsupported feature exception. The package does not use Laravel AI's OpenAI-compatible driver because LatentKit does not expose /v1/chat/completions and remains route-controlled.

Queued generation

Laravel AI agents can use their normal queue() flow. The serialized job holds the agent and prompt; the worker resolves the LatentKit provider and credential from cached Laravel configuration when it handles the job. Do not serialize an SDK client or API key into a custom job.

The LatentKit PHP SDK queue is enqueue-only and has no public result-retrieval method. A Laravel job that needs a result must call the synchronous chat or other supported SDK resource from its handle() method and store the result in the application.

Testing

Use the package facade fake for code that calls the PHP SDK directly:

Laravel AI agents retain their official Agent::fake() and assertion APIs. Neither fake contacts LatentKit.

Errors and privacy

Direct SDK calls expose normalized ApiException status, code, and request ID. The Laravel AI driver wraps API failures in LatentKitAiException, whose public message contains only the HTTP status and request ID. It does not include the provider response body.

Never log API keys, prompts, generated content, or provider response bodies. Use the LatentKit request ID when support needs to correlate a failed request.

Development


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
laravel/ai Version ^0.9.1
latentkit/latentkit-php Version ^0.1.0-beta.3@beta
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 latentkit/laravel contains the following files

Loading the files please wait ...