Download the PHP package astrophp/trail without Composer

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

Trail logo

Observability for the Laravel AI SDK.
Agent runs recorded in your own database and shown in your own app.

tests Latest version on Packagist PHP version Total downloads

Install · Screenshots · What it does · What it does not do · Documentation

The Trail overview: counts of runs, error rate, average duration and estimated cost, a chart of runs started every five minutes, and a list of what needs attention.

Trail records what your [Laravel AI SDK](https://github.com/laravel/ai) agents did (runs, model steps, tool calls, sub-agents, tokens and estimated cost) into your application's own database. It serves a dashboard for those runs from your application, in the way Horizon and Telescope do. It is a package, not a hosted service: Trail stores recorded runs in your database and sends them to no service. Errors inside Trail go to your application's exception handler. Trail is tested in CI against `laravel/ai` 1.1.0 to 1.4.1, on Laravel 12 and 13, PHP 8.3 to 8.6, and SQLite, MySQL and Postgres ([Compatibility](#compatibility)). Before it stores anything, Trail redacts secrets and cuts every string to 10,000 characters by default, and you can turn payload capture off and keep only timing, usage and cost. A run is buffered in memory and written in one batch at the end of its request, command or job, not on every SDK event. See [Payloads](docs/payloads.md) and [When it is written](docs/recording.md#when-it-is-written). ## When to use Trail If you're building AI agents with the [Laravel AI SDK](https://github.com/laravel/ai), Trail helps you understand what happens when those agents execute. Use Trail when you need to: - **Debug AI agent executions.** Inspect model steps, tool calls, sub-agents, execution timing, and failures in a single trace. - **Monitor token usage and costs.** Track reported token consumption, including cache and reasoning tokens where available, and estimate spending across agents, models, and providers. - **Investigate failed tool calls.** See which steps failed and examine their recorded execution details. - **Inspect AI conversations.** Follow multi-turn interactions and examine the traces associated with agent execution. - **Monitor agent reliability.** Explore execution history, error rates, and latency to identify problems. - **Keep observability self-hosted.** Store recorded data in your application's own database without sending it to an external observability service. Trail is designed specifically for applications using the Laravel AI SDK. It automatically listens to SDK events, so you don't need to instrument individual agents or tool calls. If you're familiar with Laravel Horizon for queues or Laravel Telescope for application debugging, think of Trail as a dedicated observability dashboard for Laravel AI SDK workloads. **Get started:** Run an AI agent and visit `/trail` in your Laravel application. Trail is not a general-purpose OpenTelemetry backend or a hosted monitoring platform. It captures the operations exposed through Laravel AI SDK events. See [Known limits](docs/limits.md) for coverage and limitations. ## Compatibility Every version below is run in [continuous integration](.github/workflows/tests.yml) on each change: | | Tested | |---|---| | `laravel/ai` | 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.1 | | Laravel | 12, 13 | | PHP | 8.3, 8.4, 8.5, 8.6 | | Database | SQLite, MySQL, Postgres | PHP 8.6 is tested on Laravel 13 only, because Laravel 12's test tools cannot be installed on it yet. Composer allows `laravel/ai` 1.1 or newer within 1.x. ## Install That is all. Trail listens to the SDK's events, so your agents and tools need no change. Run an agent as you already do, then open `/trail` in your application. In the `local` environment anyone can open the dashboard. To try it without calling a provider, use the SDK's own fake. In `php artisan tinker`, with `App\Ai\Agents\SupportAgent` standing in for one of your agents: The run appears in the Traces list. A fake reports no token usage, so its tokens show as Not reported and its cost as Not captured. ### Laravel Boost (optional) If your application uses [Laravel Boost](https://laravel.com/docs/boost), Trail adds four read-only tools to Boost's MCP server. Your agent can list and inspect traces, page through conversations, and summarize token usage and estimated cost by model, provider or agent. Install Boost separately in your application: Trail does not install Boost for you. The tools appear through Boost's existing MCP connection; no separate server is needed. They expose recorded data, including prompt and response excerpts, to connected agents independently of the dashboard's `viewTrail` gate. See the [Laravel Boost guide](docs/boost.md) for setup details and tool limits. ### Before production Outside `local`, nobody can open the dashboard until you say who can. Publish the service provider: Then list who may pass in the `viewTrail` gate of `app/Providers/TrailServiceProvider.php`. See [Access](docs/access.md). A request that fails the check gets a 403. Trail deletes nothing until you run `php artisan trail:prune`, which removes traces older than 14 days by default. It never schedules its commands itself. See [Operations](docs/operations.md). ## What it looks like These screenshots show runs that Trail recorded from the workbench, the small application in this repository that runs scripted agents.
The Traces list: every recorded run with its agent, status, duration, tokens and estimated cost, with filters above it.
Traces. Every run, filterable, with comparison, bookmarks and export.
The inspector of one run: an execution tree of model steps, a tool call and a delegated sub-agent with timing bars, and the evidence for the selected step beside it.
Trace inspector. The execution tree of one run with timing, and the evidence for the step you select.
A conversation shown as a transcript of several turns between a customer and an assistant.
Conversations. A multi-turn session read as a transcript.
The page of one agent: its runs, error rate, latency and cost over the last hour.
Agents. Reliability, latency and cost of one agent.
Usage and cost: a chart of estimated spend over the last hour, a spend projection, and breakdowns by model, provider and agent.
Usage & cost. Estimated spend over time, a projection, and breakdowns by model, provider and agent.
The command palette open over the Traces list, with matching runs and agents in separate groups.
Command palette. Press ⌘K or Ctrl K to go to a page, or to find a run, a conversation or an agent.
## What it does ### Capture - Records agent runs, including streamed and queued ones, with their model steps, tool calls, sub-agents, embeddings, classification, reranking, images, audio, transcription, provider failover and tool-approval pauses, in one trace per run. - Records real timing, token usage (cache and reasoning tokens included) and failure details, and shows anything it could not capture as missing (`Not captured`, `Pending`, `Unpriced`, `Incomplete`), never as zero. - Estimates cost from a price table in `config/trail.php`. You can edit prices in the dashboard. A cost is an estimate, frozen when the run is recorded. It is not billing. - Redacts secrets and cuts long strings before storing anything, and can sample runs, filter them in code, or pause recording from the command line. - Stores everything in your own database, on a connection you can choose. ### Dashboard - Serves a dashboard: an overview, a filterable list of runs with comparison, bookmarks and CSV export, the execution tree of each run, conversations as transcripts, per-agent reliability, latency and cost, and a usage and cost page with price management. - Has a command palette on ⌘K or Ctrl K, to go to a page, copy the link or switch the theme, or find a run, a conversation or an agent by text or id, and keyboard shortcuts that `?` lists. ### Operations - Controls who can open the dashboard with a gate, and can switch recording or the dashboard off. - Ships artisan commands to install, prune, sweep, clear, pause and resume. It never schedules them. - Gives your own tests `Trail::fake()` and its assertions. ## What it does not do - It is not billing, and its costs are estimates from list prices. The default prices use base rates and do not model long-context surcharges. - It never stores image or audio bytes. Image, audio and transcription calls keep their settings, counts and texts, and are priced only from the tokens a provider reports. - It records only what the SDK reports through events. The extra model call that titles a new conversation, and embeddings served from the SDK's cache, are not recorded. - A run that resumes a tool-approval pause is a separate trace from the run that paused. They are not linked. - It does not find every secret. Redaction catches keys and recognisable token shapes, not a password written in a sentence. - It has no users or accounts of its own, and no hosted version: access uses your application's gate. - With SQLite and several writers, a trace can be lost. See [Operations](docs/operations.md#sqlite-and-concurrent-writers). The full list is in [Known limits](docs/limits.md). ## Documentation - [Installation and upgrading](docs/installation.md) - [Configuration](docs/configuration.md): every key, its environment variable and default - [Access](docs/access.md): the `viewTrail` gate, `Trail::auth()`, guard, middleware, path and domain - [What is recorded](docs/recording.md), and how to read what the dashboard shows - [Payloads and sampling](docs/payloads.md): redaction, truncation, `Trail::filter()`, `Trail::withoutRecording()` - [Cost](docs/cost.md): how prices are found and why a cost is an estimate - [Operations](docs/operations.md): the artisan commands, scheduling, queues, Octane and storage - [Testing your application](docs/testing.md): `Trail::fake()` - [Laravel Boost](docs/boost.md): inspect recorded traces through Boost's MCP server - [Known limits](docs/limits.md) - [Roadmap](ROADMAP.md) and [changelog](CHANGELOG.md) ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, the commands, and the workbench app that records scripted agent runs. ## Security Please see [SECURITY.md](SECURITY.md). ## License MIT. See [LICENSE](LICENSE).

All versions of trail 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/database Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
laravel/ai Version ^1.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 astrophp/trail contains the following files

Loading the files please wait ...