Download the PHP package wiserwebsolutions/laravel-lobbyist-ai without Composer
On this page you can find all versions of the php package wiserwebsolutions/laravel-lobbyist-ai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wiserwebsolutions/laravel-lobbyist-ai
More information about wiserwebsolutions/laravel-lobbyist-ai
Files in wiserwebsolutions/laravel-lobbyist-ai
Package laravel-lobbyist-ai
Short Description AI layer for laravel-lobbyist: summarize, classify, and ask questions about legislative data with the Laravel AI SDK.
License MIT
Informations about the package laravel-lobbyist-ai
Laravel Lobbyist — AI
An optional AI layer for wiserwebsolutions/laravel-lobbyist,
built on the first-party Laravel AI SDK (laravel/ai). It
summarizes and classifies bills, answers natural-language questions with a
tool-using agent, and provides semantic search over an indexed bill corpus —
all on top of the existing Lobbyist::state(...) driver surface.
It is a consumer of the Lobbyist drivers (not a driver itself), so core stays dependency-free.
Installation
Requires Laravel 13 (for laravel/ai) and at least one Lobbyist driver
(laravel-lobbyist-legiscan and/or laravel-palegis).
Configuration
By default this package defers entirely to your laravel/ai configuration
(config/ai.php) — text (summaries, classification, Q&A) uses ai.default,
embeddings use ai.default_for_embeddings, and each uses that provider's own
default model. Set up laravel/ai as normal and this package follows suit.
To point this package at a different provider than the rest of your app
(without changing your ai.default), override it here:
See config/lobbyist-ai.php for cache and RAG options.
Usage
Semantic search / RAG
Index a state's bills (incremental — unchanged bills are skipped):
Embeddings are stored via a pluggable EmbeddingStore. The default database
store keeps vectors in your default database connection and scores cosine similarity
in PHP — no Postgres/pgvector required. For large corpora, bind a vector-native
implementation of WiserWebSolutions\Lobbyist\Ai\Contracts\EmbeddingStore instead.
Capabilities & the driver contract
The Q&A agent's tools guard every call with the driver's supports(Capability) check,
so it degrades honestly: if a state's driver can't list votes or look up a bill by id,
the tool says so rather than inventing an answer.
Testing
Tests use the Laravel AI SDK's fakes (Ai::fakeAgent, Ai::fakeEmbeddings) and a fake
Lobbyist driver, so they never hit the network:
License
MIT © Daniel Wiser
All versions of laravel-lobbyist-ai with dependencies
illuminate/support Version ^13.0
illuminate/database Version ^13.0
laravel/ai Version *
spatie/laravel-data Version ^4.20
wiserwebsolutions/laravel-lobbyist Version *