FlowDot Daemon
@flowdot.ai/daemon is the shared background loop and goal scheduler library used by the FlowDot CLI and FlowDot Native app. It handles timed workflow execution, autonomous goal tracking, IPC between the daemon and local clients, and notifications — all as a pure Node.js library.
TL;DR - Quick Summary
- Install:
npm install "@flowdot.ai/daemon" - Package: npmjs.com/package/@flowdot.ai/daemon
- Source: github.com/ElliotTheGreek/flowdot-daemon
- Role: Shared background engine — loops, goals, IPC, notifications
- Who uses it: Consumed by the FlowDot CLI and Native app. Most users do not install this directly.
@flowdot.ai/daemon directly only if you are embedding the scheduler into your own Node.js application.
What It Does
- Loop scheduling — run FlowDot workflows on intervals, cron schedules, or one-shot triggers. Survives process restarts via persistent state.
- Goal tracking — break a high-level goal into milestones and tasks, resolve dependencies, track progress, and recover from errors automatically.
- IPC layer — clients (like the CLI) connect to the running daemon over a local socket to enqueue loops, check status, and stream logs.
- Notifiers — terminal notifications, webhooks, and Slack integration ship built-in.
- Crash-safe state — loop and goal state is persisted so nothing is lost if the daemon restarts.
The package has an optional peer dependency on @flowdot.ai/api — install that alongside if your integration needs to call the FlowDot REST API from inside a loop.
Installation
npm install "@flowdot.ai/daemon"
If you also need to make FlowDot API calls:
npm install "@flowdot.ai/daemon" "@flowdot.ai/api"
Requires Node.js 20 or newer. ESM only.
Usage
Basic shape of embedding the loop daemon in a custom Node process:
import {
LoopDaemon,
LoopManager,
createNotifier,
GoalManager,
} from '@flowdot.ai/daemon';
const notifier = createNotifier({ type: 'terminal' });
const daemon = new LoopDaemon({ notifier });
await daemon.start();
// Schedule a loop
await daemon.manager.createLoop({
name: 'nightly-digest',
schedule: '0 2 * * *', // cron
action: async () => {
// your work here
},
});
See the source repository for the full public API — the exports include LoopDaemon, LoopManager, LoopScheduler, GoalManager, TaskExecutor, IPCClient, IPCServer, and the notifier factory.