Scheduling a Future Agent Invocation (TypeScript)
SkillProductivityLets your agent schedule its own function calls to run automatically at a chosen future time.
Use Scheduling a Future Agent Invocation (TypeScript) in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Scheduling a Future Agent Invocation (TypeScript) and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Scheduling a Future Agent Invocation (TypeScript) skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Scheduling a future agent invocation in a TypeScript Golem project. Use when the user asks about delayed invocations, scheduling calls for later, or timed agent execution.
What this skill tells your AI
The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/ts/golem-schedule-future-call-ts/SKILL.md and read by ahel’s review.
Overview
A scheduled invocation enqueues a method call on the target agent to be executed at a specific future time. The call returns immediately; the target agent processes it when the scheduled time arrives.
Usage
Every method on a definition RPC client has a .schedule() variant that
takes a Datetime as the first argument, followed by the method's input record
(omit the input for methods declared with input: {}). It returns a
CancellationToken; ignore the token when cancellation is not needed.
import { Counter } from './counter-agent.js';
const counter = Counter.client.get({ name: 'my-counter' });
// Schedule increment to run 60 seconds from now.
const nowSecs = BigInt(Math.floor(Date.now() / 1000));
counter.increment.schedule({ seconds: nowSecs + 60n, nanoseconds: 0 });
// Schedule with arguments.
const reporter = ReportAgent.client.get({ name: 'daily' });
reporter.generateReport.schedule(
{ seconds: BigInt(tomorrowMidnight), nanoseconds: 0 },
{ kind: 'summary' },
);
Datetime Type
The Datetime argument represents a point in time as seconds + nanoseconds since the Unix epoch. It is a plain object; construct it inline:
const at = {
seconds: BigInt(1700000000), // Unix timestamp as a BigInt
nanoseconds: 0, // Sub-second precision
};
Note: seconds is a BigInt in the TypeScript binding. If you want the exact
type, import it as import type { Datetime } from 'golem:agent/host@2.0.0'.
Cancellation
Keep the CancellationToken returned by .schedule(at, input) and call .cancel() any time before the scheduled time to cancel the invocation:
const token = counter.increment.schedule({ seconds: nowSecs + 60n, nanoseconds: 0 });
// …later, if the run is no longer wanted:
token.cancel();
(To cancel an in-flight — not scheduled — RPC call, pass { signal } as the trailing option to the normal awaited call and abort the AbortSignal, for example method(input, { signal }). You can also gate a method on agent state, or cancel from the CLI with a known idempotency key via golem agent cancel-invocation — see golem-cancel-queued-invocation.)
Use Cases
- Periodic tasks: Schedule the next run at the end of each invocation
- Delayed processing: Process an order after a cooling-off period
- Reminders and notifications: Send a reminder at a specific time
- Retry with backoff: Schedule a retry after a delay on failure
Signals
- GitHub stars
- 2k
- Forks
- 210
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
golem-schedule-future-call-ts- Source
- github.com/golemcloud/golem
Related picks
Skill · mattpocock
The pick for TypeScripttypescript-pro
Skill · jeffallan
The pick for TypeScriptsocial
Skill · coreyhaines31
More in Productivitygws-calendar
Skill · googleworkspace
More in Productivitylark-workflow-standup-report
Skill · larksuite
More in Productivitywriting-plans
Skill · obra
More in Productivity