AI Agent Control Plane — Turn AI CLIs into Production-Ready Services
Quick Start • Features • Docs • Slack Guide • 简体中文
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
- Go 1.25+
- Claude Code CLI or OpenCode CLI (optional, for AI capabilities)
# One-click install (Linux / macOS / WSL)
curl -sL https://raw.githubusercontent.com/hrygo/hotplex/main/install.sh | bashMore options: specific version, custom directory, dry-run - see INSTALL.md.
# Copy example environment
cp .env.example .env
# Edit with your credentials
# For ChatApps, configure chatapps/configs/*.yaml# Start with ChatApps (recommended for production)
./dist/hotplexd --config chatapps/configs
# Or start standalone server
./dist/hotplexdThat's it! Your AI agent service is now running.
| 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 |
┌─────────────────────────────────────────────────────────────┐
│ Access Layer │
│ Go SDK │ WebSocket │ ChatApps Adapters │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Engine Layer │
│ Session Pool │ Config Manager │ Security WAF │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Process Layer │
│ Claude Code │ OpenCode │ Isolated Workspaces │
└─────────────────────────────────────────────────────────────┘
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/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| 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 |
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 |
We welcome contributions! Please ensure CI passes:
make lint # Run golangci-lint
make test # Run unit testsSee CONTRIBUTING.md for guidelines.
Released under the MIT License.