Events And Citations¶
Three deterministic graphs show how graph output crosses the OpenAI boundary without turning UI notifications into tool calls.
| Graph | Public output | Client behavior |
|---|---|---|
citation-events |
Markdown links and inline markers plus OpenAI url_citation annotations |
Chainlit renders the Markdown; Open WebUI resolves markers through native source events |
status-events |
Standard assistant text plus Responses commentary | Chainlit uses a TaskList; Open WebUI persists native status history |
custom-event-showcase |
Standard assistant text | Responses returns the final text; Chat Completions streams plain text |
LangGraph Topology¶
graph TD;
__start__ --> answer_with_citation;
answer_with_citation --> __end__;
graph TD;
__start__ --> prepare_media;
prepare_media --> __end__;
graph TD;
__start__ --> build_compatibility_report;
build_compatibility_report --> __end__;
Request Flow¶
- A maintained demo UI sends a standard request through LGOS
/v1/responsestocitation-eventsorstatus-events. citation-eventsreturns portable Markdown plus standard OpenAIurl_citationannotations.status-eventspublishes passive updates through LangGraph's stream writer while returning ordinary assistant text.- LGOS always transports the assistant text. Streaming Responses translate
visible status updates into standard
phase="commentary"message items; no metadata opt-in is required. Chat Completions streams plain text deltas. - UI adapters render the fields and events they support. Other OpenAI clients can ignore the optional output and keep the text.
custom-event-showcase demonstrates how graphs emitting internal stream writer
events behave across protocols. When streamed via Responses or Chat Completions,
the API boundary safely discards non-commentary custom events and delivers the
standard assistant text without requiring ad-hoc envelopes.
These graphs have no checkpointer or Store. Their graph state and event timeline last for one request; each UI separately owns its transcript and rendered status or activity history.
Try It¶
| Model | Prompt | Transport |
|---|---|---|
citation-events |
Show me a cited answer. |
Responses |
status-events |
Prepare the media workflow. |
Responses |
custom-event-showcase |
Build the compatibility report. |
Responses or Chat stream |
See Citation Ownership and Streaming Status for the normative transport contract.