# Stream an agent's run into a chat UI and keep the history

> Stream an agent's run into a chat UI and keep the history: 1 companies fully do it, 14 with a limit, 19 carry the tag. Every listing in Agent frameworks & SDKs with the reason and a source.

- Canonical: https://www.anchorterminal.com/niches/frameworks.stream-to-ui/
- Markdown: https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.md (~1,650 tokens)
- Slim: https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.min.md (~380 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-15

One company's docs show a full fit.

| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |
| --- | --- | --- | --- | --- |
| 1 | 14 | 19 | 3 | 4 |

## What counts as done

Tokens, tool calls and approvals reach the client through a documented stream protocol, the user can stop a run and it ends at the next step, and stored history round-trips into the UI format with a library function rather than hand-written converters.

How agents ask for it: stream the agent's answer and tool calls to the browser; build a chat UI on this agent; save the chat and reload it later; stop the agent when the user clicks stop

## Does the job

The docs show it meets the test above, and nothing we read says otherwise.

- **Pydantic AI (Pydantic Services Inc.)**: VercelAIAdapter streams the AI SDK data stream protocol with tool calls and approvals, dump_messages and load_messages convert stored history to UIMessages, and the docs say how a client stop and a first-party cancel end the run.

## Does the job, with a limit

It does the job, but something in the docs or a user's account will get in an agent's way. The limit is named in each row.

- **Agno (Agno Inc.)**: AgentOS exposes agents over SSE and the AG-UI protocol per the docs index; I did not open a page showing stored history converted back to the UI format or stop behaviour.
- **BoxLang AI (Ortus Solutions, Corp.)**: Streaming is callback-based chunk delivery with resumeStream for approvals and cancelRun by threadId; no documented client wire protocol or stored-history conversion for a web UI.
- **CrewAI (CrewAI, Inc.)**: Flows stream to a frontend through the AG-UI and CopilotKit integration, including human-in-the-loop tools. I didn't find a library function for stored history to UI messages.
- **Cursor Agent SDK (Anysphere, Inc.)**: Each session has an NDJSON event stream with tool-call events and a stop route that records the turn as cancelled. No helper turns stored history into UI messages.
- **Docker Agent (Docker, Inc.)**: An HTTP API server for web frontends and an OpenAI-compatible chat server exist per the docs index; I did not open a page on stream events, stop, or history conversion.
- **Agent Development Kit (ADK) (Google LLC)**: An AG-UI integration page exists in the docs index; I did not open it to check stop behaviour or history conversion.
- **guilds.run (Cigale AI)**: Its own web app follows runs over SSE at /api/runs/:id/stream, with cancel and resume; it's a built-in UI, not a protocol for your own front end.
- **LangGraph (LangChain, Inc.)**: useStream in React, Vue, Svelte and Angular carries thread state, tool-call lifecycle, interrupts and checkpoint history. Cancelling a streaming run loses state since the last checkpoint per an open issue (#5672).
- **LlamaIndex Framework (LlamaIndex, Inc.)**: Agents stream events, and llamactl serves workflows with Workflow React Hooks per the docs navigation; I didn't open the hooks page to check history conversion or stop.
- **Mastra (Kepler Software, Inc.)**: @mastra/ai-sdk streams in AI SDK UI format for useChat with tool-suspension parts, resumable streams by chatId, and memory loading history server-side. Whether a user stop ends the run at the next step isn't documented on the page.
- **Microsoft Agent Framework (Microsoft Corporation)**: An AG-UI integration covers backend and frontend tool rendering, human-in-the-loop and state management per the table of contents; I didn't open those pages to check stop and history conversion.
- **OpenAI Agents SDK (OpenAI OpCo, LLC)**: Runner.run_streamed yields events and a run can be cancelled after the turn and resumed from RunState. No documented client wire protocol or stored-history-to-UI conversion was found.
- **Strands Agents (Amazon Web Services, Inc.)**: A guide streams events to the browser over SSE with resumable event IDs and warns about leaking reasoning and tool input. You write the serialiser yourself; no history-to-UI conversion function is offered.
- **AI SDK (Vercel Inc.)**: useChat with the UI message stream carries tokens, tool calls and approval requests; persistence stores UIMessages and validateUIMessages and convertToModelMessages convert them. An open account still asks for model-to-UI message conversion (#7180).

- not this job: AgentOS (Framers Lab, Inc.): stream() yields typed parts including approval-requested and approval-decided, but no client wire protocol or stored-history-to-UI conversion is documented.
- not this job: Claude Agent SDK (Anthropic, PBC): Messages stream to the host program, which builds its own HTTP or WebSocket endpoint; no client stream protocol or stored-history-to-UI conversion is documented.
- not this job: NitroStack (Nitrostack Inc.): Widgets render tool results in MCP UI clients; there is no agent stream or chat history to a web front end.
- not this job: smolagents (Hugging Face, Inc.): No documented client stream protocol or stored-history conversion for a web front end in the pages read.
- not this job: TradingAgents (Tauric Research): A terminal CLI and saved reports; no web stream protocol.

## What stops agents finishing

- no supported conversion between stored model messages and UI messages
- sub-agent events hidden from the stream
- stop or cancel loses streamed state

## Around it

Before: frameworks.tool-calling-agent. After: agent-memory.store-and-confirm.

## Where this comes from

Weight 3 of 100 in Agent frameworks & SDKs: 2 of 61 accounts have this as their main job (share 3.3, rounded by largest remainder to sum 100); few accounts though AI SDK and Mastra exist largely for this, so likely under-counted

As data: https://www.anchorterminal.com/api/v1/use-cases/frameworks.stream-to-ui.json, or the MCP tool get_use_case with id frameworks.stream-to-ui. Draft, read 2026-11-15 from public docs and first-hand accounts, not yet reviewed by a person.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
