Compound elements

Most element types are flat atoms: one type, one directory, dispatched on its own. A few are compound — a parent type with named child types that nest under it on disk but are dispatched as top-level element types in their own right. This page is the reference for what compound means and which elements are built this way.

The shape

A compound element is a parent whose children live under its directory but are real, independently-dispatched element types. There are two in the platform:

  • automation (apps) nests condition, loop, and wait — the control-flow pieces of a flow: branch, repeat, pause.
  • lab (intelligence) nests brain, ears, and mouth — the modalities of the LLM workspace: reasoning, speech-to-text, text-to-speech.

On disk the children sit beneath their parent (chemistry/elements/apps/automation/condition/, chemistry/elements/intelligence/lab/brain/, and so on). But the generated get_category_for_element_type map registers each child as a top-level element type — so a condition is a first-class element you compose into a flow and invoke operations on, even though it only exists meaningfully inside an automation.

Why nest at all

The nesting expresses a real relationship: a child is a part of its parent, not a free-standing peer. A mouth is the voice of a lab; a loop is a step of an automation. Authoring them under the parent keeps that belonging legible in the source tree and in the docs, while the top-level dispatch keeps each child a proper element — with its own operations, properties, validation, and docs — rather than a buried configuration blob. You get both: the part-of relationship and the first-class element.

How elements relate this way — parent/child belonging versus the flat composition of ordinary elements — is its own concept.

→ Concept: composition

What compound is not

Two things that look like compound but aren’t:

  • Nested data that is just configuration. chemistry/elements/intelligence/brains/ holds concrete brain configs — openai, anthropic, gemini, and so on. These are configuration storage for the brain element, not element types of their own. They never appear in the dispatch map.
  • Elements grouped inside a circle. Putting several ordinary elements in one circle is not compounding — those elements sit flat under the circle and compose by lookup and operation dispatch, with no parent/child nesting. Compound is a property of an element type’s definition, not of how you arrange instances.

Related