Job System

Manage background job execution with asynchronous task processing and SSE event streaming.

21|4|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/arunoda/OkBrain --skill job-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Job System
Source: https://github.com/arunoda/OkBrain/tree/main/.agent/skills/job_system
Command: npx skills add https://github.com/arunoda/OkBrain --skill job-system

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust background job processing system that allows for long-running tasks to be executed asynchronously, with real-time event streaming for progress updates and results.

Core Features & Use Cases

  • Asynchronous Task Execution: Offload time-consuming operations from the main application thread.
  • Real-time Event Streaming: Monitor job progress and receive updates as they happen via Server-Sent Events (SSE).
  • Job State Management: Track jobs through various states like idle, running, stopped, succeeded, and failed.
  • Worker System: Define and register custom workers to handle specific job types.
  • Use Case: Processing large data imports, generating complex reports, or performing AI model inference that takes significant time, all while providing immediate feedback to the user.

Quick Start

Create a new job of type 'my-job-type' and start it with the input payload { message: 'Hello!' }.

Frequently Asked Questions about Job System

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

FAQPage Schema
How do I run background jobs with real-time progress streaming?

Background jobs with real-time progress streaming are executed by defining job types and registering worker handlers that process tasks asynchronously. Progress updates are pushed to clients via Server-Sent Events (SSE), enabling live monitoring of long-running operations.

Can I offload long-running operations like data imports from the main application thread?

Long-running operations like large data imports and complex report generation are offloaded from the main application thread using asynchronous task execution. The job system manages the lifecycle, allowing the main thread to remain unblocked while workers process heavy computations.

How do I track asynchronous task states like running or failed?

Asynchronous task states are tracked through a built-in state management system that monitors jobs across stages like idle, running, stopped, succeeded, and failed. This allows you to query the current status and handle state transitions for distributed task management.

How do I define custom workers for specific background job types?

Custom workers for specific background job types are defined and registered within the job system to handle targeted task processing. You create a new job, specify its type, and start it with an input payload that the designated worker handler consumes.

What is the best way to provide immediate user feedback during AI model inference?

Immediate user feedback during AI model inference is provided through real-time event streaming via Server-Sent Events (SSE). By offloading the inference to a background job, users receive live progress updates instead of waiting for the entire computation to finish.

Do I need external dependencies to manage distributed task processing?

External dependencies are not required to manage distributed task processing, as the job system operates independently. It provides built-in worker registration, job state management, and streaming support without relying on external libraries or packages.