← Back to Blog

How to Build a Multi-Agent AI Project on Your Laptop and Connect It to Telegram

One folder. One agent.yaml. One npx command. Your Telegram bot is live, answering messages, and running whichever skill you ask for — with zero backend code.

✈️

What You Will Build

A folder called my-ai-project/ with a single agent.yaml that registers three skills. The server connects to Telegram via a Cloudflare tunnel — no server, no deployment, no ngrok account needed. Once running, your Telegram bot understands:

What You Need


Step 1

Create the Project Folder

Create a folder called my-ai-project/ with this structure. One agent.yaml orchestrates everything — no project registry file needed:

my-ai-project/
├── agent.yaml                 # orchestrates all skills
├── oe-config.json              # LLM + server + Telegram webhook
├── chat-bot/
│   └── SKILL.md                # default — handles any plain message
├── hello-world/
│   └── SKILL.md                # /run hello-world
└── summary/
    └── SKILL.md                # /run summary

Step 2

Create agent.yaml

This single file registers all your skills. The skill with default: true handles any plain message — no command needed. Named skills are triggered with /run skill-name.

agent.yaml
name: My AI Project
description: Multi-skill project connected to Telegram

skills:
  # Default — handles plain messages (no /run command)
  - path: ./chat-bot
    trigger_type: auto
    default: true

  # Named skills — triggered with /run hello-world or /run summary
  - path: ./hello-world
    trigger_type: manual

  - path: ./summary
    trigger_type: manual

Each path points to a folder containing a SKILL.md file. The skill name used in /run skill-name matches the name: field in that skill's SKILL.md frontmatter.


Step 3

Create the SKILL.md Files

chat-bot/SKILL.md
---
name: chat-bot
description: Default conversational agent that handles any plain message.
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
params:
  - name: message
    description: The incoming message from the user
  - name: user
    description: The user's first name or username
---

You are a helpful, concise AI assistant.
Respond directly to the user's message. Keep replies under 300 words.
Do not use triple backticks — they don't render well in Telegram.

## Step 1: Reply

{{user}} says: {{message}}

Write a helpful, friendly reply.
hello-world/SKILL.md
---
name: hello-world
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 share one fun fact about today in history. Keep it brief and friendly.
summary/SKILL.md
---
name: summary
description: Summarises AI Trends in 2026 in exactly 3 bullet points.
license: Apache-2.0
metadata:
  author: Open Enthrium
  version: "1.0"
---

You are a concise summariser. Always respond with exactly 3 bullet points.

## Step 1: Summarise

Summarise AI Trends in 2026 in exactly 3 bullet points.

Step 4

Create oe-config.json

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

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".


Step 5

Start a Cloudflare Tunnel

Telegram needs a public HTTPS URL to send messages to. Cloudflare Tunnel gives you one for free — no account, no signup required.

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

Copy that URL — you need it in the next step. Keep this terminal open.


Step 6

Update publicUrl in oe-config.json

Paste the Cloudflare URL into publicUrl:

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

OE Runtime uses this to register the Telegram webhook automatically on startup — Telegram will call publicUrl/webhook/telegram every time a message arrives.

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


Step 7

Start the Server

Open a second terminal, navigate into my-ai-project/, and run:

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

Agent         My AI Project
Skills        chat-bot (default) · hello-world · summary
Webhook       POST /webhook/telegram
Listening     http://localhost:3333

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

Step 8

Chat with Your Bot in Telegram

1 — Run the hello-world skill

/run hello-world
10:17
MyAIBot
Hello! Today is August 12, 2026. Fun fact: on this day in 1981, IBM released its first personal computer — the IBM 5150 — for $1,565. It launched the PC era.
10:17

2 — Run the summary skill

/run summary
10:18
MyAIBot
• AI agents are shifting enterprise software from rule-based automation to intelligent, adaptive workflows.
• Multi-agent systems let teams decompose complex tasks across specialised agents that collaborate in sequence.
• YAML-first runtimes mean non-engineers can build and deploy agents without writing code.
10:18

3 — Send a plain message

Any message that isn't a /run command goes to the default skill (chat-bot).

What is machine learning?
10:19
MyAIBot
Machine learning is a branch of AI where systems learn patterns from data rather than following hand-written rules. Feed it examples, it improves its predictions — the more data, the better it gets.
10:19

OE Runtime — Direct Downloads

Commands Reference

These commands work from Telegram once the bot is connected:

CommandWhat it does
/run <skill-name>Run a named skill from your agent.yaml
/skillsList all available skills with names and descriptions
/statusShow server health, uptime, and LLM config
/approveApprove a pending manual skill
/cancelCancel a pending skill
/helpShow the full command reference
Any plain textRuns the skill marked default: true in agent.yaml

How It All Fits Together

Two files, two responsibilities:

Adding a new skill is two steps: create a new folder with a SKILL.md inside, then add one entry to agent.yaml pointing to it. No code changes, no restart required — hot reload picks it up automatically.

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.

Get the full sample

Download the my-ai-project sample from the OE Runtime release — all files from this tutorial, ready to run.

Get OE Runtime →