distributed-workers

Orchestrate distributed workers for backtest and training operations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kpiteira/ktrdr --skill distributed-workers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: distributed-workers
Source: https://github.com/kpiteira/ktrdr/tree/main/.claude/skills/distributed-workers
Command: npx skills add https://github.com/kpiteira/ktrdr --skill distributed-workers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains the distributed architecture of KTRDR, enabling users to understand, implement, and debug worker-based operations for scalable and efficient execution of computationally intensive tasks like backtesting and training.

Core Features & Use Cases

  • Architecture Overview: Clearly defines the roles of the backend orchestrator and various worker types (Backtest, Training, Host Services) and their communication patterns.
  • ServiceOrchestrator Pattern: Details how service managers handle environment-based configuration, adapter initialization, and unified async operations with progress and cancellation support.
  • WorkerAPIBase Pattern: Describes the foundational base class for all workers, providing automatic operation tracking, health endpoints, and self-registration with the backend.
  • Use Case: When adding a new type of computationally intensive analysis, use this skill to understand how to create a new worker type that integrates seamlessly with the backend, registers its capabilities, and supports progress tracking and cancellation.

Quick Start

I need to add a new worker type for a custom data processing task. Use the distributed-workers skill to guide me on implementing the WorkerAPIBase pattern.

Frequently Asked Questions about distributed-workers

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

FAQPage Schema
How do I orchestrate distributed workers to scale computationally intensive tasks?

Orchestrate distributed workers by deploying a central ServiceOrchestrator that dispatches operations to heterogeneous workers (Backtest, Training, Host Services) across containers and native hosts. The pattern provides progress tracking, cancellation support, and GPU-first routing to reliably execute and monitor scalable workloads.

What's the best way to implement self-registering workers with async progress tracking?

Implement workers using the WorkerAPIBase pattern, which provides automatic operation tracking, health endpoints, and push-based self-registration with the backend orchestrator. This abstraction handles async operations, progress bridges, and cancellation lifecycle endpoints out of the box.

Can I use FastAPI with distributed worker orchestration for microservices?

Yes. FastAPI integrates with the distributed-workers pattern through the ServiceOrchestrator and WorkerAPIBase abstractions, supporting environment-based configuration, remote queryability, and async operation handling across microservices and heterogeneous compute environments.

How do I add a new worker type for custom analysis tasks?

Create a new worker type by extending the WorkerAPIBase pattern to inherit automatic operation tracking and self-registration. Implement your analysis logic, define health and progress endpoints, and the worker will integrate seamlessly with the central orchestrator for distributed execution.

What's required to support GPU-first routing and progress cancellation in distributed systems?

The pattern provides built-in progress bridges and operation lifecycle endpoints that enable GPU-first routing decisions and cancellation handling. Configure workers with environment-based settings and the orchestrator automatically manages resource allocation and cancellation propagation.

When should I use distributed workers instead of monolithic backend processing?

Use distributed workers for scalable, computationally intensive tasks like backtesting and training where heterogeneous processing needs—GPUs, native hosts, containers—must coordinate reliably. The pattern excels when you need progress tracking, cancellation support, and independent worker health management.