Skip to content

strands.multiagent.spec

Multi-Agent Specification and Resolution.

Provides the authority-mode system for model-driven multi-agent patterns, where the model configures child agents at runtime. The developer sets axis policies that shape the parameters the model sees and govern what values it can supply:

  • Fixed — developer-pinned value; hidden from the model.
  • Inherit — value taken from the parent agent; hidden from the model.
  • Open — model supplies a free-form value.
  • Choice — model picks from a developer-supplied set.
@dataclass(frozen=True)
class Fixed()

Defined in: src/strands/multiagent/spec.py:44

The developer pins the value; the axis contributes no model-facing parameter.

@dataclass(frozen=True)
class Inherit()

Defined in: src/strands/multiagent/spec.py:51

The child takes the parent’s value; the axis contributes no model-facing parameter.

@dataclass(frozen=True)
class Open()

Defined in: src/strands/multiagent/spec.py:56

The model writes the value freely; the axis contributes a string parameter.

@dataclass(frozen=True)
class Option()

Defined in: src/strands/multiagent/spec.py:61

A selectable entry in a Choice.

@dataclass(frozen=True)
class Choice()

Defined in: src/strands/multiagent/spec.py:70

The model picks from a developer-supplied set.

Each entry is a bare name or an Option. Set multiple=True to let the model pick more than one.

def normalized() -> list[Option]

Defined in: src/strands/multiagent/spec.py:80

The options as Options with value resolved, wrapping any bare name.

def value_for(name: str) -> Any

Defined in: src/strands/multiagent/spec.py:92

The resolved value behind name, or name itself if unknown.

Any authority mode an axis can take.

@dataclass(frozen=True)
class Preset()

Defined in: src/strands/multiagent/spec.py:105

A named role: a partially applied child configuration selected via agent_type.

@dataclass
class AgentSpec()

Defined in: src/strands/multiagent/spec.py:115

The resolved child configuration handed to the builder.