a tool to help your Letta AI agents navigate bluesky
at main 1.0 kB view raw
1import { logStats } from "./tasks/logStats.ts"; 2import { logTasks } from "./tasks/logTasks.ts"; 3import { msFrom, msRandomOffset, msUntilDailyWindow } from "./utils/time.ts"; 4import { sendSleepMessage } from "./tasks/sendSleepMessage.ts"; 5import { sendWakeMessage } from "./tasks/sendWakeMessage.ts"; 6import { agentContext } from "./utils/agentContext.ts"; 7import { runReflection } from "./tasks/runReflection.ts"; 8import { checkBluesky } from "./tasks/checkBluesky.ts"; 9import { checkNotifications } from "./tasks/checkNotifications.ts"; 10 11setTimeout(logStats, msFrom.minutes(30)); 12 13setTimeout( 14 logTasks, 15 msFrom.minutes(100), 16); 17setTimeout( 18 sendSleepMessage, 19 msUntilDailyWindow(agentContext.sleepTime, 0, msFrom.minutes(30)), 20); 21setTimeout( 22 sendWakeMessage, 23 msUntilDailyWindow(agentContext.wakeTime, 0, msFrom.minutes(30)), 24); 25setTimeout( 26 runReflection, 27 msRandomOffset(msFrom.minutes(120), msFrom.minutes(240)), 28); 29setTimeout( 30 checkBluesky, 31 msRandomOffset(msFrom.minutes(45), msFrom.minutes(90)), 32); 33await checkNotifications();