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¶
A Strands |
Module Contents¶
- class airflow.providers.common.ai.durable.strands_storage.TaskStateStoreStorage(accessor)[source]¶
Bases:
strands.storage.StorageA Strands
Storagethat 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 withNEVER_EXPIRE, so a retry finds them whateverretry_delayor 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"].