← Back to Blog

Approve AI Agent Skills from Telegram — Human-in-the-Loop on Your Phone

Your AI agent runs a task, reaches a manual-approval skill, and sends you a Telegram message asking for confirmation. Reply yes — the next skill runs. Reply no — it stops. No dashboard, no browser tab, just Telegram.

✋

What You Will Build

A three-skill pipeline connected to your Telegram bot. The orchestrator runs skills in sequence — auto skills fire immediately, manual skills pause and ask you first:

greeter (auto)
→
followup (auto)
→
review ✋ (manual)

The agent runs greeter and followup automatically, then pauses before review. It sends you a Telegram message asking for your approval. Reply yes — review runs. Reply no — the pipeline stops.

What You Need


Step 1

Create the Project Folder

Create a folder called chain-telegram/. One root agent.yaml orchestrates all three skills — no separate chain YAML files needed:

chain-telegram/
├── agent.yaml                  # orchestrator — lists all 3 skills
├── oe-config.json               # LLM + server + Telegram bot token
├── greeter/
│   └── SKILL.md                # greets you — fires first, auto
├── followup/
│   └── SKILL.md                # summarises greeter output — auto
└── review/
    └── SKILL.md                # waits for your approval — manual

Step 2

Create agent.yaml

The root agent.yaml is the orchestrator. It lists all three skills in order — auto skills run immediately, manual skills pause for your approval.

agent.yaml
name: Chain Telegram — Approval Demo
description: Three-skill pipeline with automatic and manual approval stages.

skills:
  # Runs first — auto (no approval needed)
  - path: ./greeter
    trigger_type: auto

  # Runs second — auto (fires immediately after greeter)
  - path: ./followup
    trigger_type: auto

  # Runs third — manual (pauses and asks for your approval in Telegram)
  - path: ./review
    trigger_type: manual

trigger_type: auto fires immediately and passes the output forward as context. trigger_type: manual pauses the pipeline, sends you a Telegram approval message, and waits for your reply before continuing.


Step 3

Create the SKILL.md Files

greeter/SKILL.md
---
name: greeter
description: Greets you and shares a fun fact about today in history.
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are a helpful assistant.

## Step 1: Greet

Say hello, mention today's date, and give one fun fact about today in history.
followup/SKILL.md
---
name: followup
description: Summarises the greeter's output in one sentence.
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are a summarizer assistant.

## Step 1: Summarize

The previous skill just ran. Summarize its output in one sentence
and say "Auto skill complete ✅".
review/SKILL.md
---
name: review
description: Runs only after you approve from Telegram.
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are an assistant that confirms tasks.

## Step 1: Confirm

The user approved running you from Telegram.
Acknowledge the approval, briefly reference what the previous skills said,
and say "Manual approval complete ✅".

Step 4

Create oe-config.json

This file holds your LLM key, server settings, and Telegram connector. Leave publicUrl blank for now — you will fill it in after the Cloudflare tunnel starts.

oe-config.json
{
  "llm": {
    "provider": "openai",
    "model": "gpt-4o",
    "apiKey": "sk-..."
  },
  "server": {
    "enabled": true,
    "port": 3333,
    "publicUrl": "",
    "webhook": true
  },
  "connectors": [
    {
      "connection_name": "My Telegram Bot",
      "connection_type": "telegram",
      "baseUrl": "https://api.telegram.org/botYOUR_BOT_TOKEN",
      "auto_reply": true,
      "rate_limit": { "messages_per_minute": 20 },
      "history": { "enabled": true, "max_messages": 10 }
    }
  ]
}

Replace sk-... with your LLM API key and YOUR_BOT_TOKEN with the token from @BotFather. Anthropic users: set "provider": "anthropic" and "model": "claude-sonnet-5".

"webhook": true activates the webhook receiver. "auto_reply": true tells the server to reply to Telegram messages automatically — including approval prompts and skill results.


Step 5

Start a Cloudflare Tunnel

