Example: Telegram LLM Bot
A minimal ready-to-run kdeps workflow that connects a Telegram bot to a local Ollama LLM.
Files
telegram-bot/
├── workflow.yaml
└── resources/
├── llm.yaml
└── reply.yamlworkflow.yaml
yaml
apiVersion: kdeps.io/v1
kind: Workflow
metadata:
name: telegram-llm-bot
description: Telegram bot that answers messages with an LLM
version: "1.0.0"
targetActionId: reply
settings:
agentSettings:
timezone: Etc/UTC
installOllama: true
models:
- llama3.2:3b
input:
sources: [bot]
bot:
executionType: polling
telegram:
botToken: "{{ env('TELEGRAM_BOT_TOKEN') }}"
pollIntervalSeconds: 1resources/llm.yaml
yaml
apiVersion: kdeps.io/v1
kind: Resource
metadata:
actionId: llm
name: LLM Response
run:
chat:
backend: ollama
model: llama3.2:3b
messages:
- role: user
content: "{{ input('message') }}"resources/reply.yaml
yaml
apiVersion: kdeps.io/v1
kind: Resource
metadata:
actionId: reply
name: Reply
dependencies:
- llm
run:
botReply:
text: "{{ get('llm') }}"Running
bash
export TELEGRAM_BOT_TOKEN="1234567890:AAH..."
kdeps run workflow.yamlSee Also
- Bot Tutorial — Step-by-step walkthrough
- Input Sources — Full platform config reference