docs(agent): agent protocol RFC (POST /messages, sessions, SSE streaming)#4735
Draft
mmabrouk wants to merge 1 commit into
Draft
docs(agent): agent protocol RFC (POST /messages, sessions, SSE streaming)#4735mmabrouk wants to merge 1 commit into
mmabrouk wants to merge 1 commit into
Conversation
…reaming) Specify a new POST /messages endpoint for the chat agent, sitting next to the unchanged workflow /invoke. Covers an optional session_id in the request/response body with scoped resolution rules, a Server-Sent Events response in the Vercel AI UI Message Stream format, UIMessage inputs, and a load-session endpoint. Written IETF-style so it can be built against directly.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ardaerzin
added a commit
that referenced
this pull request
Jun 18, 2026
…essages Per the agent-protocol RFC (#4735), Track A (UIMessage parts) is the contract. Drop Track B, the toAgentaMessage adapter, and the A/B toggle. - web: transport posts the RFC envelope {session_id, references?, data:{messages, parameters}} to POST /messages; single createAgentChatTransport(appId) - example: contract_stream serves POST /messages reading data.messages; echoes session_id on start.messageMetadata; drops tool_approvals path - docs: update frontend-agent-chat-ui 'Running the slice' (resolved A/B → Track A) + RAG_QA README - cleanup: remove NEXT_PUBLIC_AGENT_CHAT_TRACK + run-script AGENT_CHAT_TRACK knob
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.
What
Adds the normative protocol spec for the agent chat interface as a new RFC document:
docs/design/agent-workflows/agent-protocol-rfc.md. This PR contains only that file.It specifies a new endpoint,
POST /messages, that sits next to the existing workflow/invoke(which does not change). The spec covers:session_idin the request and response body, with normativeresolution rules (mint / create-with-id / resume) scoped to
(project_id, session_id).format, so the frontend consumes it with
useChatdirectly. Includes the part registry,the mapping from our internal
AgentEvents to Vercel parts, headers, framing, and a fullexample transcript.
data.messages(UIMessageshape), plusnamed variables in
data.inputs.POST /load-session. Returns a session's history so the client can rebuild the UI.Written IETF-style (RFC 2119 keywords, message formats, sequence diagrams) so a frontend or
backend engineer can build against it directly.
Why
The current single request/response
/invokecannot stream an agent's work or hold amulti-turn conversation server-side. This RFC defines the contract for both, additively,
without touching
/invoke.Notes
streaming-and-sessions.md,lands separately. Its relative link resolves once that doc is in the tree.