Skip to content

Commit 4a0131a

Browse files
leemthompoclaudecharlotte-hoblik
authored
[Agent Builder] Document chat status, concurrency, and human-in-the-loop prompts (#7290)
## [URL preview](#7290 (comment)) Documents the Chat Experience UX work for Agent Builder in [`chat.md`](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/chat) and the [glossary](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/glossary). ## What's added **Track conversation status** (`ga 9.5+`) Per-conversation status indicators (In progress, Awaiting your input, Unread, Error) and independent per-conversation streaming, so you can work in several conversations at once. **Human-in-the-loop prompts** (renamed from "Review and confirm agent changes") Groups the three prompt types where an agent pauses for your input: - **Confirm a change** (`ga 9.4+`) — existing preview-before-write content, now framed under the human-in-the-loop concept. - **Authorize a connector** (`preview 9.5+`) — OAuth (re-)authorization when a connector-backed tool call needs access. - **Answer a clarifying question** (`preview 9.5+`) — up to five multiple-choice questions; answers persist in the conversation timeline. **Glossary** — new "Human-in-the-loop (HITL)" entry. ## Closes - Closes elastic/docs-content-internal#1438 - Closes elastic/docs-content-internal#1363 ## Follow-ups - The **Authorize a connector** screenshot is cropped from the feature PR and shows an older "Cancel" label; the current UI (and the doc text) uses "Deny". Worth a recapture, but not blocking. - Reasoning panel to inline events UX (elastic/docs-content-internal#1439) is a separate, later change and is intentionally not included here. Verified against Kibana source (labels, status states, prompt behavior) and Kibana PR version labels (all `v9.5.0`). --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Charlotte Hoblik <116336412+charlotte-hoblik@users.noreply.github.com>
1 parent 1b0cfda commit 4a0131a

9 files changed

Lines changed: 76 additions & 3 deletions

explore-analyze/ai-features/agent-builder/chat.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,31 @@ Use the chat history panel to access previous conversations.
150150
:width: 450px
151151
:::
152152

153+
### Track conversation status
154+
155+
```{applies_to}
156+
stack: ga 9.5+
157+
```
158+
159+
The chat history panel shows the status of each conversation at a glance, so you can keep track of what your agents are doing across conversations:
160+
161+
| Icon | Status | Meaning |
162+
|------|--------|---------|
163+
| ![In progress spinner](images/agent-builder-status-in-progress.svg "=20x20") | **In progress** | The agent is generating a response. |
164+
| ![Awaiting your input icon](images/agent-builder-status-awaiting.svg "=20x20") | **Awaiting your input** | The agent paused and needs you to respond before it can continue, for example to answer a [human-in-the-loop prompt](#human-in-the-loop-prompts). |
165+
| ![Unread icon](images/agent-builder-status-unread.svg "=20x20") | **Unread** | The agent finished responding in a conversation you weren't viewing. |
166+
| ![Error icon](images/agent-builder-status-error.svg "=20x20") | **Error** | The agent stopped because of an error. |
167+
168+
For example, the following chat history panel shows one conversation in progress and another with unread activity:
169+
170+
:::{image} images/agent-builder-conversation-status.png
171+
:screenshot:
172+
:alt: Chat history panel showing conversation status indicators, including In progress and Unread
173+
:width: 450px
174+
:::
175+
176+
Conversations run independently, so you can work in several at the same time: start an agent in one conversation, switch to another while the first keeps working, and come back later without interrupting either one. New conversations appear in the panel as soon as you start them, before the agent finishes its first response.
177+
153178
### Inspect tool calls and reasoning
154179

155180
Expand the **Reasoning** section to see how the agent handles your request. This provides a detailed breakdown of the agent's reasoning steps, the tool calls it makes, and the responses it receives. The agent runs tools in a loop until it achieves its goal or [exceeds the maximum conversation length](limitations-known-issues.md#conversation-length-exceeded).
@@ -164,21 +189,59 @@ Select **Inspect response** to view detailed information about individual tool c
164189

165190
Select **View JSON** to view the full raw response data. For more information, refer to [Monitor token usage](monitor-usage.md).
166191

167-
### Review and confirm agent changes
192+
### Human-in-the-loop prompts
168193
```{applies_to}
169194
stack: ga 9.4+
170195
```
171196

172-
You control every write operation an agent performs. Whenever an agent proposes to create, update, or delete a resource, the chat pauses and presents a preview before anything takes effect. The preview format and available actions depend on the skill the agent is using.
197+
At certain points an agent pauses and hands control back to you before it continues. This pattern is known as human-in-the-loop (HITL). While a conversation is paused this way, it shows an **Awaiting your input** status in the [chat history panel](#track-conversation-status).
198+
199+
#### Confirm a change
173200

174-
No changes are applied until you explicitly confirm or dismiss.
201+
You control every write operation an agent performs. Whenever an agent proposes to create, update, or delete a resource, the chat pauses and presents a preview before anything takes effect. The preview format and available actions depend on the skill the agent is using. Review the preview, then confirm it to apply the change or dismiss it to discard it. Nothing is applied until you respond.
202+
203+
For example, when an agent updates a workflow, it shows the proposed change as a diff and waits for you to review it before applying:
175204

176205
:::{image} images/agent-builder-preview-changes.png
177206
:screenshot:
178207
:alt: Preview panel showing proposed changes from an agent action before they are applied.
179208
:width: 700px
180209
:::
181210

211+
#### Authorize a connector
212+
```{applies_to}
213+
stack: preview 9.5+
214+
serverless: preview
215+
```
216+
217+
When an agent uses a [connector](connectors.md) to reach an external service that requires authorization, the chat pauses so you can grant access. Select **Authorize** to complete the sign-in flow for the connector, or **Deny** to decline. After you authorize, the agent retries the tool call and continues.
218+
219+
For example, an agent that needs to read your Notion workspace pauses until you authorize the connector:
220+
221+
:::{image} images/agent-builder-authorization-prompt.png
222+
:screenshot:
223+
:alt: Authorization prompt with Authorize and Deny buttons
224+
:width: 650px
225+
:::
226+
227+
#### Answer a clarifying question
228+
```{applies_to}
229+
stack: preview 9.5+
230+
serverless: preview
231+
```
232+
233+
When your request is ambiguous, an agent can pause and ask you up to five multiple-choice questions instead of guessing. For each question, select one of the options, or choose the custom option and type your own answer. Some questions let you select more than one option. To move on without answering, select **Skip question**.
234+
235+
When there's more than one question, use **Back** and **Continue** to move between them, then select **Submit** on the last question. After you respond, the agent resumes. The agent's questions and your answers stay in the conversation, so you can revisit what was asked and how you responded.
236+
237+
For example, before creating a dashboard the agent might ask which sample data set to use:
238+
239+
:::{image} images/agent-builder-clarifying-question.png
240+
:screenshot:
241+
:alt: Clarifying question prompt showing multiple-choice options, a custom answer field, and a Skip question button
242+
:width: 650px
243+
:::
244+
182245
## Customize your agent [customize-your-agent]
183246

184247
```{applies_to}

explore-analyze/ai-features/agent-builder/glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ $$$genai-settings$$$
188188
GenAI Settings {applies_to}`stack: ga 9.4+`
189189
: The {{kib}} settings page where you configure the default model and other generative-AI options that affect {{agent-builder}}. See [](models.md#change-the-default-model).
190190

191+
## H
192+
193+
$$$human-in-the-loop$$$
194+
Human-in-the-loop (HITL)
195+
: A pattern where an agent pauses during a conversation and waits for you to respond before it continues. {{agent-builder}} uses human-in-the-loop prompts to confirm write operations, authorize access to external connectors, and ask clarifying questions. See [](chat.md#human-in-the-loop-prompts).
196+
191197
## I
192198

193199
$$$index-search-tool$$$
70 KB
Loading
197 KB
Loading
39.6 KB
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)