Documentation index for AI agents: see /llms.txt. Markdown versions of every page are available at <path>.md or via Accept: text/markdown.
Reference

Plans

Typed plan declarations. define_plan(...) accepts JSON Schema, Pydantic models, or a {name: type} shorthand and produces a frozen PlanSpec.

Typed plan declarations. define_plan(...) accepts JSON Schema, Pydantic models, or a {name: type} shorthand and produces a frozen PlanSpec.

define_plan

define_plan(name: 'str', schema: 'Any', display_aliases: 'Mapping[str, str] | Iterable[PlanDisplayAlias | Mapping[str, str]]' = ()) -> 'PlanSpec'

ParameterTypeDefault
namestrrequired
schemaAnyrequired
display_aliasesMapping[str, str] | Iterable[PlanDisplayAlias | Mapping[str, str]]()

Returns: PlanSpec

Create a validated Flow AI plan spec.

Args: name: Unique plan name within the runtime spec. schema: Action schema for plan items: a JSON Schema mapping, a Pydantic model class, a simple type map, or any type hint Pydantic can export. display_aliases: Display names for fixed plan lifecycle statuses, either a {status: alias} mapping or an iterable of PlanDisplayAlias / mappings. Statuses are limited to draft, approved, executing, executed, and failed.

Returns: A frozen, validated PlanSpec.

Raises: ValueError: If a display alias names an unsupported status. TypeError: If the schema input cannot be normalized to JSON Schema.

PlanSpec

PlanSpec(*, name: str, schema: dict[str, typing.Any], displayAliases: list[PlanDisplayAlias] = <factory>) -> None

ParameterTypeDefault
namestrrequired
schemadictrequired
displayAliaseslist<factory>

Returns: None

Plan declaration compiled by flowai-runtime to Plan<HarnessAction>.

PlanDisplayAlias

PlanDisplayAlias(*, status: Literal['draft', 'approved', 'executing', 'executed', 'failed'], alias: str) -> None

ParameterTypeDefault
statustyping.Literalrequired
aliasstrrequired

Returns: None

Display alias for one fixed Flow AI plan lifecycle status.