airflow.providers.common.ai.durable.strands_storage

A Strands Agents Storage backed by the task state store.

Available on Airflow >= 3.3, where the task state store keeps key/value state for a task instance across its tries within a Dag run; NEVER_EXPIRE does not exist on older Airflow versions.

Classes

TaskStateStoreStorage

A Strands Storage that keeps its keys in the running task instance's task state store.

Module Contents

class airflow.providers.common.ai.durable.strands_storage.TaskStateStoreStorage(accessor)[source]

Bases: strands.storage.Storage

A Strands Storage that keeps its keys in the running task instance’s task state store.

The keys share the task instance’s key namespace with anything user code writes through context["task_state_store"], under a reserved prefix that keeps them apart. They are written with NEVER_EXPIRE, so a retry finds them whatever retry_delay or the retention config is. Keys left behind by a task that never succeeds are removed with the Dag run.

A value that is valid UTF-8, such as a Strands session snapshot, is stored as text, and anything else as base64.

Parameters:

accessor (airflow.sdk.execution_time.context.TaskStateStoreAccessor) – The task state store of the running task instance, context["task_state_store"].

async write(key, data)[source]
async read(key)[source]
async delete(key)[source]
async list(query='')[source]

Was this entry helpful?