  Many homotopy-coherent algebraic structures can be described by Segal-type
limit conditions determined by an "algebraic pattern", bywhich we mean an
$\infty$-category equipped with a factorization system and a collection of
"elementary" objects. Examples of structures that occur as such "Segal
$\mathcal{O}$-spaces" for an algebraic pattern $\mathcal{O}$ include
$\infty$-categories, $(\infty,n)$-categories, $\infty$-operads,
$\infty$-properads, and algebras for an $\infty$-operad in spaces.
  In the first part of this paper we set up a general frameworkn for algebraic
patterns and their Segal objects, including conditions under which the latter
are preserved by left and right Kan extensions. In particular, we obtain
necessary and sufficent conditions on a pattern $\mathcal{O}$ for free Segal
$\mathcal{O}$-spaces to be described by an explicit colimit formula, in which
case we say that $\mathcal{O}$ is "extendable".
  In the second part of the paper we explore the relationship between
extendable algebraic patterns and polynomial monads, by which we mean cartesian
monads on presheaf $\infty$-categories that are accessible and preserve weakly
contractible limits. We first show that the free Segal $\mathcal{O}$-space
monad for an extendable pattern $\mathcal{O}$ is always polynomial. Next, we
prove an $\infty$-categorical version of Weber's Nerve Theorem for polynomial
monads, and use this to define a canonical extendable pattern from any
polynomial monad, whose Segal spaces are equivalent to the algebras of the
monad. These constructions yield functors between polynomial monads and
extendable algebraic patterns, and we show that these exhibit full
subcategories of "saturated" algebraic patterns and "complete" polynomial
monads as localizations, and moreover restrict to an equivalence between the
$\infty$-categories of saturated patterns and complete polynomial monads.
