From 2a088cb0b9a6a49a08b029d1f14b83e84b3e73cc Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 5 May 2026 14:24:07 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20comprehensive=20README=20overhaul=20?= =?UTF-8?q?=E2=80=94=20streaming,=20self-correction,=20RTK,=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New streaming architecture section with ASCII pipeline diagrams - Self-correction loops documented (2 retries + backoff + auto-simplification) - RTK integration section (60-90% token savings) - Telegram HTML formatting system documented - Updated feature comparison table (all checkmarks accurate) - systemd service deployment guide added - Command reference table - Architecture flow diagrams --- README.md | 338 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 137 deletions(-) diff --git a/README.md b/README.md index 38e0d29c..a86188b4 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,44 @@ # zCode CLI X -Agentic coder with **Z.AI + Telegram integration** β€” Claude Code + Hermes in one beast. +Agentic coding assistant with **Z.AI + Telegram integration** β€” autonomous code execution with real-time streaming, self-correction loops, and RTK token optimization. > πŸ’‘ **Get 10% OFF Z.AI** β€” Use code **ROK78RJKNW** at [z.ai/subscribe](https://z.ai/subscribe?ic=ROK78RJKNW) for the Coding Plan -## πŸš€ Features +## ⚑ Features +### Core - **πŸ€– AI-Powered Code Generation**: Powered by Z.AI GLM-5.1 (Coding Plan) -- **πŸ“± Multi-Channel Bot**: Telegram + Discord with real-time delivery +- **πŸ“± Telegram Bot**: 24/7 via grammy + webhook with real-time SSE streaming - **πŸ› οΈ Full Engineering Access**: Bash, FileEdit, WebSearch, Git tools -- **🧠 Agent System**: Code reviewer, architect, DevOps engineer +- **🧠 Agent System**: Code Reviewer, System Architect, DevOps Engineer - **πŸ“š Skills System**: Pre-built skills for common tasks -- **⚑ Real-time Updates**: WebSocket-based live communication -- **πŸ”„ Self-Correction**: Automatic retry with backoff (2 retries) -- **πŸ“¦ Multi-Channel Delivery**: Hub-based message routing (Telegram + Discord + WebSocket + log) + +### Streaming & Formatting +- **⚑ Real-time SSE Streaming**: Token-by-token delivery via `StreamConsumer` β€” adapted from [Hermes Agent's GatewayStreamConsumer](https://github.com/nousresearch/hermes-agent) + - Queued token buffer β†’ rate-limited `editMessageText` loop (1s base interval) + - Adaptive backoff on Telegram flood control (429) + - Typing cursor `β–‰` during generation, clean final message + - Graceful fallback to plain send on repeated failures +- **🎨 Telegram HTML Formatting**: AI markdown β†’ clean Telegram HTML + - `**bold**`, `*italic*`, `` `code` ``, fenced code blocks, `[links](url)`, `~~strike~~`, headings, blockquotes, lists + - Double fallback: HTML β†’ stripped plain text (never shows raw `**`) + +### Reliability +- **πŸ”„ Self-Correction Loops**: Automatic retry with exponential backoff + - 2 retry attempts (500ms β†’ 1s β†’ 1.5s delay) + - Triggers: API errors, rate limits, timeouts, 5xx server errors + - Auto-simplification: prompts simplified on retry to avoid recurring errors + - Full logging of all retry attempts with reason tracking +- **πŸ›‘οΈ RTK (Rust Token Killer)**: Token optimization for supported commands + - 60-90% savings on git, npm, cargo, pytest, docker, and more + - Active tracking stats via `getTrackingStats()` + +### Architecture +- **πŸ“¨ Multi-Channel Delivery**: Hub-based routing (Telegram + Discord + WebSocket + log) +- **πŸ” Deduplication**: 60s TTL message deduplication +- **πŸ“‹ Request Queue**: Per-chat sequential processing (no race conditions) +- **πŸ”Œ MCP Protocol**: Full MCP client + server management +- **⏰ Cron Scheduling**: 1s interval, task locking, auto-recovery ## πŸ“¦ Installation @@ -35,10 +60,10 @@ cp .env.example .env ```env # Z.AI Configuration (Coding Plan) GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4 -ZAI_API_KEY=your_z...here +ZAI_API_KEY=*** # Telegram Bot Configuration -TELEGRAM_BOT_TOKEN=your_b...here +TELEGRAM_BOT_TOKEN=*** TELEGRAM_ALLOWED_USERS=your_telegram_id ZCODE_WEBHOOK_URL=https://your-domain.com/telegram/webhook ``` @@ -57,66 +82,115 @@ node bin/zcode.js node bin/zcode.js --bot ``` -### Run in Development Mode +### Run as systemd service -```bash -node bin/zcode.js --dev +```ini +# /etc/systemd/system/zcode.service +[Unit] +Description=zCode CLI X Bot +After=network.target + +[Service] +Type=simple +User=uroma2 +WorkingDirectory=/home/uroma2/zcode-cli-x +ExecStart=/usr/bin/node bin/zcode.js --bot +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target ``` -### Run Only CLI (No Bot) - ```bash -node bin/zcode.js --no-bot +sudo systemctl enable zcode +sudo systemctl start zcode ``` -## πŸ€– Telegram & Discord Bot +## πŸ€– Telegram Bot Commands -Once running, you can interact with zCode CLI X via multiple channels: +| Command | Description | +|---|---| +| `/start` | Show help and capabilities | +| `/tools` | List available tools | +| `/skills` | List loaded skills | +| `/agents` | List agent roles | +| `/model ` | Switch AI model | +| `/stats` | System & RTK stats | +| `/selfcorrection` | Self-correction status | +| `/bash ` | Execute shell command | +| `/web ` | Search the web | +| `/git ` | Git operations | +| `/cancel` | Cancel current operation | -### Telegram -1. Start the bot: `/start` -2. Send your code requests or questions -3. Receive AI-powered responses in real-time +Or just chat β€” zCode uses tools automatically when needed. -### Discord -1. Invite the bot to your server -2. Send commands or questions -3. Receive responses with full streaming support +## πŸ› οΈ Tools -### Multi-Channel Delivery -Messages are automatically delivered to: -- βœ… Telegram (primary) -- βœ… Discord -- βœ… WebSocket (real-time) -- βœ… Log file (structured) - -## πŸ› οΈ Tools Available - -- **Bash**: Execute shell commands -- **FileEdit**: Edit files with diff-aware operations -- **WebSearch**: Search the web for information -- **Git**: Git operations (status, log, branch) +| Tool | Description | +|---|---| +| **BashTool** | Shell command execution with timeout control | +| **FileEditTool** | Diff-aware file operations (read, write, patch) | +| **WebSearchTool** | Web search with result ranking | +| **GitTool** | Git operations (status, log, diff, commit, push, pull) | ## 🧠 Agents -- **Code Reviewer**: Review code for bugs and improvements -- **System Architect**: Design system architecture and patterns -- **DevOps Engineer**: Handle deployment, CI/CD, and infrastructure - -## πŸ“š Skills - -- **code_review**: Review code for bugs, security issues, and improvements -- **bug_fix**: Fix identified bugs in code -- **refactor**: Refactor code for better quality -- **documentation**: Generate and update documentation -- **testing**: Write tests for code +| Agent | Role | +|---|---| +| **Code Reviewer** | Review code for bugs, security issues, and improvements | +| **System Architect** | Design system architecture and patterns | +| **DevOps Engineer** | Handle deployment, CI/CD, and infrastructure | ## πŸ—οΈ Architecture -zCode CLI X uses a hybrid architecture combining: -- **better-clawd**: Coding backbone (BashTool, FileEditTool, WebSearchTool, GitTool) -- **Hermes Agent**: Agent system (Code Reviewer, Architect, DevOps) -- **claudegram**: Bot patterns (grammy, deduplication, request queuing, multi-channel delivery) +zCode CLI X uses a hybrid architecture: + +``` +User Message + β”‚ + β–Ό +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Telegram │────▢│ dedup.js │────▢│ request-queue β”‚ +β”‚ (grammy) β”‚ β”‚ (60s TTL) β”‚ β”‚ (per-chat seq) β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ self-correction β”‚ + β”‚ (2 retries + β”‚ + β”‚ backoff) β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β–Ό β–Ό β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ chatWithAI β”‚ β”‚ Tool β”‚ β”‚ Agent β”‚ + β”‚ (SSE stream) β”‚ β”‚ Handlers β”‚ β”‚ Delegation β”‚ + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β”Œβ”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β” + β–Ό β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ Stream β”‚ β”‚ sendFormattedβ”‚ + β”‚ Consumer β”‚ β”‚ (HTML mode) β”‚ + β”‚ (edit-in- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ place) β”‚ + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ markdown β”‚ + β”‚ ToHtml() β”‚ + β”‚ converter β”‚ + β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ + β–Ό + β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” + β”‚ Telegram API β”‚ + β”‚ (HTML mode) β”‚ + β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ +``` ### Core Components @@ -126,84 +200,70 @@ zcode-cli-x/ β”‚ └── zcode.js # CLI entry point β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ bot/ -β”‚ β”‚ β”œβ”€β”€ index.js # Telegram bot (grammy-based) +β”‚ β”‚ β”œβ”€β”€ index.js # Telegram bot (grammy + SSE streaming) +β”‚ β”‚ β”œβ”€β”€ message-sender.js # StreamConsumer + markdownToHtml converter β”‚ β”‚ β”œβ”€β”€ deduplication.js # Message deduplication (60s TTL) β”‚ β”‚ β”œβ”€β”€ request-queue.js # Per-chat request queuing -β”‚ β”‚ β”œβ”€β”€ message-sender.js # Message chunking (4k limit) β”‚ β”‚ β”œβ”€β”€ delivery-hub.js # Multi-channel delivery β”‚ β”‚ β”œβ”€β”€ discord.js # Discord integration (discord.js v14) -β”‚ β”‚ └── self-correction.js # Self-correction wrapper (2 retries) +β”‚ β”‚ └── self-correction.js # Self-correction wrapper (2 retries + backoff) β”‚ β”œβ”€β”€ api/ -β”‚ β”‚ └── index.js # Z.AI API adapter (GLM-5.1) +β”‚ β”‚ └── index.js # Z.AI API adapter (GLM-5.1, SSE support) β”‚ β”œβ”€β”€ tools/ -β”‚ β”‚ β”œβ”€β”€ BashTool.js # Shell command executor +β”‚ β”‚ β”œβ”€β”€ BashTool.js # Shell command executor (RTK-aware) β”‚ β”‚ β”œβ”€β”€ FileEditTool.js # File operations β”‚ β”‚ β”œβ”€β”€ WebSearchTool.js # Web search -β”‚ β”‚ └── GitTool.js # Git operations +β”‚ β”‚ └── GitTool.js # Git operations (RTK-aware) β”‚ β”œβ”€β”€ agents/ β”‚ β”‚ └── index.js # Agent orchestration β”‚ β”œβ”€β”€ skills/ β”‚ β”‚ └── index.js # Skills system β”‚ └── utils/ β”‚ β”œβ”€β”€ logger.js # Winston logger -β”‚ └── env.js # Environment validation +β”‚ β”œβ”€β”€ env.js # Environment validation +β”‚ └── rtk.js # RTK (Rust Token Killer) integration β”œβ”€β”€ .env # Configuration └── package.json ``` -### Bot Flow +### Bot Message Flow -1. **Message Reception**: Telegram/Discord messages β†’ `delivery-hub.js` -2. **Deduplication Check**: `deduplication.js` (60s TTL) +1. **Message Reception**: Telegram webhook β†’ grammy handler +2. **Deduplication**: `deduplication.js` (60s TTL, prevents double-processing) 3. **Request Queue**: `request-queue.js` (per-chat sequential processing) -4. **Self-Correction**: `self-correction.js` (2 retries + backoff) -5. **Agent Execution**: better-clawd tools + Hermes agents -6. **Response Delivery**: `message-sender.js` β†’ Multi-channel (Telegram + Discord + WebSocket + log) +4. **Self-Correction**: `self-correction.js` (2 retries + exponential backoff + auto-simplification) +5. **AI Chat + Streaming**: `chatWithAI()` β†’ SSE stream β†’ `StreamConsumer` β†’ real-time edits +6. **Formatting**: `markdownToHtml()` converts AI markdown β†’ Telegram HTML +7. **Final Delivery**: `editMessageText` with HTML parse_mode (or fallback to stripped plain text) -### Provider Support +### StreamConsumer Pipeline -- **Z.AI**: GLM-5.1 (Coding Plan) - Primary -- **Claude**: Anthropic Claude (via API) -- **OpenCode**: OpenCode CLI integration -- **Kilo**: Kilo.AI gateway - -## πŸ”— Integrations - -- **Z.AI API**: GLM-5.1 model with Coding Plan -- **Telegram Bot API**: grammy-based bot with auto-retry and runner -- **Discord.js v14**: Discord bot with GatewayIntentBits -- **Express.js**: HTTP server for webhook handling -- **Winston**: Structured logging -- **WebSocket**: Real-time updates -- **Mongoose**: Database persistence -- **Puppeteer**: Browser automation - -## πŸš€ Getting Started - -1. Install dependencies: - ```bash - npm install - ``` - -2. Configure `.env` with your credentials: - ```env - GLM_BASE_URL=https://api.z.ai/api/coding/paas/v4 - ZAI_API_KEY=your_zai_api_key - TELEGRAM_BOT_TOKEN=your_telegram_bot_token - TELEGRAM_ALLOWED_USERS=your_telegram_user_id - DISCORD_TOKEN=your_discord_bot_token - ``` - -3. Run the bot: - ```bash - node bin/zcode.js --bot - ``` - -4. Open Telegram and Discord to start chatting! - -## πŸ“ License - -MIT +``` +Z.AI API (SSE) + β”‚ + β–Ό onDelta(token) +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Token Buffer β”‚ ← accumulates tokens from SSE stream +β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ (every ~1s or 40 chars) + β–Ό +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ editMessage β”‚ ← plain text + cursor β–‰ (no parse_mode) +β”‚ Text() β”‚ rate-limited, adaptive backoff on flood +β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ + β”‚ (on finish) + β–Ό +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ markdownTo β”‚ ← converts **bold**, *italic*, `code`, etc. +β”‚ Html() β”‚ to , , ,
 HTML tags
+β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
+       β”‚
+       β–Ό
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ editMessage  β”‚  ← final message with parse_mode: 'HTML'
+β”‚ Text()       β”‚     fallback: stripped plain text (no raw **)
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
+```
 
 ## πŸ“Š Feature Comparison
 
@@ -213,47 +273,51 @@ MIT
 | Autonomous execution | βœ… Full autonomous mode | βœ… Full autonomous mode | ⚠️ Manual step-by-step |
 | Sub-agents | βœ… Multi-agent (swarm) | βœ… delegate_task + batch | ❌ Single agent only |
 | Agent roles | βœ… Code Reviewer, Architect, DevOps | βœ… Agent Registry (10+ roles) | ❌ Fixed single role |
-| Self-correction loops | ❌ None | βœ… Agent self-correction skill | ❌ None |
+| Self-correction loops | βœ… 2 retries + backoff + auto-simplification | βœ… Agent self-correction skill | ❌ None |
+| **Streaming** | | | |
+| Real-time SSE streaming | βœ… StreamConsumer (edit-in-place) | βœ… GatewayStreamConsumer | ❌ None |
+| Telegram HTML formatting | βœ… markdownToHtml + fallback | βœ… Native HTML support | ❌ None |
+| Adaptive flood control | βœ… Exponential backoff | βœ… Flood backoff | ❌ N/A |
 | **Tooling** | | | |
 | Bash/Shell | βœ… BashTool | βœ… TerminalTool | βœ… Shell access |
 | File editing | βœ… FileEditTool (diff-aware) | βœ… Patch + Write + Edit | ⚠️ Basic write |
 | Web search | βœ… WebSearch | βœ… WebSearch + Vane + Exa | ❌ None |
-| Git integration | βœ… GitTool | βœ… GitTool | ❌ None |
+| Git integration | βœ… GitTool (RTK-aware) | βœ… GitTool | ❌ None |
 | Browser automation | βœ… Computer-use (Anthropic) | βœ… Full browser toolkit | ❌ None |
-| MCP servers | βœ… Full MCP protocol (client + server management) | βœ… Native MCP + mcporter | ❌ None |
-| Code execution | βœ… Sandbox adapter | βœ… Sandbox + Jupyter | ❌ None |
-| **Skills** | | | |
-| Skill system | βœ… Skill system with skills dir loader | βœ… 500+ skills catalog | ❌ No skill system |
-| Custom skill authoring | βœ… Skillify (sessionβ†’skill capture) | βœ… skill_manage CLI | ❌ None |
-| Plugin architecture | βœ… Full marketplace + loader + lifecycle | βœ… Full plugin system | ❌ None |
-| **Automation** | | | |
-| Cron scheduling | βœ… CronScheduler (1s interval, jitter, locks) | βœ… Cron jobs with delivery | ❌ None |
-| Webhook subscriptions | βœ… Hook system (HTTP, agent, prompt hooks) | βœ… Event-driven agent runs | ❌ None |
-| Scheduled monitoring | βœ… Cron-based recurring monitoring | βœ… Browser + social monitors | ❌ None |
-| Batch task processing | βœ… Batch skill (5-30 parallel subagents) | βœ… Parallel batch delegation | ❌ None |
+| MCP servers | βœ… Full MCP protocol | βœ… Native MCP + mcporter | ❌ None |
+| RTK optimization | βœ… RTK active (60-90% savings) | βœ… RTK integrated | ❌ None |
 | **Platform** | | | |
-| Telegram integration | βœ… Native bot + webhook | βœ… 2-way Telegram bridge | ❌ None |
-| Discord | βœ… Native bot (via discord.js) | βœ… Full Discord integration | ❌ None |
-| Multi-channel delivery | βœ… Delivery hub (Telegram + Discord + WebSocket + log) | βœ… Cronβ†’Telegram/Discord/Email | ❌ None |
-| Self-correction loops | βœ… Self-correction wrapper (2 retries + backoff) | βœ… Agent self-correction skill | ❌ None |
+| Telegram integration | βœ… Native bot + webhook + streaming | βœ… 2-way Telegram bridge | ❌ None |
+| Discord | βœ… Native bot (discord.js) | βœ… Full Discord integration | ❌ None |
+| Multi-channel delivery | βœ… Delivery hub (TG + DC + WS + log) | βœ… Cronβ†’multi-platform | ❌ None |
 | **Infrastructure** | | | |
-| Model routing | βœ… Multi-provider (OpenAI, Anthropic, Bedrock, custom) | βœ… Multi-provider routing | ❌ Single model |
-| Context compression | βœ… Compact pipeline (auto, micro, session memory) | βœ… lean-ctx MCP (90% savings) | ❌ None |
-| Memory persistence | βœ… Session memory with background extraction | βœ… Cross-session memory | ❌ None |
-| RTK integration | βœ… RTK active | βœ… RTK integrated | ❌ None |
+| Model routing | βœ… Multi-provider | βœ… Multi-provider routing | ❌ Single model |
+| Context compression | βœ… Compact pipeline | βœ… lean-ctx MCP (90% savings) | ❌ None |
+| Memory persistence | βœ… Session memory | βœ… Cross-session memory | ❌ None |
+| Cron scheduling | βœ… 1s interval, jitter, locks | βœ… Cron jobs with delivery | ❌ None |
 
 ### Summary
 
-- **zCode CLI X** β€” Lightweight agentic coder focused on Telegram + Z.AI. Ideal for quick coding tasks via Telegram with essential tools and agent roles.
-- **Hermes Agent** β€” Full-stack AI assistant platform. Best for complex multi-agent workflows, scheduled automation, and cross-platform deployment. 500+ skills, MCP ecosystem, and the deepest toolset.
-- **better-clawd** β€” Minimal Claude Code clone. Useful as a lightweight reference but lacks the agentic, skills, and automation depth of zCode or Hermes.
+- **zCode CLI X** β€” Lightweight agentic coder focused on Telegram + Z.AI. Real-time SSE streaming, self-correction loops, RTK optimization, and beautiful HTML formatting. Ideal for quick coding tasks via Telegram.
+- **Hermes Agent** β€” Full-stack AI assistant platform. Best for complex multi-agent workflows, scheduled automation, and cross-platform deployment. 500+ skills, MCP ecosystem, deepest toolset.
+- **better-clawd** β€” Minimal Claude Code clone. Useful as a lightweight reference but lacks agentic depth.
+
+## πŸ”— Integrations
+
+- **Z.AI API**: GLM-5.1 model (Coding Plan) with SSE streaming
+- **Telegram Bot API**: grammy + auto-retry + runner + webhook
+- **Discord.js v14**: Discord bot with GatewayIntentBits
+- **Express.js**: HTTP server for webhook handling
+- **Winston**: Structured logging
+- **WebSocket**: Real-time updates
+- **RTK**: Rust Token Killer (token optimization)
 
 ## 🀝 Contributing
 
-Contributions welcome! This is based on:
-- [better-clawd](https://github.com/x1xhlol/better-clawd.git) - Claude Code clone
-- [Hermes Agent](https://hermes-agent.nousresearch.com) - Our AI assistant
+Contributions welcome! Based on:
+- [better-clawd](https://github.com/x1xhlol/better-clawd.git) β€” Claude Code clone
+- [Hermes Agent](https://hermes-agent.nousresearch.com) β€” AI assistant platform (streaming architecture credit)
 
 ---
 
-Built with ❀️ by zCode CLI X
+Built with ⚑ by zCode CLI X