A tiny Eve agent that recaps last night and previews tonight every morning at 9am ET in Slack. Silent when there's nothing to say.
agent/
├── instructions.md # voice — terse, opinionated, Mets POV
├── agent.ts # model config (Vercel AI Gateway)
├── channels/
│ ├── eve.ts # HTTP channel for dev QA (curl / TUI)
│ └── slack.ts # Slack channel (Vercel Connect)
├── tools/
│ └── get_mets_game.ts # free MLB Stats API (Mets = team 121)
└── schedules/
└── daily.ts # 9:00 AM ET → Slack
The morning cron hands work to Slack (receive(…)). The agent calls get_mets_game, writes a short reply, and the channel posts it automatically.
- Node 24.x
- A Vercel account (deployment, AI Gateway OIDC, Slack Connect)
- Slack: Self Aware Studio workspace + a channel for Howie
npm installHowie uses Vercel Connect for Slack credentials (no manual bot token in env).
a. Create a Slack channel in your workspace (e.g. #howie) and invite your wife. Copy the channel ID (C… — right-click channel → View channel details, or from the URL).
b. Create and attach a Connect client:
npm i -g vercel@latest
export FF_CONNECT_ENABLED=1
vercel connect create slack --triggers
# Note the UID printed, e.g. slack/howie
vercel connect detach <uid> --yes
vercel connect attach <uid> --triggers \
--trigger-path /eve/v1/slack --yesFollow the prompts to install the Slack app to Self Aware Studio workspace. Grant scopes for posting and reading mentions/DMs.
c. Env vars:
SLACK_CONNECT_UID=slack/howie # UID from connect create
SLACK_CHANNEL_ID=C0123456789 # your #howie channel
d. Invite the bot to the channel: /invite @Howie (or whatever the app is named).
e. Deploy (Connect triggers need a live URL — see Deployment below).
Manual use: @Howie what's the Mets game tonight? in the channel works too.
The default model is openai/gpt-5.4-mini via the Vercel AI Gateway.
For local eve dev, set one of:
AI_GATEWAY_API_KEYfrom the Vercel AI Gateway, orvercel linkin this project (OIDC token pulled automatically)
On Vercel production, link the project and the gateway authenticates via OIDC — no API key in env.
Run these in order before deploying.
npm install
npm run typecheck
npm run buildeve build should succeed and list daily under schedules.
Start the dev server:
npm run devIn another terminal, trigger a session on the Eve HTTP channel:
curl -X POST http://127.0.0.1:3000/eve/v1/session \
-H 'content-type: application/json' \
-d '{"message":"Call get_mets_game for 2025-09-15 and summarize in one line."}'Copy the sessionId from the JSON response, then watch the stream:
curl -N http://127.0.0.1:3000/eve/v1/session/<sessionId>/streamConfirm the agent calls get_mets_game and returns a sensible recap.
This runs the same path production cron uses and posts to Slack:
curl -X POST http://127.0.0.1:3000/eve/v1/dev/schedules/dailyResponse example:
{ "scheduleId": "daily", "sessionIds": ["..."] }Watch the stream for that session id. You should see tool calls to get_mets_game, then a short assistant message. Check #howie — the Slack channel should get the post.
To test a specific date pair without waiting for real calendar days, temporarily edit the prompt in agent/schedules/daily.ts with known game dates (e.g. a 2025 postseason date), re-run Step 3, then revert.
Trigger the schedule on a date when the Mets have no game yesterday or today (or edit the prompt to use two off-season dates). The agent should end without an assistant message — nothing should post to Slack.
curl http://127.0.0.1:3000/eve/v1/healthvercel linkIn the Vercel project Settings → Environment Variables, add for Production (and Preview if you want):
| Variable | Value |
|---|---|
SLACK_CONNECT_UID |
slack/howie (from Connect) |
SLACK_CHANNEL_ID |
C… your channel id |
Do not commit .env. AI Gateway auth on Vercel is via OIDC after link — no gateway key required in prod.
vercel deploy --prodOr push to a Git-connected Vercel project.
In Vercel Settings → Cron Jobs, confirm a job exists for 0 13 * * * (daily at 13:00 UTC = 9:00 AM EDT).
In November when the US falls back to EST, change agent/schedules/daily.ts to 0 14 * * * and redeploy.
curl https://<your-app>/eve/v1/healthOptionally drive the live deployment with the Eve TUI:
npx eve dev https://<your-app>After 9am ET, check Observability → Cron Jobs and Logs in Vercel. Confirm the run started a session and #howie got the morning post.
- Daylight saving. Cron is UTC.
0 13 * * *is 9am EDT (summer). In November, switch to0 14 * * *for 9am EST. - No skip risk. The recap runs at 9am the next morning, so last night's game is always Final.
- Scope. Howie only covers Mets baseball — off-topic Slack messages get a short refusal before the model runs.
- Beta. Eve is in public preview — expect framework changes.
A live-game schedule that posts only on a lead change or a Lindor/Soto homer — get_mets_game already returns inning + score, so it's mostly one more schedule file.