Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Ask the User Before You Act: Human-in-the-Loop Questions for AI Agents with Spring AI

Description and use

A workflow where a ByteChef AI agent asks the user clarifying questions before acting, eliminating guesswork and rework.

Problem

AI agents often act without user confirmation, leading to incorrect assumptions and rework.

Outcome

The workflow ensures agents only act after receiving explicit user answers, eliminating guesswork and rework.

Workflow

  • Receive chat request
  • AI Agent calls AskUserQuestionTool with 1‑4 questions
  • ByteChef sends questions to chat as ask_user_question event
  • User answers via chat
  • ByteChef resumes workflow with answers
  • AI Agent generates plan and replies

Evidence

The Ask User Question Tool lets a ByteChef AI Agent stop and ask the user 1 to 4 multiple-choice questions before it acts.

Source

When the agent calls the tool, ByteChef sends the questions to the chat as an ask_user_question event.

Source

In a deployed workflow, the questions come with a resume URL and the workflow suspends. It isn't holding a thread. The run is persisted and can wait up to 30 days.

Source

  • Record date: 2026-11-02T01:29:07.184Z