Skip to content

Expand AG-UI adapter documentation#17

Open
lussoluca wants to merge 1 commit into
neuron-core:mainfrom
lussoluca:docs/607-agui-adapter-details
Open

Expand AG-UI adapter documentation#17
lussoluca wants to merge 1 commit into
neuron-core:mainfrom
lussoluca:docs/607-agui-adapter-details

Conversation

@lussoluca

Copy link
Copy Markdown
Contributor

🤖 This was written by an AI agent on behalf of @lussoluca.

Refs neuron-core/neuron-ai#607

Summary

The AG-UI adapter section of the streaming page currently shows only the bare adapter instantiation. A real AG-UI frontend sends a RunAgentInput POST body and expects its own threadId and runId echoed back in the lifecycle events, so a reader following the current example ends up with an endpoint that AG-UI clients cannot correlate runs with.

This PR expands the section with:

  • The RunAgentInput request payload an AG-UI client sends.
  • How to pass the client's threadId and runId to the adapter constructor so they are echoed in RUN_STARTED and RUN_FINISHED.
  • Sending the SSE headers from getHeaders() and flushing output after each line.
  • A complete endpoint example (verified against the official @ag-ui/core and ag-ui-protocol SDK validators).
  • A table mapping Neuron chunk types to the AG-UI events the adapter emits.
  • Notes on current limits: tools run server side (frontend-defined tools in RunAgentInput.tools are not handled) and shared state events are not emitted.

Note

The runId constructor argument documented here is introduced in neuron-core/neuron-ai#608. This PR should be merged after that one.

Document how to connect a real AG-UI frontend to the adapter: the
RunAgentInput request payload, passing the client's threadId and runId
to the adapter constructor, sending the SSE headers from getHeaders()
and flushing the output, a complete endpoint example, the table of
emitted events per Neuron chunk type, and the current limits (server
side tool execution only, no shared state events).

Refs: neuron-core/neuron-ai#607
Assisted-by: claude-code/claude-fable-5
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.

1 participant