Replace @ag-ui/client with minimal local SSE agent implementation#7158
Draft
Copilot wants to merge 2 commits intoSFINT-6610from
Draft
Replace @ag-ui/client with minimal local SSE agent implementation#7158Copilot wants to merge 2 commits intoSFINT-6610from
Copilot wants to merge 2 commits intoSFINT-6610from
Conversation
- Create sse-agent module with minimal HttpAgent, SSE parser, event types and subscriber interface - Update answer-agent and follow-up-agent to use local sse-agent module - Update strategy files and tests to use local AgentSubscriber type - Remove @ag-ui/client dependency from package.json - Add unit tests for SSE parser and HttpAgent (21 new tests) - All 44 tests pass, build succeeds, linting passes Co-authored-by: louis-bompart <12366410+louis-bompart@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Analyze requirements for ag-ui-client implementation
Replace @ag-ui/client with minimal local SSE agent implementation
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ Checklist
.mdxfileindex.tsandlazy-index.tsfiles.@ag-ui/client(0.0.45) pulls in@ag-ui/core,@ag-ui/encoder,@ag-ui/proto,rxjs,zod,uuid,compare-versions,fast-json-patch, anduntruncate-json. We use ~6 of its 30+ subscriber callbacks, none of its middleware/legacy/proto/rxjs machinery, and only the SSE code path.What's used vs. what's provided
HttpAgent(constructor,requestInit()override,runAgent(),abortRun())RunAgentInput.forwardedPropsthreadId,runId,tools,context,messages,stateNew
sse-agentmodule (packages/headless/.../agents/sse-agent/)event-types.ts—EventTypeenum + 6 event interfaces (RunStarted,RunFinished,RunError,TextMessageStart,TextMessageContent,Custom)agent-subscriber.ts—AgentSubscriberinterface,RunAgentInputtypesse-parser.ts— Async generator SSE parser (data:lines → JSON objects)http-agent.ts—HttpAgent: fetch → SSE parse → dispatch to subscriberindex.ts— BarrelMigration
All 6 consumer files updated from
import ... from '@ag-ui/client'→import ... from '../sse-agent/index.js'. TheAgentSubscribercontract is identical for the callbacks we use, so strategy files and their tests required only import path changes.Tests
21 new tests (8 SSE parser, 13 HttpAgent). All 23 existing agent tests pass unchanged.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.