For AI agents

Your agent's alarm clock.

Agents are great at acting now. anticipated lets them act later. One MCP URL lets a Claude agent schedule its own follow-up, wait days with nothing running, and wake up with the notes it left itself.

Wake-ups count as events. 5,000 free every month.

  1. Mon 10:02 AM

    Agent emails the customer, then schedules a follow-up

    schedule_event(when: "in 48 hours", key: "ticket-9921-followup")

  2. 48 hours

    Nothing running. No tokens, no polling, no open process.

  3. Wed 10:02 AM

    We wake the agent with its saved notes

    Signed POST to your endpoint: the ticket, what it promised, what to check.

  4. Wed 10:03 AM

    Agent sees no reply, follows up, closes the loop

One MCP server Claude (Messages API MCP connector) Any MCP client with remote HTTP servers OpenAI and Grok recipes coming soon

Between API calls, your agent doesn't exist.

So "check back Thursday" turns into a cron job, a queue, a state table and glue code. Or you hand it one tool.

Building it yourself

  • A scheduler or cron that never misses
  • A table of pending wake-ups and their context
  • Retry logic when the agent endpoint is down
  • Tool wiring for each model provider
  • No record of what woke up, when, or why

With anticipated

  • One tool call: schedule_event
  • Context travels in the notes; we store them
  • Signed delivery with retries
  • A standard remote MCP server, no SDK to install
  • Every delivery attempt logged with status and latency

Recipe · Claude

A support agent that never forgets to follow up.

Your Claude agent answers a ticket and schedules a check-in for 48 hours later, keyed to the ticket. It needs no tool code: Claude calls anticipated directly through the MCP connector. When the check-in fires, your endpoint verifies the signature and starts a new run with the notes. If the customer replies first, your backend cancels it by key.

schedule_event( when: "in 48 hours", url: WAKE_URL, key: "ticket-9921-followup", notes: { ticket: 9921, promised: "fix for CSV import" }) # customer replied first: cancel_event(key: "ticket-9921-followup")

Three files, Node 22+ and @anthropic-ai/sdk. Run schedule.ts once to start the agent and keep wake.ts listening at your WAKE_URL.

agent.ts · Claude API
import Anthropic from '@anthropic-ai/sdk'

/**
 * One Claude turn with anticipated.io connected as a remote MCP server. Claude can call
 * schedule_event, get_event and cancel_event on its own; no tool code runs on your side.
 */
const client = new Anthropic() // ANTHROPIC_API_KEY

export const MCP_URL = process.env.ANTICIPATED_MCP_URL ?? 'https://v2-api.anticipated.io/mcp'
export const WAKE_URL = process.env.WAKE_URL! // where anticipated POSTs when a follow-up fires

const SYSTEM = `You are a support agent. You can't wait, so when something needs checking later, schedule it
with the anticipated schedule_event tool: url ${WAKE_URL}, a key naming the ticket (like "ticket-9921-followup"),
and notes holding everything your future self will need. When you are woken, the notes are the first message.`

export async function runAgent(prompt: string): Promise<string> {
  const response = await client.beta.messages.create({
    model: 'claude-opus-5-5',
    max_tokens: 16000,
    betas: ['mcp-client-2025-11-20', 'server-side-fallback-2026-07-01'],
    fallbacks: 'default',
    system: SYSTEM,
    mcp_servers: [{ type: 'url', name: 'anticipated', url: MCP_URL, authorization_token: process.env.ANTICIPATED_API_KEY }],
    tools: [{ type: 'mcp_toolset', mcp_server_name: 'anticipated' }],
    messages: [{ role: 'user', content: prompt }]
  })
  if (response.stop_reason === 'refusal') return `Declined: ${response.stop_details?.explanation ?? 'no reason given'}`
  for (const block of response.content) {
    if (block.type === 'mcp_tool_use') console.log(`→ ${block.name}`, JSON.stringify(block.input))
  }
  return response.content.flatMap((b) => (b.type === 'text' ? [b.text] : [])).join('\n')
}
wake.ts · your endpoint
/**
 * Step 2: the endpoint anticipated calls when the follow-up fires. It checks the signature, answers
 * 200 right away (deliveries time out after 10 s and are retried), then starts a new agent run with
 * the notes the agent left itself.
 *   ANTHROPIC_API_KEY=... ANTICIPATED_API_KEY=ak_... ANTICIPATED_SIGNING_SECRET=whsec_... pnpm wake
 */
