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

Tenant

A tenant identifies the customer, workspace, deployment, or test environment that a runtime is executing for. Flow AI uses tenant identity to scope runtime-owned state such as...

A tenant identifies the customer, workspace, deployment, or test environment that a runtime is executing for. Flow AI uses tenant identity to scope runtime-owned state such as plans, references, approvals, events, and data access.

Use define_tenant(...) to create the TenantIdentity passed into define_runtime(...). Choose tenant ids from trusted application state such as auth, workspace configuration, or deployment config. Do not use tenant identity as hidden prompt context; put business instructions in prompts, tools, or retrieved configuration instead.

For the full mental model, see the Tenants concept.

define_tenant

define_tenant(tenant: 'str | Mapping[str, Any] | TenantIdentity | None' = None, /, version: 'str | None' = None, *, resource_id: 'str | None' = None, **kwargs: 'Any') -> 'TenantIdentity'

ParameterTypeDefault
tenantstr | Mapping[str, Any] | TenantIdentity | NoneNone
versionstr | NoneNone
resource_idstr | NoneNone
kwargsAnyrequired

Returns: TenantIdentity

Create a validated Flow AI tenant identity.

Accepts define_tenant("acme", "v1"), a mapping, an existing TenantIdentity, or keyword arguments.

Args: tenant: Positional resource id string, mapping of tenant fields, or an existing TenantIdentity to copy from. version: Tenant configuration version label, e.g. "v1". resource_id: Keyword override for the tenant resource id. **kwargs: Additional fields merged into the validated payload.

Returns: A frozen, validated TenantIdentity.

Raises: pydantic.ValidationError: If resource_id or version is missing or empty.

TenantIdentity

TenantIdentity(*, resourceId: Annotated[str, MinLen(min_length=1)], version: Annotated[str, MinLen(min_length=1)]) -> None

ParameterTypeDefault
resourceIdstrrequired
versionstrrequired

Returns: None

Runtime tenant identity aligned with agent_fw_core::TenantId.

ParameterTypeDefaultDescription
resource_idstrrequiredStable tenant resource identifier; scopes runtime storage and data access.
versionstrrequiredTenant configuration version label, e.g. 'v1'.