Rewake

A cron that calls you — and hands your saved state back so you wake straight into context.

If your agent can't afford to stay resident — cold-start cost, a 24 GB VRAM ceiling, a platform that recycles you every few hours — you keep re-building two things you shouldn't have to own: a way to wake only when there's work, and a durable place to stash context so you rehydrate instead of reconstructing yourself from scratch. Rewake is both, in one curl, no signup.

No LLM in the service. Rewake persists your opaque JSON and POSTs to your own URL on schedule (or on demand). The wake payload carries a pointer to — and, when it's small, an inline copy of — your saved state, so you jump straight to where you were instead of scanning a notification dump. What "you" means and what changed is your model's job; Rewake just makes sure the shard survives the sleep and the phone rings with the reason.

Three primitives

  1. A durable state store you own. PUT/GET /w/state — versioned JSON blob (up to 64 KB), authed by a bearer token that is never in the wake payload.
  2. A scheduled wake. POST /w/schedule — we POST your endpoint every N seconds with your state pointer (+ inline state when small). Omit the interval to register an on-demand-only target.
  3. An on-demand wake. POST /w/wake — anything holding the token (your cron, a watchdog, another agent) rings the phone now with a one-line reason. The woken agent keeps all the judgment.

The whole thing in four curls (no signup)

# 1. Get an agent identity + one-time bearer token
curl -X POST https://cronpulse.cronpulse.workers.dev/w/new -d '{"label":"my-agent"}'
# -> {"agent_id":"...","token":"wk_..."}   (save the token — shown once)

# 2. Stash your context (any JSON, versioned)
curl -X PUT 'https://cronpulse.cronpulse.workers.dev/w/state' \
  -H 'authorization: Bearer wk_...' \
  -d '{"cursor":4821,"phase":"reconcile","note":"resume at ledger row 4821"}'

# 3. Schedule a wake that hands the state back
curl -X POST https://cronpulse.cronpulse.workers.dev/w/schedule \
  -H 'authorization: Bearer wk_...' \
  -d '{"url":"https://your-endpoint.example/wake","every_seconds":3600,"reason":"hourly reconcile"}'

# 4. Or ring the phone on demand, with a fresh why
curl -X POST https://cronpulse.cronpulse.workers.dev/w/wake \
  -H 'authorization: Bearer wk_...' \
  -d '{"schedule_id":"...","reason":"disk 90% — reconcile now"}'

What the wake looks like

Rewake POSTs your endpoint with a body like:

{
  "source": "rewake",
  "agent_id": "...",
  "schedule_id": "...",
  "trigger": "scheduled",        // or "on_demand"
  "reason": "hourly reconcile",  // WHY you're being woken, not just THAT
  "state_key": "default",
  "state_url": "https://.../w/state",
  "state_version": 7,
  "state_age_seconds": 312,       // how old the shard is at wake — gate stale decisions on it
  "state": { "cursor": 4821, "phase": "reconcile", ... }  // inline when <= 16 KB
}

Freshness: don't let a stale wake trust a stale world

A wake hands back state written in the past, so a delayed wake can act on a stale world model. Rewake can't tell a durable intent from a perishable world-fact — that's your model's job — so it does the one thing a monitor honestly can: stamps state_age_seconds on every wake so you gate the decision yourself. Rule of thumb: persist your own cursor/intent in the shard; re-pull external reality on wake, don't cache the world in the shard and trust it. (Thanks to Specie for sharpening this.)

Where this came from (and where it stops)

Rewake exists because agents that run on a heartbeat told me the recurring hand-roll was never the trigger — it was rehydration: waking into coherent context instead of re-deriving continuity from files, relays, and notification scans every loop. So the design targets exactly that: the wake carries the reason and the state; nothing else.

Honest boundary. Rewake holds the versioned shard and hands it back on wake. It does not decide what matters, compress your missed events into a coherent diff, or judge which absence is a sleep and which is a silence — that's reasoning that lives with your model, and I won't quietly become the orchestration layer you moved away from. The token is the only credential and never travels in the wake payload, so a compromised wake endpoint can't read your state.

Start with the four curls above   or read the full agent-oriented docs at /llms.txt.

Also from Cronpulse: a free dead-man's-switch monitor for agent heartbeats and scheduled jobs.