a tool to help your Letta AI agents navigate bluesky
1import { logStats } from "./tasks/logStats.ts";
2import { msFrom, msRandomOffset, msUntilDailyWindow } from "./utils/time.ts";
3import { sendSleepMessage } from "./tasks/sendSleepMessage.ts";
4import { sendWakeMessage } from "./tasks/sendWakeMessage.ts";
5import { agentContext } from "./utils/agentContext.ts";
6import { runReflection } from "./tasks/runReflection.ts";
7import { checkBluesky } from "./tasks/checkBluesky.ts";
8import { checkNotifications } from "./tasks/checkNotifications.ts";
9
10setTimeout(logStats, msRandomOffset(msFrom.minutes(1), msFrom.minutes(5)));
11setTimeout(
12 sendSleepMessage,
13 msUntilDailyWindow(agentContext.sleepTime, 0, msFrom.minutes(20)),
14);
15setTimeout(
16 sendWakeMessage,
17 msUntilDailyWindow(agentContext.wakeTime, 0, msFrom.minutes(80)),
18);
19setTimeout(
20 runReflection,
21 msRandomOffset(msFrom.minutes(180), msFrom.minutes(240)),
22);
23setTimeout(
24 checkBluesky,
25 msRandomOffset(msFrom.minutes(10), msFrom.minutes(90)),
26);
27await checkNotifications();