Ai Engineering 3 min read

Inbound TCP and Full-Duplex gRPC Hit Cloudflare Workers

Cloudflare has introduced native support for inbound TCP sockets and bi-directional gRPC in its developer platform to support low-latency AI agent workloads.

On August 3, 2026, Cloudflare introduced inbound TCP connections and enhanced gRPC functionality to its developer platform, expanding the baseline networking capabilities of Cloudflare Workers and Cloudflare Containers. The updates, currently in private beta, provide the low-latency network primitives necessary for persistent AI voice interfaces and complex microservices.

If you build systems relying on bi-directional streams, you can now abandon complex Envoy proxy bridges and REST fallbacks. The release enables edge compute layers to accept and route raw persistent connections natively.

Native Inbound TCP via Spectrum

The runtime now exposes a connect(socket) handler. This handler allows a Worker to directly accept an inbound TCP socket provided by Cloudflare Spectrum, the platform’s ingress proxy for non-HTTP traffic.

Developers interact with the raw TCP socket within the Worker environment using the standard WritableStream and ReadableStream APIs. The platform also supports socket forwarding. Inbound sockets can be passed directly from a Worker to a Durable Object or a Cloudflare Container. This maintains the continuous connection state required when you build real-time voice agents or deploy streaming transcription services.

Full-Duplex gRPC Capabilities

Cloudflare Containers now support full-duplex, bi-directional gRPC. You can forward an inbound TCP socket from the edge Worker directly to a gRPC server running inside a container, holding the two-way communication channel open for continuous streaming tasks like voice-to-text-to-voice pipelines.

For developers writing standard Worker code rather than managing raw containers, the platform introduces an automatic protocol translation layer. Workers natively serve unary and server-streaming gRPC API types. Developers write their logic using gRPC-web, and the platform handles the underlying conversion to and from standard gRPC for all incoming and outgoing requests.

Networking FeaturePrevious LimitationAugust 2026 Update
Inbound TCPHTTP/HTTPS onlyNative support via connect(socket)
gRPC Bi-directionalRequired REST fallbacksFull-duplex in Cloudflare Containers
gRPC TranslationManual proxy requiredAutomatic gRPC-to-gRPC-Web conversion
Outbound TCPSupported via VPC (June 2026)Integrates with inbound for full loop

Compute Orchestration for AI

This networking expansion aligns with Cloudflare’s broader “Agents Week” initiative, which focuses on delivering infrastructure primitives for autonomous systems. These workloads demand stateful, persistent environments rather than isolated, short-lived function execution.

The TCP update launched concurrently with @cloudflare/computer, an agent runtime designed to orchestrate state between lightweight isolates and full Linux containers based on the exact compute demands of the workload. To further simplify polyglot architecture, Workers RPC now operates natively across both Python and JavaScript environments.

By resolving the historical inability to handle HTTP/2 bidirectional streaming, Cloudflare positions its edge network as a direct alternative to traditional always-on PaaS providers for high-utilization multi-agent coordination patterns.

The inbound TCP and gRPC features require developers to request access via Cloudflare’s private beta signup form. If your architecture currently relies on proxy layers or REST polling to simulate persistent connections, you should evaluate your microservices to determine which routing layers can be simplified through direct edge socket termination.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading