{
  "id": 6129135,
  "title": "Streaming Agents with Pydantic AI over Typed WebSockets: Tools, Approvals, and a Generated Client",
  "url": "https://urgent.news/2026/09/07/streaming-agents-with-pydantic-ai-over-typed-websockets-tools",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-07T06:00:19.000Z",
  "source": {
    "name": "HackerNoon",
    "slug": "hackernoon",
    "url": "https://hackernoon.com/streaming-agents-with-pydantic-ai-over-typed-websockets-tools-approvals-and-a-generated-client?source=rss"
  },
  "original_language": "en",
  "account": "This article discusses the challenges faced when building real-time products, particularly in handling WebSockets and agent frameworks. The author built two tools to address these issues: chanx for WebSockets and Pydantic AI for agent frameworks. Pydantic AI provides typed tools, outputs, and dependency injection, which integrates well with chanx for a seamless development experience. The author then explains how to create a bidirectional WebSocket agent using these tools, with a focus on the message contract and handling approval requests for destructive tools.",
  "summary": "A practical guide to building typed WebSocket UIs for Pydantic AI agents, with streaming, tool calls, approval flows, AsyncAPI, and tests.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}