A background job
How it fits together

A background job

You save a note. Saving it queues a job to categorize and tag it. The same note is never queued twice, and the queue announces that there is work to do. The AI processing node, which asks the backend for work using its worker token, claims the job for a while, runs its local model, and reports back a category, a set of tags and how confident it is. The backend writes the keywords onto the note and announces that the job is done, which wakes any page waiting on it. The AI processing node pages cover the node itself.