import { createServer } from 'node:http'
import { runAgent } from './agent.js'
import { verifySignature } from './verify.js'

const SECRET = process.env.ANTICIPATED_SIGNING_SECRET!

const handled = new Set<string>() // use your database in production: a retry can arrive after a timeout

createServer(async (req, res) => {
  if (req.method !== 'POST' || req.url !== '/wake') return void res.writeHead(404).end()
  let body = ''
  for await (const chunk of req) body += chunk
  if (!verifySignature(SECRET, body, req.headers['x-anticipated-signature'] as string | undefined)) return void res.writeHead(401).end()

  const { id, when, document: notes } = JSON.parse(body) as { id: string; when: string; document: unknown }
  res.writeHead(200).end()
  if (handled.has(id)) return
  handled.add(id)

  const reply = await runAgent(`You scheduled this follow-up for ${when}. Your notes:\n${JSON.stringify(notes, null, 2)}\nDo what they say.`)
  console.log(`woke ${id}:`, reply)
}).listen(Number(process.env.PORT ?? 8787))
verify.ts · signature check
import { createHmac, timingSafeEqual } from 'node:crypto'

/**
 * Check an anticipated.io webhook signature.
 * Header: x-anticipated-signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>
 * During a secret rotation there is one v1 per secret; any match is accepted.
 */
export function verifySignature(secret: string, rawBody: string, header: string | undefined, toleranceS = 300): boolean {
  const parts = (header ?? '').split(',').map((kv): [string, string] => [kv.slice(0, kv.indexOf('=')), kv.slice(kv.indexOf('=') + 1)])
  const t = Number(parts.find(([k]) => k === 't')?.[1])
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceS) return false
  const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest()
  return parts.some(([k, v]) => {
    if (k !== 'v1') return false
    const given = Buffer.from(v, 'hex')
    return given.length === expected.length && timingSafeEqual(given, expected)
  })
}

How a wake-up works

01

Agent schedules

It calls schedule_event with a time, a key, and notes for its future self.

02

We hold it

Minutes or months. Your backend can check or cancel it by key at any point.

03

We call you back

A signed POST to your endpoint with the saved notes, retried if you're down.

04

The agent picks up

Your code starts a new run with those notes as the first message.

Coming soon: hosted wake-ups

Skip step 4. We call the model for you with the saved prompt and tools, and send you the result.

Join the waitlist

What agents use it for

Support follow-ups

"If they haven't replied in 48 hours, check in." Cancelled the moment they do.

Sales sequences

Day 2 and day 7 touches, each written fresh from what happened since.

Coding agents

Check the deploy in 20 minutes. Retry the flaky job Friday. Roll back if it failed.

Approval timeouts

No sign-off by end of day? Escalate to the next approver.

The chat apps already schedule. Why this?

Scheduled tasks in chat apps are built for one person in a chat. anticipated is built for the agent inside your product.

CapabilityChat-app tasksanticipated
Where it runsIn the chat appIn your product
Who can cancel itThe user, by handYour backend, by key
Where the result goesA notification to the userYour webhook, queue or agent
Audit trailTask historyEvery delivery attempt, with status and latency

Written for agents to read, too.

Each tool carries a plain-language description, so a model knows when to reach for it without a prompt from you.

MCP URL: https://v2-api.anticipated.io/mcp

Auth: your API key as Authorization: Bearer. Streamable HTTP, stateless.

MCP tools
schedule_eventFire a webhook at a time, with notes sent back to you. Plain-words times and time zones.
get_eventRead an event by your key, with every delivery attempt.
cancel_eventCancel by your key. Safe to call twice.
reschedule_eventMove a pending event to a new time by your key, keeping its notes. It never also fires at the old time.
list_eventsSee what is coming up (or what already ran) by fire time, with status filters.

Teach your agent to come back later.

Wake-ups are events on the same plans. 5,000 free a month.

Get early access