A meta harness for research queries
Research inside your Laravel app.
Bring multi-source research to your Laravel AI SDK agents.
PHP 8.4+ · Laravel 13.30+ · Laravel AI SDK ^1.0.1
Install
composer require jkudish/laravel-ai-librariumPublish configuration
php artisan vendor:publish --tag=librarium-configPreview offline
Librarium::research( 'Lisbon or Porto without a car?',)->only(['exa'])->dryRun(); Research when ready
Librarium::research( 'Lisbon or Porto without a car?',)->only(['exa'])->run();
Previewing makes no provider calls, so it costs nothing. Research calls your providers and bills to your API keys. See costs and limits.
Research with the facade
Configure your source credentials, then collect a Run with answers and citations. Librarium is Laravel-native, built on the Laravel AI SDK.
$evidence = Librarium::research(
'Lisbon or Porto without a car?',
)->only(['exa'])->run();Keep every source
Read each source’s answer with its citations. The Run reference explains the shared format and safe rendering.
$result = $evidence->result('exa');
$citations = $evidence->citations();Queue longer research
Queue deep research and check the saved Run without submitting again. The queue guide covers callbacks and handing evidence to an agent.
$queued = Librarium::research(
'Lisbon or Porto without a car?',
)->deep()->only(['exa'])->queue();
$id = $queued->id();
$current = Librarium::find($id)
?->refresh();Give your agent the evidence
Let an AI SDK agent inspect a completed Run through a read-only tool. The agent guide has the full example.