Skip to content

hrygo/hotplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

498 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HotPlex

HotPlex

AI Agent Control Plane — Turn AI CLIs into Production-Ready Services

Release Go Reference Go Report License Stars

Quick StartFeaturesDocsSlack Guide简体中文


Overview

HotPlex transforms AI CLI tools (Claude Code, OpenCode) from "run-and-exit" commands into persistent, stateful services with full-duplex streaming.

Why HotPlex?

  • Zero Spin-up Overhead — Eliminate 3-5 second CLI cold starts with persistent session pooling
  • Cli-as-a-Service — Continuous instruction flow and context preservation across interactions
  • Production-Ready Security — Regex WAF, PGID process isolation, and filesystem boundaries
  • Multi-Platform ChatApps — Native Slack, Telegram, Feishu, DingTalk integration
  • Simple Integration — Go SDK embedding or standalone WebSocket server

Quick Start

Prerequisites

  • Go 1.25+
  • Claude Code CLI or OpenCode CLI (optional, for AI capabilities)

Install

# One-click install (Linux / macOS / WSL)
curl -sL https://raw.githubusercontent.com/hrygo/hotplex/main/install.sh | bash

More options: specific version, custom directory, dry-run - see INSTALL.md.

Configure

# Copy example environment
cp .env.example .env

# Edit with your credentials
# For ChatApps, configure chatapps/configs/*.yaml

Run

# Start with ChatApps (recommended for production)
./dist/hotplexd --config chatapps/configs

# Or start standalone server
./dist/hotplexd

That's it! Your AI agent service is now running.

Features

Feature Description
Session Pooling Long-lived CLI processes with instant reconnection
Full-Duplex Streaming Sub-second token delivery via Go channels
Regex WAF Block destructive commands (rm -rf /, mkfs, etc.)
PGID Isolation Clean process termination, no zombie processes
ChatApps Slack (Block Kit, Streaming, Assistant Status), Telegram, Feishu, DingTalk
Go SDK Embed directly in your Go application with zero overhead
WebSocket Gateway Language-agnostic access via hotplexd daemon
OpenTelemetry Built-in metrics and tracing support

Architecture

┌─────────────────────────────────────────────────────────────┐
│                      Access Layer                           │
│         Go SDK  │  WebSocket  │  ChatApps Adapters          │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                      Engine Layer                           │
│    Session Pool  │  Config Manager  │  Security WAF         │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                     Process Layer                           │
│    Claude Code  │  OpenCode  │  Isolated Workspaces         │
└─────────────────────────────────────────────────────────────┘

Usage Examples

Go SDK

import "github.com/hrygo/hotplex"

engine, _ := hotplex.NewEngine(hotplex.EngineOptions{
    Timeout: 5 * time.Minute,
})

engine.Execute(ctx, cfg, "Refactor this function", func(event Event) {
    fmt.Println(event.Content)
})

ChatApps (Slack)

# chatapps/configs/slack.yaml
platform: slack
mode: socket
bot_user_id: ${HOTPLEX_SLACK_BOT_USER_ID}
system_prompt: |
  You are a helpful coding assistant.
export HOTPLEX_SLACK_BOT_USER_ID=B12345
export HOTPLEX_SLACK_BOT_TOKEN=xoxb-...
export HOTPLEX_SLACK_APP_TOKEN=xapp-...
hotplexd --config chatapps/configs

Documentation

Resource Description
Architecture Deep Dive System design, security protocols, session management
SDK Developer Guide Complete Go SDK reference
ChatApps Manual Multi-platform integration (Slack, DingTalk, Feishu)
Slack Beginner Guide Zero-to-Hero Slack setup
Docker Multi-Bot Deployment Run multiple bots with one command
Docker Deployment Container and Kubernetes deployment
Production Guide Production best practices

Security

HotPlex employs defense-in-depth security:

Layer Implementation Protection
Tool Governance AllowedTools config Restrict agent capabilities
Danger WAF Regex interception Block rm -rf /, mkfs, dd
Process Isolation PGID-based termination No orphaned processes
Filesystem Jail WorkDir lockdown Confined to project root

Contributing

We welcome contributions! Please ensure CI passes:

make lint    # Run golangci-lint
make test    # Run unit tests

See CONTRIBUTING.md for guidelines.

License

Released under the MIT License.


Built for the AI Engineering community.