Skip to content

hrygo/hotplex-worker

HotPlex Worker Gateway

Go Reference Go Report Card codecov License

HotPlex Worker Gateway is a high-performance, unified access layer for managing AI Coding Agent sessions. It abstracts the differences between various agents (Claude Code, OpenCode CLI, etc.) and provides a standardized, stateful WebSocket interface.

🚀 Key Features

  • Unified Protocol: Implements AEP v1 (Agent Exchange Protocol) over WebSockets.
  • Session Management: Full lifecycle management (Create, Resume, Terminate, GC) with SQLite persistence.
  • Process Isolation: Secure execution using PGID isolation and built-in WAF for command injection protection.
  • Hot-Multiplexing: Persistent worker processes with zero-cold-start session resume.
  • Pluggable Workers: Support for Claude Code, OpenCode CLI, OpenCode Server, and more.
  • Admin API: Real-time stats, health monitoring, and dynamic configuration hot-reload.
  • Cloud Native: Built-in Prometheus metrics and OpenTelemetry tracing.

🏗 Architecture

HotPlex acts as a bridge between your clients (IDE, Web, CLI) and underlying AI agents.

graph TD
    Client[Client: Web / IDE / CLI] -- "WebSocket (AEP v1)" --> Gateway
    subgraph HotPlex Gateway
        Gateway[WS Gateway Layer]
        Session[Session Manager]
        Pool[Worker Pool]
    end
    Pool -- "stdio / HTTP" --> Claude[Claude Code]
    Pool -- "stdio / HTTP" --> OpenCode[OpenCode]
    Pool -- "stdio / HTTP" --> Pi[Pi Mono]
Loading

For more details, see the Architecture Overview.

🛠 Quick Start

Prerequisites

  • Go 1.26+
  • SQLite3

Installation

# Clone the repository
git clone https://github.com/hrygo/hotplex-worker.git
cd hotplex-worker

# Install dependencies
go mod download

# Build the gateway
make build

Running

# Start with default configuration
./bin/gateway --config configs/config.yaml

# Development mode (relaxed security)
./bin/gateway --dev

📖 Documentation

🤝 Contributing

We welcome contributions! Please see our CONTRIBUTING.md for guidelines on how to get started.

📜 License

HotPlex is released under the Apache License 2.0.


Built with ❤️ by the HotPlex Authors.

About

Worker module for HotPlex 1.0 - Session lifecycle management, task dispatch, and process isolation

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors