能力标签
开源AI工作流
⚙️
Agent工作流

开源AI工作流

基于 TypeScript · 无代码搭建完整 AI 自动化流程
英文名:opencode-telegram-bot
⭐ 725 Stars 🍴 125 Forks 💻 TypeScript 📄 MIT 🏷 AI 7.5分
7.5AI 综合评分
ai-agentautonomous-agentcoding-agentdeveloper-tools
✦ AI Skill Hub 推荐

开源AI工作流 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

开源AI工作流 是一套完整的 AI Agent 自动化工作流方案。随着 AI 能力的不断提升,基于 Agent 的自动化工作流正在成为提升个人和团队效率的核心方式。区别于传统的 RPA 自动化(模拟鼠标键盘操作),AI Agent 工作流通过理解任务意图、动态规划执行路径,能够处理更复杂的非结构化任务。

开源AI工作流 工作流的设计遵循"最小配置,最大复用"原则:核心逻辑已经封装好,用户只需配置自己的 API Key 和业务参数即可快速上手。工作流内置错误处理和重试机制,在网络波动或 API 限速等情况下仍能稳定运行,适合作为生产环境的自动化基础设施。

在实际部署时,建议先在测试环境中运行 3-5 次,验证各个环节的输出结果符合预期,再部署到生产环境。AI Skill Hub 评分 7.5 分,是同类 Agent 工作流中的精选推荐。

📋 工具概览

通过Telegram运行和监控AI编码任务

开源AI工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

GitHub Stars
⭐ 725
开发语言
TypeScript
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
MIT
AI 综合评分
7.5 分
工具类型
Agent工作流
Forks
125

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

通过Telegram运行和监控AI编码任务

开源AI工作流 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

📌 核心特色
  • 可视化 Agent 工作流编排,无需编写复杂代码
  • 支持多步骤自动化任务链,实现全流程无人值守
  • 与外部 API、数据库和第三方服务无缝集成
  • 内置错误处理与自动重试机制,保障稳定运行
  • 提供可复用的自动化模板,快速在同类场景部署
🎯 主要使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:npm 全局安装
npm install -g opencode-telegram-bot

# 方式二:npx 直接运行(无需安装)
npx opencode-telegram-bot --help

# 方式三:项目依赖安装
npm install opencode-telegram-bot

# 方式四:从源码运行
git clone https://github.com/grinev/opencode-telegram-bot
cd opencode-telegram-bot
npm install
npm start
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
opencode-telegram-bot --help

# 基本用法
opencode-telegram-bot [options] <input>

# Node.js 代码中使用
const opencode_telegram_bot = require('opencode-telegram-bot');

const result = await opencode_telegram_bot.run(options);
console.log(result);
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# opencode-telegram-bot 配置说明
# 查看配置选项
opencode-telegram-bot --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export OPENCODE_TELEGRAM_BOT_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 70/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

OpenCode Telegram Bot

npm version CI License: MIT Node.js Follow updates Community

OpenCode Telegram Bot is a secure Telegram client for OpenCode CLI that runs on your local machine.

Run AI coding tasks, monitor progress, switch models, and manage sessions from your phone.

No open ports, no exposed APIs. The bot communicates with your local OpenCode server and the Telegram Bot API only.

Scheduled tasks support. Turns the bot into a lightweight OpenClaw alternative for OpenCode users.

Platforms: macOS, Windows, Linux

Languages: English (en), Deutsch (de), Español (es), Français (fr), Русский (ru), 简体中文 (zh)

<p align="center"> <img src="assets/screencast.gif" width="45%" alt="OpenCode Telegram Bot screencast" /> </p>

Features

  • Remote coding — send prompts to OpenCode from anywhere, receive complete results with code sent as files
  • Session management — create new sessions or continue existing ones, just like in the TUI
  • Track live session — follow a live OpenCode CLI session; see Track Existing Session
  • Background session notifications — get short notifications when detached or non-current sessions in the current project/worktree reply, ask questions, or request permissions
  • Live status — pinned message with current project/worktree, model, context usage, and changed files list, updated in real time
  • Model switching — pick models from OpenCode favorites and recent history directly in the chat (favorites are shown first)
  • Agent modes — switch between Plan and Build modes on the fly
  • Subagent activity — watch live subagent progress in chat, including the current task, agent, model, and active tool step
  • Custom Commands — run OpenCode custom commands (and built-ins like init/review) from an inline menu with confirmation
  • Skills Catalog — browse OpenCode skills from an inline menu and run them immediately or with arguments in the next message
  • Interactive Q&A — answer agent questions and approve permissions via inline buttons
  • Voice prompts — send voice/audio messages, transcribe them via a Whisper-compatible API, and optionally enable spoken replies with /tts
  • File attachments — send images, PDF documents, and text-based files to OpenCode, including multiple files in one Telegram album
  • Scheduled tasks — schedule prompts to run later or on a recurring interval; see Scheduled Tasks
  • Context control — compact context when it gets too large, right from the chat
  • Input flow control — when an interactive flow is active, the bot accepts only relevant input to keep context consistent and avoid accidental actions
  • Git worktree switching — browse and switch between existing git worktrees for the current repository with /worktree
  • Security — strict user ID whitelist; no one else can access your bot, even if they find it
  • Localization — UI localization is supported for multiple languages (BOT_LOCALE)
  • Interactive file browser — use /ls to browse files and directories inside the current project, open subdirectories, go back, and download files by tapping them

Planned features currently in development are listed in Current Task List.

Prerequisites

  • Node.js 20+download
  • OpenCode — install from opencode.ai or GitHub
  • Telegram Bot — you'll create one during setup (takes 1 minute)

3. Install & Run

The fastest way — run directly with npx:

npx @grinev/opencode-telegram-bot@latest
Note: This README tracks the main branch, which may include unreleased changes. The latest npm release may not include every feature described here yet. See recent commits on main.
Quick start is for npm usage. You do not need to clone this repository. If you run this command from the source directory (repository root), it may fail with opencode-telegram: not found. To run from sources, use the Development section.

On first launch, an interactive wizard will guide you through the configuration — it asks for interface language first, then your bot token, user ID, OpenCode API URL, and optional OpenCode server credentials (username/password). After that, you're ready to go. Open your bot in Telegram and start sending tasks.

Alternative: Global Install

npm install -g @grinev/opencode-telegram-bot
opencode-telegram start

start runs in the foreground by default. This is the recommended mode for systemd, Docker, local debugging, and other external process managers.

To run the bot in the built-in background mode instead:

opencode-telegram start --daemon
opencode-telegram status
opencode-telegram stop
Built-in daemon mode is intended for standalone npm installs without an external supervisor. For systemd, pm2, or Docker, keep using opencode-telegram start without --daemon.

For Linux systemd setup, see docs/LINUX_SYSTEMD_SETUP.md.

To reconfigure at any time:

opencode-telegram config

Quick Start

Configuration

Environment Variables

When installed via npm, the configuration wizard handles the initial setup. The .env file is stored in your platform's app data directory:

  • macOS: ~/Library/Application Support/opencode-telegram-bot/.env
  • Windows: %APPDATA%\opencode-telegram-bot\.env
  • Linux: ~/.config/opencode-telegram-bot/.env
