Skip to content

feat: agent setup for ag-ui compatible ml agents#165

Draft
SuZhou-Joe wants to merge 1 commit intoopensearch-project:mainfrom
SuZhou-Joe:feature/ag-ui-agent
Draft

feat: agent setup for ag-ui compatible ml agents#165
SuZhou-Joe wants to merge 1 commit intoopensearch-project:mainfrom
SuZhou-Joe:feature/ag-ui-agent

Conversation

@SuZhou-Joe
Copy link
Copy Markdown
Member

@SuZhou-Joe SuZhou-Joe commented Oct 22, 2025

Description

Add a OSDAGUIAgent to connect to a AG-UI protocol stream response.

Trigger example: SuZhou-Joe#1

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.16%. Comparing base (c755ee6) to head (263a5cd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #165   +/-   ##
=======================================
  Coverage   65.16%   65.16%           
=======================================
  Files          56       56           
  Lines        1797     1797           
  Branches      429      418   -11     
=======================================
  Hits         1171     1171           
  Misses        623      623           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const completeLines = lines.slice(0, -1);

for (const line of completeLines) {
if (line.startsWith('data: ')) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: can we store this as a constant and reuse it in the line.slice below?

try {
while (true) {
const { done, value } = await reader.read();
if (done) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to check if this.sseBuffer is empty here? We may need to parse the data if it's starts with data:

@SuZhou-Joe SuZhou-Joe marked this pull request as draft November 3, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants