Skip to content

[Agent Builder] get rid of the answering step#266319

Closed
pgayvallet wants to merge 21 commits into
elastic:mainfrom
pgayvallet:ab-xxx-remove-answer-step
Closed

[Agent Builder] get rid of the answering step#266319
pgayvallet wants to merge 21 commits into
elastic:mainfrom
pgayvallet:ab-xxx-remove-answer-step

Conversation

@pgayvallet
Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet commented Apr 29, 2026

Summary

Fix https://github.com/elastic/search-team/issues/14204
Related to https://github.com/elastic/search-team/issues/14511

This PR get rid of the agent's dedicated answering step, to get back to a more traditional "single loop" pattern.

Note that the PR depends on FE work, as we are now also sending chunks for intermediate text responses ("reasoning") and the UI needs to be adapted for it to not impact the user experience.

  • Get rid of the answer agent step (only keep the structured_output version)
  • Merge the main and answering agent prompts
  • Adapt the stubbed LLM scenarios for scout due to the change of flow

@pgayvallet pgayvallet changed the title [Agent Builder] stream reasoning events [Agent Builder] get rid of the answering step May 1, 2026
@pgayvallet pgayvallet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting v9.5.0 labels May 19, 2026
@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

@pgayvallet
Copy link
Copy Markdown
Contributor Author

/ci

logger: input.logger,
sendEvent: this.eventEmitter,
toolId: toolIdMapping.get(tool.id),
addReasoningParam: false,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Encouraging" LLMs to respond with text in addition to tool call by also removing the "reasoning" tool param we were adding previously. (that reasoning param to tool can't be streamed given we create an event based on the tool call parameters)

If really that's worse and we prefer keeping it, we'll revisit later, it's a 4 char change

@pgayvallet pgayvallet marked this pull request as ready for review May 20, 2026 11:38
@pgayvallet pgayvallet requested a review from a team as a code owner May 20, 2026 11:38
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #171 / maps app dashboard reporting: creates a map report PNG file matches the baseline image, using sample geo data

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
agentBuilder 54.8KB 54.8KB +44.0B

History

@chrisbmar
Copy link
Copy Markdown
Contributor

The backend changes from this PR: #266319 are included in my PR here: #271849

@pgayvallet
Copy link
Copy Markdown
Contributor Author

merged via #271849

@pgayvallet pgayvallet closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants