FoundryConversationChainStore(
self,
credential: AsyncTokenCredential | None = None,
endpoint: FoundryStorageEndpoint | str| Name | Type | Description |
|---|---|---|
credential | AsyncTokenCredential | None | Default: NoneOptional async Azure credential. |
endpoint | FoundryStorageEndpoint | str | None | Default: NoneFoundry project or storage endpoint. |
user_isolation | bool | Default: FalseWhether the underlying state store isolates items by
the Foundry-resolved user. Defaults to |
item_ttl_seconds | int | Default: DEFAULT_ITEM_TTL_SECONDS |
description | str | None | Default: 'LangChain conversation state' |
tags | Mapping[str, str] | None | Default: None |
user_id | str | None | Default: None |
api_version | str | Default: 'v1' |
on_mismatch | Literal['fail', 'ignore'] | Default: 'fail' |
kwargs | Any | Default: {} |
Store each conversation chain in a separate FoundryStateStore.
Store creation and reuse follow FoundryStateStore.get_or_create semantics.
user_isolation, item_ttl_seconds, description, and tags apply
only when the underlying store is first created. Existing stores retain
their settings; neither mismatch policy updates them.
By default, each read and write fetches the store properties and fails before
item access if isolation or TTL differs from this instance's options. Set
on_mismatch="ignore" to skip this validation and use existing settings.
In that mode, passing user_isolation=True does not enable isolation on
an existing non-isolated store; callers must ensure its settings are suitable.
Example:
Require Foundry user isolation, rejecting incompatible stores::
from langchain_azure_ai.agents.hosting import (
FoundryConversationChainStore,
)
store = FoundryConversationChainStore(user_isolation=True)
Explicitly retain existing store settings instead::
store = FoundryConversationChainStore(on_mismatch="ignore")
Write-sliding item TTL fixed when each state store is
first created. Defaults to DEFAULT_ITEM_TTL_SECONDS (30 days).
-1 disables expiration. Checked on reuse unless
on_mismatch="ignore".
Description assigned when each state store is created.
Metadata tags assigned when each state store is created.
Delegated end-user identity for trusted callers.
Foundry storage API version.
Policy for isolation or TTL mismatches. "fail" (default)
raises ValueError on reads and writes. "ignore" skips the
property check and retains the existing settings. Description and
tags are not compared. Backend errors propagate under both policies.
Additional options forwarded to FoundryStateStore.