Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions sdk/agentserver/azure-ai-agentserver-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@

### Bugs Fixed

- Preserve environment and configuration rollback snapshots across failed
restore cleanup retries so sparse overrides retain the captured baseline.
- Retry interrupted restore rollback cleanup before activating a replacement
TaskManager, retaining queued-input reconciliation handles across transient
storage failures.
- Reset task startup admission when reusing a host across sequential lifespans.
- Reconcile interrupted steering transitions before restore rollback completes,
retaining queued work as recoverable without dispatching a new turn.
- Preserve unfinished task records and saved inputs when failed restore
activation stops workers before rolling back session configuration.
- Keep the lease instance stable on same-restore retries, retain worker and
lease handles until workers finish, and defer steering execution during
rollback while keeping queued input eligible for recovery.

### Other Changes

## 2.3.0b1 (2026-10-15)
Expand All @@ -30,6 +44,13 @@
the restored session through the ambient request context during callbacks.
Environment-backed `AgentConfig` values are refreshed in place before
callbacks run, and `AgentSessionContext` is marked experimental.
- Separate process-side task registration from session-bound task activation.
`FOUNDRY_MEMORY_SNAPSHOT_ENABLED=true` defers enabled tasks during capture until
after-restore; absent or false keeps ordinary cold startup. Resilience opt-out
Comment on lines +47 to +49
remains disabled for both initialization paths. Preserve
best-effort recovery, checkpoint initialization phases by restore ID, wait for
owned workers to stop before incompatible configuration rollback, and stop
managers created after startup at shutdown.

### Bugs Fixed

Expand Down
24 changes: 24 additions & 0 deletions sdk/agentserver/azure-ai-agentserver-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

The `azure-ai-agentserver-core` package provides the foundation host framework for building Azure AI Hosted Agent containers. It handles the protocol-agnostic infrastructure — health probes, graceful shutdown, OpenTelemetry tracing, and ASGI serving — so that protocol packages can focus on their endpoint logic.

## Memory snapshot task initialization

The draft integration separates task definitions from session-bound TaskManager
initialization. Resilient tasks must still be explicitly enabled.

`FOUNDRY_MEMORY_SNAPSHOT_ENABLED=true` defers enabled tasks in the temporary
capture sandbox until the platform after-restore hook, after session hydration
and dependency callbacks. An absent value or `false` activates enabled tasks
during ordinary cold/local startup. `set_resilient_tasks_enabled(False)` keeps
the subsystem disabled at startup and after-restore regardless of this variable.
Present values must be literal `true` or `false` (case-insensitive). The variable
does not gate running tasks or lease renewal after activation.

Task startup checkpoints completed phases by restore ID and owns the manager
through shutdown, including managers created after lifespan startup. Existing
best-effort recovery dispatches reclaimed work immediately during the hook.
FHA admits new requests after successful restore.

Author startup task submissions are not queued or replayed by this integration.
No session-start callback or launch-intent registry is included. Local tests are
not proof of hosted golden restoration. See the [design specification](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/agentserver/azure-ai-agentserver-core/docs/memory-snapshot-task-integration.md)
for lifecycle ordering, launcher compatibility requirements, validation, and
the unresolved startup-submission options.

## Getting started

### Install the package
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
from collections.abc import Mapping
from dataclasses import dataclass, field
from types import MappingProxyType
from typing import Awaitable, Callable, Optional
from typing import TYPE_CHECKING, Awaitable, Callable, Optional

from ._experimental import experimental

if TYPE_CHECKING:
from .tasks._manager import TaskManager


@experimental
@dataclass(frozen=True, init=False)
Expand Down Expand Up @@ -45,6 +48,13 @@ def __init__(
)


@dataclass
class _LifecycleRollback:
environment: dict[str, object] = field(repr=False)
config: dict[str, object] = field(repr=False)
task_manager: Optional["TaskManager"]


@dataclass
class _LifecycleState:
lock: asyncio.Lock = field(default_factory=asyncio.Lock)
Expand All @@ -56,3 +66,4 @@ class _LifecycleState:
completed_restore_ids: set[str] = field(default_factory=set)
captured_environment_values: dict[str, Optional[str]] = field(default_factory=dict)
applied_environment_variables: set[str] = field(default_factory=set)
pending_rollback: Optional[_LifecycleRollback] = None
Loading
Loading