Sunshine

Sunshine is a Laravel and Filament app that finds local events for my family. Once a week, an agent built on the Laravel AI SDK searches the web and the event calendars we follow, and keeps what fits the days we're free. We mark each find Interested or Not for us and rate the ones we went to, and the next scan reads those marks.

In use at home

  1. Scheduled scans, marks, plans and history · Built Oct 30
  2. A run per place, and an MCP server · Built Oct 30
  3. Two-model scans and browser rendering · Built Nov 1
  4. Taste profile · Built Nov 17
Started
Oct 27, 2026
Latest update
Nov 17
Runs on
My own server, on the Anthropic API
Stack
Laravel 13, Filament 5, Laravel AI SDK, Laravel MCP, Pest

Updates

Taste profile

Sunshine keeps a short profile of what my family says yes to and what we skip, by kind of event, day and time, cost and distance. The agent reads it before every scan.

How it's built: A separate agent, TasteProfiler, runs on Haiku before a scan when the last profile is at least six days old. It summarizes our recent marks, ratings and notes, and counts an event left unmarked for two weeks as a soft no. Events marked “Can't make it” or “Didn't go” are left out, since neither says anything about taste. If the call fails, the scan uses the previous profile.

JavaScript-rendered calendars

Some venue calendars render their events client-side, so a plain HTTP fetch returns a page with no events. A source can be set to render in a headless browser first.

How it's built: Playwright's headless Chromium, run from a Node script through Laravel's Process. The browser reaches the web only through a local proxy that allows only public addresses and pins each connection to the address it checked, which closes off SSRF and DNS rebinding.

Two-model scans

Sunshine fetches the calendars and event pages we follow (HTML, RSS, iCal or JSON), and Haiku extracts the dated events from each. The agent, on Sonnet, gets those events in its prompt and does the web search and the picks. A scan costs about 80 cents.

SourcesScreenshot
The Sources page: five followed pages, each with the agent's note from the last scan, when it was checked, and what read it. Four were read by Sunshine, with 9 to 23 events each, one of them rendered in a browser. One was read by the agent.

How it's built: PageRead fetches each source and reduces it to text, and the PageReader agent returns its events as structured output. Sources are read in parallel with Laravel's Concurrency. The scan agent, EventScout, then searches and picks, and every run records its tokens, searches, fetches and estimated cost.

One run per place
PageReaderHaiku, extracts events
EventScoutSonnet, searches and picks
RunSearchValidates, removes duplicates
UpcomingWe mark each one

Screenshots show demo data.

Duplicate detection

A later scan often returns an event it already found, under a reworded title, and Sunshine drops the repeat. The same thing on a new date is added to its activity (the farmers market is one activity, each Saturday an event), which keeps every date with our notes, photos and checklist.

Activities / Fairview Farmers MarketScreenshot
One activity, a farmers market: it came up twice and the family went once, rating it five stars. Tabs hold every time it came up, one note, photos and a three-item checklist. Below are its two dates, one upcoming and one marked Went.

How it's built: Repeats are caught by a deterministic check in PHP after the agent responds. On the same date in the same city, an event is a repeat when every token of one normalized title appears in the other, with a two-token minimum. Normalization drops punctuation, years and stop words. An event on a new date joins the activity the agent flagged as seen before, or the one with the same title and city.

Availability filter

Preferences list the days we're free all day and the days we're free only in the evening, and a scan saves only the events that fit.

How it's built: The agent returns each event's start and end in 24-hour time, and the filter runs in PHP after the response. An event with a missing or unparseable time is kept. Tests fake the agent with EventScout::fake().

