A meta harness for research queries

Research inside your Laravel app.

Bring multi-source research to your Laravel AI SDK agents.

Explore Laravel setup

PHP 8.4+ · Laravel 13.30+ · Laravel AI SDK ^1.0.1

  1. Install

    composer require jkudish/laravel-ai-librarium
  2. Publish configuration

    php artisan vendor:publish --tag=librarium-config
  3. Preview offline

    Librarium::research( 'Lisbon or Porto without a car?', )->only(['exa'])->dryRun();
  4. 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.

Research with the facade
$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.

Keep every source
$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.

Queue longer research
$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.