Telegram needs a public HTTPS URL to deliver messages to your server. Cloudflare Tunnel gives you one for free — no account or signup needed.

npx cloudflared tunnel --url http://localhost:3333
https://purple-mouse-1234.trycloudflare.com

Copy that URL. Keep this terminal open — the tunnel must stay running while you test.


Step 6

Update publicUrl in oe-config.json

Paste the Cloudflare URL into publicUrl:

"publicUrl": "https://purple-mouse-1234.trycloudflare.com"

Make sure there is no leading space before https:// — a space in the URL causes Telegram to reject the webhook registration.


Step 7

Start the Server

Open a second terminal and start OE Runtime in server mode from inside the chain-telegram/ folder:

cd chain-telegram
npx -y @openenthrium/oe-runtime@latest --serve --config oe-config.json
────────────────────────────────────────────────────────
  🚀   OE Runtime Server  v1.8.9
────────────────────────────────────────────────────────

Agent         Chain Telegram — Approval Demo
Skills        greeter (auto) · followup (auto) · review (manual)
Webhook       POST /webhook/telegram
Listening     http://localhost:3333

✅  Telegram auto-registered → https://purple-mouse-1234.trycloudflare.com/webhook/telegram

The server detected the Telegram connector, read the publicUrl, and called Telegram's setWebhook API automatically. Your bot is now live.


Step 8

Test the Pipeline in Telegram

Open Telegram, find your bot, and send this command:

/run greeter
09:14
OE Bot
Hello! Today is August 13, 2026. Fun fact: on this day in 1961, East Germany began construction of the Berlin Wall overnight. Auto skill complete ✅ — The greeter shared today's date and a fact about the Berlin Wall construction in 1961.
09:14
OE Bot
⏸ Skill pending approval: review Reply yes to approve or no to cancel.
09:14

The bot ran greeter, fired followup automatically, then paused on the review skill. It is now waiting for your reply.

Approve the skill

Reply yes (or /approve) in Telegram:

yes
09:15
OE Bot
The user approved! Building on the earlier greeting about today's date and the Berlin Wall — Manual approval complete ✅
09:15

Reject the skill

Reply no (or /cancel) instead:

no
09:16
OE Bot
⏹ Skill cancelled.
09:16

Both yes and /approve approve the pending skill. Both no and /cancel reject it. The bot remembers the pending skill per chat — you do not need to pass any ID manually.


OE Runtime — Direct Downloads

Commands Reference

All standard OE commands work from Telegram once the bot is connected:

CommandWhat it does
/run <skill-name>Run a named skill — triggers the full pipeline
/skillsList all available skills in your project
yes / /approveApprove a pending manual skill and run it
no / /cancelReject and discard the pending manual skill
/statusHealth check — LLM, connectors, uptime
/helpShow all commands
Any plain messageRoutes to the default: true skill

How It Works

When the server receives a Telegram message and the agent runs its skill pipeline:

  1. Auto skills fire immediately — output from each skill is passed as context to the next one. All auto-skill results are bundled into the reply you see in Telegram.
  2. Manual skills pause. The server stores the pending skill in memory, sends you a Telegram message asking for approval, and waits.
  3. When you reply yes, the server looks up the pending skill for your chat, runs it with the previous output as context, and sends the result back to you in Telegram.
  4. When you reply no, the skill is discarded and you get a cancellation confirmation.

Pending skills are held in memory. If the server restarts while a skill is waiting for your approval, it is lost — you will need to run the agent again. Each chat can have at most one pending skill at a time.

Real-World Use Cases

The Cloudflare tunnel URL changes every time you run npx cloudflared. Update publicUrl in oe-config.json each time — the server re-registers the webhook automatically on startup. For a permanent setup, run OE Runtime on a server with a fixed domain.

Build human-in-the-loop AI workflows today

Download OE Runtime and start approving agent skills from Telegram — no code, no backend, no dashboard needed.

Get OE Runtime →