tg-user-in-the-loop

Manage asynchronous clarifying questions with timeout policies in Telegram bot tasks.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/kvcop/ai-kb-assistant --skill tg-user-in-the-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tg-user-in-the-loop
Source: https://github.com/kvcop/ai-kb-assistant/tree/main/.codex/skills/tg-user-in-the-loop
Command: npx skills add https://github.com/kvcop/ai-kb-assistant --skill tg-user-in-the-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables the Telegram bot to ask clarifying questions during task execution, preventing task failure due to missing information and allowing for user input without halting the bot's progress.

Core Features & Use Cases

  • Asynchronous Clarification: Ask blocking or non-blocking questions while a task is in progress.
  • Timeout Policy: Implements a ping schedule (5, 10, 15 minutes) and handles user non-responsiveness by either proceeding with defaults or canceling the task.
  • User-in-the-Loop: Facilitates interactive task execution where user input is critical for safe continuation.
  • Use Case: When a bot needs to decide between two options for processing a document, it can ask the user via a blocking question, providing a default action if no response is received within a set time.

Quick Start

Use the tg-user-in-the-loop skill to ask a blocking question about processing a document, providing a default action if no response is received.

Frequently Asked Questions about tg-user-in-the-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ask clarifying questions in a Telegram bot without halting task execution?

Asynchronous user-in-the-loop mechanisms manage clarifying questions by sending blocking or non-blocking prompts via the Telegram bot, allowing background task progression to continue safely while waiting for user input.

How does timeout handling work for unanswered user questions in a Telegram bot?

Timeout handling for unanswered questions uses a ping schedule at 5, 10, and 15 minutes. If the user remains unresponsive, the bot executes predefined default actions or cancels the task entirely to prevent hanging.

What is the difference between blocking and non-blocking questions in async bot task execution?

Blocking questions in async task execution halt progress until the user responds, whereas non-blocking questions act as notes that capture user input while allowing the Telegram bot task to continue processing uninterrupted.

Can I set default actions for a Telegram bot when the user does not respond to a prompt?

You can set default actions for a Telegram bot. When a user fails to respond to a blocking question after a defined timeout period, the user-in-the-loop mechanism automatically proceeds with defaults or cancels the task.

When do I need a user-in-the-loop mechanism for my Telegram bot?

You need a user-in-the-loop mechanism when task execution requires critical user input to prevent failure, such as deciding between two document processing options and needing a safe interactive progression path.