Skip to content

[Agent Builder] Persist read and status for conversations#271415

Open
petrkrejcik wants to merge 7 commits into
elastic:mainfrom
petrkrejcik:persist-conversion-metadata-14515
Open

[Agent Builder] Persist read and status for conversations#271415
petrkrejcik wants to merge 7 commits into
elastic:mainfrom
petrkrejcik:persist-conversion-metadata-14515

Conversation

@petrkrejcik
Copy link
Copy Markdown
Contributor

@petrkrejcik petrkrejcik commented May 27, 2026

Closes https://github.com/elastic/search-team/issues/14515

image

Summary

Backend foundation for the Chat status epic (#14513). Adds two new conversation-level fields the frontend needs to render sidebar status chat icons:

  • read: boolean
    • tracks whether the user has seen the latest content
    • set to false on each round write to a conversation (e.g. renaming doesn't affect read)
    • not returned from API for legacy conversations that pre-date this change
  • status: ConversationRoundStatus
    • denormalized from the last round's status so the list endpoint doesn't need to load rounds
    • stored on each round write
    • not returned from API for legacy conversations that pre-date this change

Decisions

  • the naming status (new) vs state (existing). I considered different name like last_round_status but that reveals an implementation details that might change in the future, so I decided to keep the same existing name (even though a bit confusing because of the existence of state)
  • I also considered placing status into state but as state is not indexed, it's a no go

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

  • dynamic: strict mapping update. .chat-conversations is dynamic: strict; new fields must be added to the mapping before any write succeeds. Severity: Low. Mitigation: Check with peers how this work.

@petrkrejcik petrkrejcik changed the title add read property [Agent Builder] Store read flag in ES for the conversation May 27, 2026
@petrkrejcik petrkrejcik self-assigned this May 27, 2026
@petrkrejcik petrkrejcik added the feature:agent-builder Identify agent builder functionalities to be grouped together for release notes label May 27, 2026
@petrkrejcik petrkrejcik force-pushed the persist-conversion-metadata-14515 branch 2 times, most recently from f57e7d8 to bff36c5 Compare May 29, 2026 05:41
@petrkrejcik petrkrejcik changed the title [Agent Builder] Store read flag in ES for the conversation [Agent Builder] Store read and status for conversations May 29, 2026
@petrkrejcik petrkrejcik changed the title [Agent Builder] Store read and status for conversations [Agent Builder] Persist read and status for conversations May 29, 2026
@petrkrejcik petrkrejcik marked this pull request as ready for review May 29, 2026 06:16
@petrkrejcik petrkrejcik requested a review from a team as a code owner May 29, 2026 06:16
@petrkrejcik petrkrejcik added backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels May 29, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #145 / alerting api integration security and spaces enabled - Group 2 Connectors Bedrock executor execution successful response simulator should send a stringified JSON object with latest body

Metrics [docs]

✅ unchanged

History

cc @petrkrejcik

@chrisbmar chrisbmar requested a review from pgayvallet May 29, 2026 10:00
@petrkrejcik petrkrejcik force-pushed the persist-conversion-metadata-14515 branch from 18a4fd1 to daa5aa3 Compare June 1, 2026 07:31
Copy link
Copy Markdown
Contributor

@chrisbmar chrisbmar left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 let's wait for @pgayvallet review before merging

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 feature:agent-builder Identify agent builder functionalities to be grouped together for release notes release_note:skip Skip the PR/issue when compiling release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants