# Agent Graph Engineering, Part 3: Why Your WebSocket Clients Need Generated Types

DevFeed: [Agent Graph Engineering, Part 3: Why Your WebSocket Clients Need Generated Types](<https://devfeed.tech/articles/agent-graph-engineering-part-3-why-your-websocket-clients-need-generated-types-95272.md>)

Original publisher: [Read original article](<https://hackernoon.com/agent-graph-engineering-part-3-why-your-websocket-clients-need-generated-types?source=rss>)

Author: Huy Nguyen

Published: 2026-10-22T08:21:23Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [WebSocket](<https://devfeed.tech/topics/websocket.md>), [union types](<https://devfeed.tech/topics/union-types.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agent-safety](<https://devfeed.tech/tags/ai-agent-safety.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backend-development](<https://devfeed.tech/tags/backend-development.md>), [cross-language-types](<https://devfeed.tech/tags/cross-language-types.md>), [graph](<https://devfeed.tech/tags/graph.md>), [python](<https://devfeed.tech/tags/python.md>), [services](<https://devfeed.tech/tags/services.md>), [types](<https://devfeed.tech/tags/types.md>), [typescript](<https://devfeed.tech/tags/typescript.md>), [websocket](<https://devfeed.tech/tags/websocket.md>)

## AI overview

The article argues that when services cross process or language boundaries, declare data shapes on the server and generate clients and interfaces from those contracts. OpenAPI supplies a typed REST client; AsyncAPI carries WebSocket event types and directionality into TypeScript, so adding or removing an event updates the generated union and can expose stale frontend handling at compile time. Tool argument schemas can also drive approval forms, validation, and defaults, helping ensure reviewers see the fields the server accepts. The approach adds build and regeneration steps, may require a live schema endpoint, and inherits generator choices; the article says it brings little value for one service in one language or throwaway prototypes, while public APIs still need versioning.

## Source excerpt

Three services in two languages means three seams, and a hand-maintained seam is a slow leak.