Designer guide
Component definition > Concrete repeated fragments > StreamsRepeated graph components
A component names repeated connected parts of a service graph. It is not a group of whole pipelines and does not replace the underlying execution nodes.
When to use
Use components to make repeated business processes easier to recognize, inspect and collapse.
Behavior
- Open
Componentsin the left navigation and choose a service. SetMinimum nodesandMaximum nodes, then chooseFind repeated fragments. - Matching compares stream kinds, message types, function identity (including module, package and initializer group), internal connections and incoming call semantics. Similar labels or coordinates do not make two fragments equivalent.
- Incoming connections participate in matching, but their external source nodes are not component members. Outgoing connections preserve their message contract; the receiving context owns their call policy.
- Proposals aim to minimize the number of visible nodes after collapsing. A fragment of N nodes repeated R times saves R * (N - 1) visible nodes. Selection considers competing non-overlapping patterns, not just the largest fragment.
- Saved component entries start collapsed in the sidebar. Expand an entry to inspect its repetitions, labeled with their pipeline names. Showing one repetition uses a compact local view; external connections can be hidden without removing them.
- Inspect a pattern and use
Showto highlight a concrete fragment. Choose at least two non-overlapping repetitions, enter a name and optional description, and create the component. - An expanded repetition has a surrounding frame. Use the component title/card to collapse or expand it; the toolbar can collapse or expand all components. Each collapsed repetition has its own card and preserves boundary connections.
- Removing a component removes only its visual grouping. Streams, connections, functions and pipelines remain intact. View collapse state is local and does not introduce an execution wrapper.
- The embedded MCP Designer supports discovery, preview, navigation and collapse/expand. Its read-only mode does not expose component creation, rebuild application or removal.
Equivalent Python authoring
# Declare each pipeline and its concrete streams normally.
# Connect the streams before registering their repeated fragments.
load_create >> price_create
load_update >> price_update
pricing = service.component(
"Customer Pricing",
description="Load customer data and calculate the effective price.",
)
pricing.fragment(load_create, price_create)
pricing.fragment(
load_update, price_update,
appearance=Appearance(x=400, y=200),
)
# load_create/load_update use the same function identity.
# price_create/price_update use the same function identity.
# The four streams remain separate runtime nodes.