Description
Microsoft.Agents.AI.Hosting and Microsoft.Agents.AI.Foundry.Hosting expose different AgentSessionStore abstractions. Storage implementations therefore depend on a specific hosting package and cannot be reused consistently across hosting protocols.
Promote the Foundry Hosting contract to Microsoft.Agents.AI.Abstractions as the shared experimental Microsoft.Agents.AI.AgentSessionStore type. The shared contract should return null for missing sessions, provide an explicit get or create operation, and require callers to provide the nullable user partition explicitly. Hosting packages and storage implementations should consume this single abstraction.
This differs from #6082 and PR #6191. Those track a documentation correction for the previous Hosting contract. This proposal replaces that contract and aligns its behavior with Foundry Hosting.
Code Sample
AgentSession session = await store.GetOrCreateSessionAsync(
agent,
conversationId,
userId,
cancellationToken);
await store.SaveSessionAsync(
agent,
conversationId,
session,
userId,
cancellationToken);
Language/SDK
.NET
Description
Microsoft.Agents.AI.HostingandMicrosoft.Agents.AI.Foundry.Hostingexpose differentAgentSessionStoreabstractions. Storage implementations therefore depend on a specific hosting package and cannot be reused consistently across hosting protocols.Promote the Foundry Hosting contract to
Microsoft.Agents.AI.Abstractionsas the shared experimentalMicrosoft.Agents.AI.AgentSessionStoretype. The shared contract should returnnullfor missing sessions, provide an explicit get or create operation, and require callers to provide the nullable user partition explicitly. Hosting packages and storage implementations should consume this single abstraction.This differs from #6082 and PR #6191. Those track a documentation correction for the previous Hosting contract. This proposal replaces that contract and aligns its behavior with Foundry Hosting.
Code Sample
Language/SDK
.NET