{
  "data": null,
  "kind": "anchor.page",
  "links": {
    "api": "https://www.anchorterminal.com/api/v1/index.json",
    "html": "https://www.anchorterminal.com/niches/frameworks.stream-to-ui/",
    "json": "https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.json",
    "llms": "https://www.anchorterminal.com/llms.txt",
    "markdown": "https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.md",
    "mcp": "https://www.anchorterminal.com/mcp",
    "slim": "https://www.anchorterminal.com/niches/frameworks.stream-to-ui/index.min.md"
  },
  "markdown": "One company's docs show a full fit.\n\n| Companies, full fit | With a limit | Carry the tag | Share of the category's work | First-hand accounts |\n| --- | --- | --- | --- | --- |\n| 1 | 14 | 19 | 3 | 4 |\n\n## What counts as done\n\nTokens, 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.\n\nHow 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\n\n## Does the job\n\nThe docs show it meets the test above, and nothing we read says otherwise.\n\n- **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.\n\n## Does the job, with a limit\n\nIt 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.\n\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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).\n- **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.\n- **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.\n- **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.\n- **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.\n- **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.\n- **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).\n\n- 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.\n- 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.\n- 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.\n- 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.\n- not this job: TradingAgents (Tauric Research): A terminal CLI and saved reports; no web stream protocol.\n\n## What stops agents finishing\n\n- no supported conversion between stored model messages and UI messages\n- sub-agent events hidden from the stream\n- stop or cancel loses streamed state\n\n## Around it\n\nBefore: frameworks.tool-calling-agent. After: agent-memory.store-and-confirm.\n\n## Where this comes from\n\nWeight 3 of 100 in Agent frameworks \u0026 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\n\nAs 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.\n",
  "meta": {
    "attribution": "Anchor Terminal (https://www.anchorterminal.com)",
    "attributionRequired": true,
    "credit": "CC BY 4.0, credit Anchor Terminal and link the page or API address you took it from (https://www.anchorterminal.com/terms/#data)",
    "docs": "https://www.anchorterminal.com/docs/",
    "generatedAt": "2026-11-16",
    "license": "CC-BY-4.0",
    "method": "https://www.anchorterminal.com/benchmark/",
    "methodology": "0.8",
    "openapi": "https://www.anchorterminal.com/openapi.json",
    "preview": false,
    "run": "2026-10-01",
    "runLabel": "October 2026 research run",
    "terms": "https://www.anchorterminal.com/terms/#data"
  },
  "page": {
    "breadcrumbs": [
      {
        "name": "Home",
        "url": "https://www.anchorterminal.com/"
      },
      {
        "name": "For agents",
        "url": "https://www.anchorterminal.com/agents/"
      },
      {
        "name": "Niches",
        "url": "https://www.anchorterminal.com/niches/"
      },
      {
        "name": "Stream an agent's run into a chat UI and keep the history",
        "url": ""
      }
    ],
    "description": "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 \u0026 SDKs with the reason and a source.",
    "facts": null,
    "h1": "Stream an agent's run into a chat UI and keep the history",
    "image": "https://www.anchorterminal.com/assets/og/default.png",
    "path": "/niches/frameworks.stream-to-ui/",
    "published": "",
    "section": "agents",
    "title": "Stream an agent's run into a chat UI and keep the history | Anchor…",
    "toc": null,
    "updated": "2026-11-15",
    "url": "https://www.anchorterminal.com/niches/frameworks.stream-to-ui/"
  },
  "tokens": {
    "markdown": 1650,
    "slim": 380
  },
  "version": 1
}
