Laravel Scout

Full-text search abstraction for Laravel Eloquent models — adds search driver via Searchable trait, indexing, and search() method with driver-agnostic API. Scout features: use Searchable in Eloquent model enables automatic syncing (queue-based), Agent::search('query')->get() for full-text search, toSearchableArray() customizes indexed data, searchable()/unsearchable() for manual index management, soft delete support, custom search engines (Algolia, Meilisearch, Typesense, Elasticsearch via community drivers, database engine for development). Automatic reindexing on model events (save/delete). Driver-agnostic search with pluggable backends — switch from Algolia to Meilisearch without changing search code.

Evaluated Mar 07, 2026 (0d ago) v10.x
Homepage ↗ Repo ↗ Developer Tools php laravel search algolia meilisearch typesense elasticsearch full-text
⚙ Agent Friendliness
64
/ 100
Can an agent use this?
🔒 Security
86
/ 100
Is it safe for agents?
⚡ Reliability
86
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
85
Rate Limits
88

🔒 Security

TLS Enforcement
88
Auth Strength
85
Scope Granularity
82
Dep. Hygiene
88
Secret Handling
85

Agent search indexes may expose sensitive data — toSearchableArray() controls what's indexed; never include API keys, passwords, or PII in agent search index. Scout results bypass Eloquent query scopes (global scopes); add Scout wheres() for multi-tenant agent search to prevent cross-tenant data exposure in search results.

⚡ Reliability

Uptime/SLA
88
Version Stability
88
Breaking Changes
85
Error Recovery
82
AF Security Reliability

Best When

Your Laravel agent platform needs full-text search with a pluggable backend (Algolia for managed, Meilisearch for self-hosted) — Scout's Eloquent integration and driver abstraction make search a first-class Laravel citizen.

Avoid When

You need complex Elasticsearch aggregations/facets, geospatial search, or you're using a search engine not supported by Scout drivers.

Use Cases

  • Agent catalog full-text search — use Searchable on Agent model; Agent::search($request->query)->where('active', true)->paginate(15) returns ranked search results from Algolia/Meilisearch without Elasticsearch complexity for agent marketplace
  • Agent search with filters — Agent::search('assistant')->where('category', 'customer-service')->orderBy('usage_count', 'desc')->get() filters and sorts agent search results; Scout translates to driver-specific filter syntax
  • Queued agent index updates — SCOUT_QUEUE=true batches agent model index updates in queue jobs; prevents blocking agent model save with synchronous indexing; background index sync for agent catalog freshness
  • Meilisearch for self-hosted agent search — SCOUT_DRIVER=meilisearch with Meilisearch running locally; free self-hosted full-text search for agent catalog with typo tolerance; no Algolia cost for agent startup
  • toSearchableArray customization for agent relevance — public function toSearchableArray(): array { return ['name' => $this->name, 'description' => $this->description, 'capability_tags' => $this->capabilities->pluck('name')] } indexes only relevant agent fields for search quality

Not For

  • Faceted search with complex aggregations — Scout's abstraction limits driver-specific features; for agent facet counts, complex Elasticsearch aggregations, or Algolia facet filtering, use vendor SDK directly or community Elasticsearch driver
  • Geospatial search — Scout doesn't abstract geographic search; for agent location-based search (nearest agents), use driver-specific geo features directly or PostGIS with PostgreSQL
  • Real-time search — Scout queues index updates; there's a delay between agent model save and searchable index update; use instant sync (SCOUT_QUEUE=false) for small datasets where indexing latency matters

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: api_key
OAuth: No Scopes: No

Scout uses search driver credentials. Algolia: ALGOLIA_APP_ID + ALGOLIA_SECRET. Meilisearch: MEILISEARCH_HOST + MEILISEARCH_KEY. Credentials in .env for agent search configuration.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Laravel Scout is MIT licensed. Algolia has free tier (10k search ops/month). Meilisearch is open source and free to self-host.

Agent Metadata

Pagination
offset
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • use Searchable does not immediately index existing records — adding Searchable trait to Agent model does not populate search index; must run php artisan scout:import 'App\Models\Agent' after adding Scout to existing agent data; new records auto-index on create, but existing records require import command
  • SCOUT_QUEUE=true delays search visibility — queued agent indexing creates delay between model save and search index update; if agent is created and immediately searched, it may not appear in results until queue processes; for agent creation pages that redirect to search, add brief delay or use SCOUT_QUEUE=false in critical paths
  • toSearchableArray must return flat array for most drivers — returning nested arrays or Eloquent collections in toSearchableArray causes driver-specific serialization errors; Algolia accepts nested objects but Meilisearch requires flat structure; normalize agent data to flat key-value pairs for cross-driver Scout compatibility
  • softDeletes trait required for Scout soft delete support — Scout's soft delete support only works when model uses SoftDeletes trait AND Agent::withTrashed() is used in search; without explicit SoftDeletes config, deleted agents remain in search index after soft delete
  • Database driver returns SQLite LIKE matches, not ranked — SCOUT_DRIVER=database uses SQL LIKE for local development; relevance ranking differs completely from Algolia/Meilisearch; agent search results order differs between local and production; don't rely on result ranking in tests using database driver
  • Index name includes table name by default — Scout index name defaults to model's table name ('agents'); changing table name or using multi-tenant prefixes changes index name; explicit searchableAs() method overrides: public function searchableAs(): string { return 'agents_'.app('tenant')->id; } for tenant-scoped agent search indexes

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for Laravel Scout.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-07.

6470
Packages Evaluated
26150
Need Evaluation
173
Need Re-evaluation
Community Powered