Hi Krill,
β I'm building a multi-agent system on OpenClaw and need advice on the proper architecture for human-in-the-loop workflows.
β My goal:
β I want a deterministic workflow engine to control an entire multi-step process from A to Z. Agents should only do their assigned work
(research, coding, reviewing) β they must NOT decide what comes next and must NOT handle message routing. The SYSTEM dictates the
process, not the LLMs.
β My setup:
β - OpenClaw on Hetzner VPS (Docker)
β - Multiple agents: Hans (Chief of Staff), Max (Research), Elon (Engineer), Audit, Architect
β - A custom Python workflow runner that executes YAML-defined workflows with agent/approval/loop step types
β - Telegram as the only human interface (one user: me)
β The problem:
β My workflow engine pauses at approval steps and needs user input via Telegram. But OpenClaw's Telegram integration routes incoming
messages to agents (Hans), not to my workflow engine. When I reply to an approval request, my message goes to Hans' agent session β Hans
has no context about the running workflow and responds independently, bypassing the entire process.
β Telegram also only allows ONE long-polling consumer per bot token, so I can't run a second listener alongside OpenClaw.
β My question:
β What's the recommended OpenClaw pattern for this? Specifically:
β 1. Is there a way to route specific Telegram messages (e.g., based on reply-to or callback data) to a custom handler BEFORE they reach
an agent?
β 2. Does OpenClaw support webhook mode for Telegram, so I could add my own FastAPI gateway in front of it?
β 3. Is there a native "workflow correlation" mechanism that lets a message be routed to a waiting workflow instead of an agent?
β 4. Production systems like Temporal + Slack solve this with signalWithStart and Correlation-IDs embedded in button payloads. Is there
an OpenClaw equivalent?
β 5. If no native solution exists β is the recommended pattern to build a separate Telegram gateway service (FastAPI + webhook) that
owns the bot token exclusively, and have OpenClaw agents only invoked by the workflow engine (never directly from Telegram)?
β I want to avoid reinventing the wheel if OpenClaw already has primitives for this. Any guidance on best practice would be much
appreciated.
β Thanks!