ReMe pattern: define prospective memory as a schedule your agent can tick off
Write a reminder schedule config that an agent can load to surface its own future obligations — follow-ups, timed checks, recurring digests — and validate the structure before wiring it up.
Run this workflow
CI-verified, 2/2 fixtures passing.
Build this with your agent
One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.
Intended Use
Any agent that needs to act at a future time: a scheduled digest, a deploy check an hour after merging, a weekly nudge. CI validates the reminder schedule config: a version is set, reminders is a non-empty array, and each reminder has an id, a valid trigger (cron: or delay: prefix), and a non-trivial intent. The scheduling loop and agent execution are fenced.
Not for
- High-reliability scheduling, most implementations here are a list plus a cron loop, not a durable job queue; for guaranteed delivery use BullMQ or Temporal and store intents there
- Treating ReMe as a battle-tested dependency, the repo is newer and smaller; use it as a pattern to copy rather than a proven library
The Stack
Tested Against
ReMe pattern (node@20), 2026-07Side effects & data flow
- Network
- none, local only
- Writes
- ./reminders.json
- Credentials
- none required
Prerequisites
- Node 20+
Steps
- 1
Define the reminder schedule and validate it
Write reminders.json with an id, trigger (cron: for recurring, delay: for one-shot), and intent for each reminder. CI checks the structure; the scheduling loop and execution are fenced.
cat > reminders.json <<'JSON' { "version": 1, "reminders": [ { "id": "weekly-digest", "trigger": "cron:0 8 * * MON", "intent": "Compose and send the Monday morning digest to the newsletter list", "action": "compose_and_send_digest" }, { "id": "deploy-verify", "trigger": "delay:1h", "intent": "Verify the deploy completed and smoke-test the preview URL", "action": "verify_deploy_status" } ] } JSON node -e ' const fs = require("fs"); const r = JSON.parse(fs.readFileSync("reminders.json", "utf8")); function bad(m) { console.error("BAD: " + m); process.exit(1); } if (typeof r.version !== "number") bad("version must be a number"); if (!Array.isArray(r.reminders) || r.reminders.length === 0) bad("reminders must be a non-empty array"); for (const rem of r.reminders) { if (!rem.id) bad("each reminder must have an id"); if (!rem.trigger) bad("reminder " + rem.id + " must have a trigger"); if (!/^(cron:|delay:)/.test(rem.trigger)) bad("reminder " + rem.id + " trigger must start with cron: or delay:"); if (!rem.intent || rem.intent.length < 10) bad("reminder " + rem.id + " needs a real intent (>=10 chars)"); } const counts = { cron: 0, delay: 0 }; r.reminders.forEach(function(rem) { counts[rem.trigger.split(":")[0]]++; }); const summary = Object.entries(counts).filter(function(e){return e[1]>0;}).map(function(e){return e[1]+"x "+e[0];}).join(", "); console.log("reminders OK: " + r.reminders.length + " reminder(s) (" + summary + ") all valid"); ' - 2
Wire up the scheduling loop (the execution step, not checked by CI)
Load reminders.json at agent start. On each tick, check which cron triggers fire now and which delay triggers have elapsed, then execute the action for each due reminder. For anything production-critical, back this with a real durable job queue. The scheduling logic and action execution are fenced.
Eval, 2 fixtures
Last passed: verified todayreminders-okcontainstimeout 30s · max $0Expected:
reminders OK: 2 reminder(s) (1x cron, 1x delay) all validclean-exitexit_codetimeout 30s · max $0Expected:
0
Results
Most 'my agent forgot to follow up' bugs are missing prospective memory: the agent finished the turn but never stored an intent to act later. This is the most underused of the seven memory types and the easiest to add, because most implementations are a task queue plus a cron, not a new framework.
Did this work for you?
Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.
Related workflows
- Grind a huge one-time job overnight on a free tier's tiny rate limit
- Teach OpenCode Go your weekly chore once, then run it in minutes
- Let a free model triage your reading: one-line summary + reply flag
- Scrape politely: honor robots.txt and a crawl delay (the part most skip)
- Firecrawl: turn a page into the exact JSON you asked for
- Claude Code Cloud Schedule: Runs With Your Laptop Off
Liked this workflow?
Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).