Streaming Agents with Pydantic AI over Typed WebSockets: Tools, Approvals, and a Generated Client

https://hackernoon.imgix.net/images/zVjkyxMw8wMXdtd791QOTmlledp2-3v83chl.png

I’ve been building realtime products for years: group chat, voice pipelines, streaming AI assistants. Two kinds of pain kept following me around.

The first was WebSockets. Every project grew the same untyped receive_json handler with an if/else chain, hand-written validation, and no contract the frontend could rely on. Messages were stringly-typed, bugs surfaced at runtime, and onboarding a teammate meant “read the consumer, end to end”. That pain is why I built chanx: typed messages, automatic routing, AsyncAPI docs.

The second was agent frameworks. I shipped my first LLM features on LangChain and spent more time debugging its abstractions than my own code. Pydantic AI won me over the first time I tried it: typed tools, typed outputs, typed dependency injection. It applies to agents the same philosophy chanx applies to WebSockets, and since both are built on Pydantic they snap together with almost no glue.

There’s just one...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more

https://images.wsj.net/im-81428095/social

Sources: OpenAI has secured ~$11B in commitments for its latest funding round, less than half its initial $30B target, and expects to raise more in coming weeks

October 30, 2026, 10:30 PM Top News More: TRM Insights, Chainalysis, Wired, CoinDesk, Reuters, Bitquery, CNN, Business Insider, Associated Press, BBC, Bloomberg Law, Blockchain.News, SiliconANGLE, Nextgov/FCW, TechCrunch, New York Post, Decrypt, Digital Trends, International Business Times, Cybersecurity Dive, TechCentral.ie, Bloomberg, Yahoo Finance, WinBuzzer, Capital Brief, Foreign