Skip to content

Block

A block is one node of a flow: a named, configurable step that takes typed input on its input ports and produces typed output on its output ports. Blocks wrap the Cloudflare services and the external calls an AI application makes, so composing them replaces writing the glue code between those services by hand.

What it means

Every block in the catalogue declares the same three things: the configuration it accepts, the shape of the data on each of its ports, and the category it belongs to. Because the declaration is a schema rather than documentation, the composer can validate a graph, and the runtime can reject a malformed payload at the boundary instead of deep inside a provider call.

How SwiftTune uses it

The palette groups blocks by the order a flow is built in: triggers, then the blocks that do the work, then the response. Workers AI, AI Gateway, Vectorize, R2, Queues, Agents, AI Search, MCP, session memory and HTTP each ship as a block, and the same catalogue drives both the palette and the validator — so a block you can drag is always a block the validator accepts.

Primary sources