VariableDescriptionRequiredDefault
TELEGRAM_BOT_TOKENBot token from @BotFatherYes
TELEGRAM_ALLOWED_USER_IDYour numeric Telegram user IDYes
TELEGRAM_PROXY_URLProxy URL for Telegram API (SOCKS5/HTTP)No
TELEGRAM_API_ROOTCustom Telegram Bot API root URL (e.g. nginx reverse-proxying api.telegram.org); applied to API calls and file downloadsNohttps://api.telegram.org
TELEGRAM_PROXY_SECRETShared secret sent as X-Proxy-Secret header on every Bot API request and file download (used with TELEGRAM_API_ROOT)No
TELEGRAM_FORCE_IPV4Force IPv4 for direct Telegram API and file requests; useful when IPv6 DNS works but outbound IPv6 is brokenNofalse
OPENCODE_API_URLOpenCode server URLNohttp://localhost:4096
OPENCODE_AUTO_RESTART_ENABLEDAutomatically restart a local OpenCode server when health-checks failNofalse
OPENCODE_MONITOR_INTERVAL_SECHealth monitor interval in seconds when OpenCode auto-restart is enabledNo300
OPENCODE_SERVER_USERNAMEServer auth usernameNoopencode
OPENCODE_SERVER_PASSWORDServer auth passwordNo
OPENCODE_MODEL_PROVIDERDefault model providerYesopencode
OPENCODE_MODEL_IDDefault model IDYesbig-pickle
BOT_LOCALEBot UI language (supported locale code, e.g. en, de, es, fr, ru, zh)Noen
SESSIONS_LIST_LIMITSessions per page in /sessionsNo10
MESSAGES_LIST_LIMITUser messages per page in /messagesNo10
PROJECTS_LIST_LIMITProjects per page in /projectsNo10
OPEN_BROWSER_ROOTSComma-separated paths /open is allowed to browse (supports ~)No~ (home directory)
COMMANDS_LIST_LIMITItems per page in /commands and /skillsNo10
TASK_LIMITMaximum number of scheduled tasks that can exist at onceNo10
SCHEDULED_TASK_EXECUTION_TIMEOUT_MINUTESMaximum time the bot waits for one scheduled task run before marking it failedNo120
BASH_TOOL_DISPLAY_MAX_LENGTHMaximum displayed length for bash tool commands in Telegram summaries; longer commands are truncatedNo128
SERVICE_MESSAGES_INTERVAL_SECService messages interval (thinking + tool calls); keep >=2 to avoid Telegram rate limits, 0 = immediateNo5
HIDE_THINKING_MESSAGESHide 💭 Thinking... service messagesNofalse
HIDE_TOOL_CALL_MESSAGESHide tool-call service messages (💻 bash ..., 📖 read ..., etc.)Nofalse
HIDE_TOOL_FILE_MESSAGESHide file edit documents sent as .txt attachments (edit_*.txt, write_*.txt)Nofalse
TRACK_BACKGROUND_SESSIONSTrack detached/non-current sessions in the current selected project/worktree and send short notificationsNotrue
RESPONSE_STREAMINGStream assistant replies while they are generated across one or more Telegram messagesNotrue
MESSAGE_FORMAT_MODEAssistant reply formatting mode: markdown (Telegram MarkdownV2) or rawNomarkdown
CODE_FILE_MAX_SIZE_KBMax file size (KB) to send as documentNo100
STT_API_URLWhisper-compatible API base URL (enables voice/audio transcription)No
STT_API_KEYAPI key for your STT providerNo
STT_MODELSTT model name passed to /audio/transcriptionsNowhisper-large-v3-turbo
STT_LANGUAGEOptional language hint (empty = provider auto-detect)No
STT_NOTE_PROMPTOptional note prepended to the LLM prompt as [Note: ...] for voice transcriptions; empty / false / 0 disable itNo
TTS_PROVIDERTTS provider: openai for OpenAI-compatible APIs or google for Google Cloud TTSNoopenai
TTS_API_URLOpenAI-compatible TTS API base URLNo
TTS_API_KEYOpenAI-compatible TTS API keyNo
TTS_MODELOpenAI-compatible TTS model name passed to /audio/speechNogpt-4o-mini-tts
TTS_VOICETTS voice name. Defaults to alloy for OpenAI-compatible APIs and en-US-Studio-O for Google Cloud TTSNoprovider-specific
GOOGLE_APPLICATION_CREDENTIALSPath to a Google Cloud service account JSON key file for TTS_PROVIDER=googleNo
LOG_LEVELLog level (debug, info, warn, error)Noinfo
LOG_RETENTIONNumber of log files to keep: launch files in sources, daily files in installedNo10
Keep your .env file private. It contains your bot token. Never commit it to version control.

Logs are written to ./logs when running from sources and to the runtime config directory logs/ folder in installed mode. Log rotation depends on runtime mode: sources creates one file per bot launch, while installed appends to one file per day. Old log files are removed according to LOG_RETENTION.

Reverse Proxy (Optional)

For environments that block api.telegram.org but allow your own HTTPS endpoint (corporate networks, restricted regions), you can route Bot API traffic through a reverse proxy you control. This is an alternative to the SOCKS/HTTP forward proxy configured with TELEGRAM_PROXY_URL.

Set TELEGRAM_API_ROOT to your reverse-proxy URL — both Bot API calls and file downloads (including voice/audio files) will use it. Optionally set TELEGRAM_PROXY_SECRET so the bot sends an X-Proxy-Secret header your proxy can use to authorize callers.

.env:

TELEGRAM_API_ROOT=https://tg-proxy.yourdomain.com
TELEGRAM_PROXY_SECRET=some-long-random-string

Example nginx config:

server {
    listen 443 ssl http2;
    server_name tg-proxy.yourdomain.com;

    ssl_certificate     /etc/letsencrypt/live/tg-proxy.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/tg-proxy.yourdomain.com/privkey.pem;

    access_log off;  # the bot token appears in URL paths
    client_max_body_size 50m;

    if ($http_x_proxy_secret != "some-long-random-string") { return 403; }

    location / {
        proxy_pass https://api.telegram.org;
        proxy_ssl_server_name on;
        proxy_set_header Host api.telegram.org;
    }
}

TELEGRAM_API_ROOT and TELEGRAM_PROXY_URL are alternative connectivity modes — the former picks the URL the bot connects to (a reverse proxy on your side), while the latter tunnels TCP through a forward proxy. Configure only one of them; the bot rejects using both at startup.

Force IPv4 for Telegram (Optional)

If the bot fails during startup with errors such as Network request for 'setMyCommands' failed or Network request for 'getWebhookInfo' failed, and the same machine has broken outbound IPv6 connectivity, force direct Telegram requests to use IPv4:

TELEGRAM_FORCE_IPV4=true

This affects direct Bot API calls and Telegram file downloads. It is not a replacement for TELEGRAM_PROXY_URL or TELEGRAM_API_ROOT when Telegram is blocked by the network.

Voice and Audio Transcription (Optional)

If STT_API_URL and STT_API_KEY are set, the bot will:

  1. Accept voice and audio Telegram messages
  2. Transcribe them via POST {STT_API_URL}/audio/transcriptions
  3. Show recognized text in chat
  4. Send the recognized text to OpenCode as a normal prompt

If STT_NOTE_PROMPT is set to a non-empty value other than false or 0, the bot prepends [Note: ...] to the transcription before sending it to the LLM. The recognized text shown in Telegram stays unchanged.

If TTS credentials are configured, you can toggle spoken replies globally with /tts. The preference is stored in settings.json and persists across restarts.

OpenAI-compatible TTS configuration example:

TTS_PROVIDER=openai
TTS_API_URL=https://api.openai.com/v1
TTS_API_KEY=your-tts-api-key
TTS_MODEL=gpt-4o-mini-tts
TTS_VOICE=alloy

Google Cloud TTS configuration example:

TTS_PROVIDER=google
TTS_VOICE=en-US-Studio-O
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json

Supported provider examples (Whisper-compatible):

  • OpenAI
  • STT_API_URL=https://api.openai.com/v1
  • STT_MODEL=whisper-1
  • Groq
  • STT_API_URL=https://api.groq.com/openai/v1
  • STT_MODEL=whisper-large-v3-turbo
  • Together
  • STT_API_URL=https://api.together.xyz/v1
  • STT_MODEL=openai/whisper-large-v3

If STT variables are not set, voice/audio transcription is disabled and the bot will ask you to configure STT.

Model Configuration

The model picker uses OpenCode local model state (favorite + recent):

  • Favorites are shown first, then recent
  • Models already in favorites are not duplicated in recent
  • Current model is marked with
  • Default model from OPENCODE_MODEL_PROVIDER + OPENCODE_MODEL_ID is always included in favorites

To add a model to favorites, open OpenCode TUI (opencode), go to model selection, and press Cmd+F/Ctrl+F on the model.

Edit .env with your bot token, user ID, and model settings


Build and run:
bash npm run dev ```

Troubleshooting

Bot doesn't respond to messages

  • Make sure TELEGRAM_ALLOWED_USER_ID matches your actual Telegram user ID (check with @userinfobot)
  • Verify the bot token is correct

"OpenCode server is not available"

  • Ensure an OpenCode server is running at the configured OPENCODE_API_URL (default: http://localhost:4096)
  • For a local setup, you can start it with opencode serve or use /opencode_start in Telegram
  • For VPS/systemd setups with scheduled tasks, enable OPENCODE_AUTO_RESTART_ENABLED=true to let the bot restart a local OpenCode server when health-checks fail
  • If OPENCODE_API_URL points to a remote server, verify that the address is reachable from the bot machine and that the remote server is healthy

No models in model picker

  • Add models to your OpenCode favorites: open OpenCode TUI, go to model selection, press Ctrl+F on desired models
  • Verify OPENCODE_MODEL_PROVIDER and OPENCODE_MODEL_ID point to an available model in your setup

Linux: permission denied errors

  • Make sure the CLI binary has execute permission: chmod +x $(which opencode-telegram)
  • Check that the config directory is writable: ~/.config/opencode-telegram-bot/
🎯 aiskill88 AI 点评 A 级 2026-05-29

高质量的开源AI工作流项目

📚 实用指南(长尾问题)
适合谁
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
opencode-telegram-bot 中文教程opencode-telegram-bot 安装报错怎么办opencode-telegram-bot Agent 工作流opencode-telegram-bot 与同类工具对比opencode-telegram-bot 最佳实践opencode-telegram-bot 适合谁用

⚡ 核心功能

👥 适合谁
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)

👥 适合人群

自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队

🎯 使用场景

  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

参考项目文档配置Telegram Bot
💡 AI Skill Hub 点评

经综合评估,开源AI工作流 在Agent工作流赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 开源AI工作流
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 opencode-telegram-bot
原始描述 开源AI工作流:OpenCode mobile client via Telegram: run and monitor AI coding tasks from your p。⭐725 · TypeScript
Topics ai-agentautonomous-agentcoding-agentdeveloper-tools
GitHub https://github.com/grinev/opencode-telegram-bot
License MIT
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/grinev/opencode-telegram-bot

收录时间:2026-05-29 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。