golem-schedule-future-call-moonbit

Schedules future agent invocations from MoonBit agent code using generated client methods.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-schedule-future-call-moonbit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-schedule-future-call-moonbit
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/moonbit/golem-schedule-future-call-moonbit
Command: npx skills add https://github.com/golemcloud/golem --skill golem-schedule-future-call-moonbit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers building Golem agents in MoonBit need a way to trigger agent method calls at a future time—such as delayed processing, reminders, or retries—without blocking the current invocation or managing external schedulers.

Core Features & Use Cases

  • Scheduled Invocations: Every generated AgentClient method has a schedule_ variant that enqueues the call to run at a specified @wallClock.Datetime.
  • Cancelable Scheduling: The schedule_cancelable_ variants return a CancellationToken so scheduled calls can be canceled before they fire.
  • Use Case: A counter agent schedules its own increment method to run 60 seconds in the future, or a report agent schedules generate_report to run at midnight with a "summary" argument.

Quick Start

Ask the AI to schedule a MoonBit agent method call to run at a future time using the generated AgentClient schedule_ variant with a wallClock Datetime.

Frequently Asked Questions about golem-schedule-future-call-moonbit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule a future agent invocation in MoonBit?

Use the schedule_ variant of any method on the generated AgentClient, passing a @wallClock.Datetime as the scheduled time followed by the method arguments. Obtain the client via AgentClient::scoped and the call returns immediately while the target agent executes it later.

How to cancel a scheduled agent call in Golem MoonBit?

Use the schedule_cancelable_ variant of the client method, which returns a CancellationToken. Call .cancel() on the token to prevent the invocation from firing, or token.drop() to release it when cancellation is not needed.

What timestamp format does Golem scheduled invocation use?

The scheduled_at parameter is a @wallClock.Datetime value containing seconds and nanoseconds since the Unix epoch. You can compute future times by adding offsets to the seconds field of @wallClock.now().

Can I schedule an agent invocation from the CLI instead of code?

Yes, but that is a different workflow covered by the golem-schedule-agent-moonbit skill. This skill only covers agent-to-agent scheduled calls made programmatically from within MoonBit agent code.

What are common use cases for scheduled agent invocations?

Typical uses include periodic tasks that reschedule themselves at the end of each run, delayed order processing after a cooling-off period, timed reminders and notifications, and retrying failed operations with backoff delays.