Feature Request: Support AG-UI or ChatCompletion streaming format for InvokeHarness API
- Dominant language
- TypeScript
- Stars
- 283
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 183
Description
### Description
Currently the managed harness InvokeHarness API returns a bespoke Bedrock Converse-shaped SSE format
(HarnessContentBlockStartEvent, etc.). Front-end integrations (chat UIs, etc.) expect AG-UI or
ChatCompletion streaming formats. This requires a custom transport adapter on every client.
Request: Add a `--protocol` or similar option to InvokeHarness to emit ag-ui or ChatCompletion
events natively, removing the need for client-side format translation.
### Acceptance Criteria
- InvokeHarness accepts a protocol parameter with valid values: bedrock-converse (default, existing behavior), ag-ui, openai-chat-completions
- When protocol=ag-ui is specified, the streaming response emits valid AG-UI SSE events (TextMessageStart, TextMessageContent, TextMessageEnd, ToolCallStart, ToolCallEnd, RunFinished, etc.) conforming to the AG-UI spec
- When protocol=openai-chat-completions is specified, the streaming response emits OpenAI-compatible chat.completion.chunk SSE events (data: {"choices":[{"delta":{...}}]})
- When protocol is omitted or set to bedrock-converse, behavior is identical to current (no regression)
- Tool call events (MCP or inline) are correctly represented in each protocol format
- A front-end chat UI (e.g., Vercel AI SDK, AG-UI client) can connect directly to InvokeHarness with protocol=ag-ui or protocol=openai-chat-completions without a custom transport adapter layer
- Documentation updated with protocol parameter options, examples, and a migration guide from the current bespoke format
- SDK clients (Python, TypeScript) expose the protocol parameter in their invoke_harness / invokeHarness wrappers
### Additional Context
_No response_
Contributor guide
Research direction
Start at the InvokeHarness entry point and trace its existing Bedrock Converse-shaped SSE response, then inspect the Python and TypeScript invoke_harness/invokeHarness wrappers. Define how protocol selection and tool-call events map to AG-UI and OpenAI chat-completions formats, while preserving the default behavior. Done means both protocol options work with streaming and tools, SDKs expose the parameter, and documentation includes examples and migration guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- api, backend, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100