CROW (Cron-Routine-Orchestrator-Webapp) is a distributed task execution and orchestration system. This repository contains the CROW-Client, a lightweight WebSocket-based agent that runs on client machines to execute tasks dispatched by the CROW-Server.
CROW-Client is a Python-based task execution agent that:
- Runs as a WebSocket server on the client machine
- Receives task execution requests from the CROW-Server
- Executes tasks with proper error handling and status reporting
- Provides real-time bidirectional communication via WebSockets
- Handles concurrent task requests asynchronously
- Async WebSocket Communication: Non-blocking WebSocket server for reliable task delivery
- Task Execution: Flexible task parsing and execution framework
- Error Handling: Comprehensive error handling with detailed status codes and messages
- Lightweight: Minimal dependencies - only requires
asyncio,pydantic, andwebsockets - Production-Ready: Type-safe request/response validation using Pydantic
- Easy Integration: Simple CLI startup and configuration
CROW Client can be installed with a single command on all major operating systems. The installer scripts are fetched directly from this repository and executed locally.
This executes a remote script from this repository. Only run it if you trust the source.
curl -fsSL https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_linux.sh | bashcurl -fsSL https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_macos.sh | bashRun in PowerShell:
iwr https://raw.githubusercontent.com/Cron-Routine-Orchestrator-Webapp/CROW-Client/main/installer/install_windows.ps1 -UseBasicParsing | iexEach installer will:
- Fetch the latest release from GitHub
- Download the correct platform ZIP asset
- Extract the
crow-clientexecutable - Install it into a user-local directory
- Register it for auto-start:
- Linux:
systemd --user - macOS:
launchd - Windows: Startup folder shortcut
- Linux:
- The client will start and listen on
0.0.0.0:1237for incoming task requests from the CROW-Server.
- Linux:
~/.local/share/crow-client - macOS:
~/Library/Application Support/crow-client - Windows:
%APPDATA%\crow-client
Re-run the same command to update to the latest version. The installer will replace the existing installation with the newest release automatically.
CROW-Client Architecture:
βββββββββββββββββββββββββββββββββββββββ
β WebSocket Server (Port 5000) β
β Listens for task requests β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Request Parser & Validator β
β (Using Pydantic Models) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Task Executor β
β Parses and executes commands β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Response Builder & Sender β
β Returns status + execution output β
βββββββββββββββββββββββββββββββββββββββ
- Python: 3.10 or higher
- Dependencies:
asyncio>= 4.0.0 - Asynchronous I/O supportpydantic>= 2.13.4 - Data validation and serializationwebsockets>= 16.0 - WebSocket protocol implementation
src/client/
βββ __init__.py # Package initialization
βββ __main__.py # Entry point - starts WebSocket server
βββ communication/
β βββ __init__.py
β βββ web_sockets.py # WebSocket server implementation
βββ exec_handling/
β βββ __init__.py
β βββ executor.py # Task execution logic
βββ helper/
βββ __init__.py
βββ types.py # Pydantic models (Request, Response)
The client expects requests in JSON format matching the Request model:
PID: Process ID for trackingACTION_TYPE: Type of action to execute[other fields]: Action-specific parameters
Responses are sent back in JSON format with:
STATUS: "success" or "error"CODE: HTTP-style status code (200, 500, etc.)PID: Process ID from the requestACTION_TYPE: The action that was executedOUTPUT: Execution result or error message
For detailed documentation and API reference, visit:
- CROW-Server - The orchestration server that dispatches tasks to clients
- CROW Organization - Main organization repository
We welcome contributions! Please see our Contributing Guidelines for details on:
- How to submit issues
- How to create pull requests
- Code standards and best practices
This project adheres to the Contributor Covenant Code of Conduct.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check the documentation
- Review existing discussions in the repository