tests/Feature/DiscoveryTest.phpPHP
it('only keeps events a scan finds at times they can go out',
function () {
    $this->user->update([
        'free_all_day' => [CarbonInterface::SATURDAY],
        'free_evenings' => [CarbonInterface::WEDNESDAY],
    ]);

    $found = fn (string $title, string $date, ?string $start = null,
        ?string $end = null): array => [
        'title' => $title, 'date' => $date,
        'start_time' => $start, 'end_time' => $end,
        'url' => 'https://example.org/'.Str::slug($title),
    ];

    EventScout::fake([['events' => [
        $found('Saturday morning market', '2026-11-07',
            '8:00', '12:00'),
        $found('Wednesday concert', '2026-11-04', '19:00'),
        $found('Wednesday afternoon fair', '2026-11-04',
            '15:00', '19:30'),
        $found('Wednesday lecture, time unknown', '2026-11-04'),
        $found('Wednesday lecture, time unreadable', '2026-11-04',
            '7 PM'),
        $found('Wednesday storytime', '2026-11-04', '10:30', '11:15'),
        $found('Wednesday matinee', '2026-11-04', '14:00'),
        $found('Tuesday talk', '2026-11-03', '19:00'),
    ]]]);

    $search = Search::discoveryFor($this->user);
    RunSearch::dispatch($search->id);

    expect($search->events()->orderBy('title')->pluck('title')->all())
        ->toBe([
            'Saturday morning market',
            'Wednesday afternoon fair',
            'Wednesday concert',
            'Wednesday lecture, time unknown',
            'Wednesday lecture, time unreadable',
        ]);
});

MCP server

Sunshine has an MCP server for coding agent sessions. Its tools read preferences, manage sources, start a search, and read a scan run by run, with each run's usage and the events it kept.

How it's built: Laravel MCP at /mcp, authenticated with a Sanctum token created in the app. Each tool acts as the token's user.

Scheduled scans

On the day of the week we choose, the agent searches the web for events in the next 21 days: near home first, then in a separate run for each other place we'd travel to. New finds go to Upcoming, the home page, with the reason each was picked. We mark each one Interested or Not for us, then Went with a rating, and later scans read those marks.

UpcomingScreenshot
The Upcoming page: when Sunshine last checked and where it checks, then Friday's two finds. A folk night comes with the reason it was picked, when the family last went and how they rated it, and their note. A free glassblowing open studio is marked as a wildcard.

How it's built: events:discover runs hourly on the scheduler and starts a user's scan once their chosen day begins in their time zone. Each place is a queued RunSearch job that runs EventScout, an agent on the Laravel AI SDK with Anthropic's web search and web fetch tools and structured output. The whole UI is Filament 5.

Decisions

Decision 01Oct 30

Preferences describe the household

  • Context: Preferences can describe each person or the household as a whole.
  • Decision: One description covers the household, and so does every mark.
  • Why: A mark belongs to the household. Per-person preferences raise questions the app has no use for, such as whose interest an Interested mark records.
Decision 02Oct 30

Constraints are enforced in code

  • Context: The agent's prompt carries the date range, the free times and the events already found.
  • Decision: Dates, availability, duplicates, avoided activities and non-web addresses are validated in PHP after the response.
  • Why: These have to hold on every run, and a prompt can't guarantee that.
Decision 03Oct 31

Haiku reads, Sonnet searches

  • Context: Page reading runs on Haiku. Web search could move there too.
  • Decision: Search and the picks stay on Sonnet.
  • Why: Web search is billed per search at the same rate on any model, and Sonnet is more careful confirming dates and times.
Decision 04Nov 1

Crawler rules

  • Context: Sunshine fetches third-party pages from its own server, some of them in a browser.
  • Decision: It connects only to public addresses and re-checks on every redirect, follows robots.txt, sends an identifying user agent, and treats page text as data, never as instructions.
  • Why: It runs unattended against third-party sites.

What's next

  1. Later
    A simpler event card
  2. Idea
    Listing a long-running exhibit once, not on every date a scan finds it
  3. Idea
    Scans through the Batch API, at half the price
  4. Idea
    Events that only live on Facebook or Meetup

Follow along

Updates are posted here as features are built. The repo is private.

I build AI features with validated output and per-run cost tracking. Work with me