microsoft / microsoft/agent-framework
.NET: Consolidate InMemoryAgentSessionStore in Microsoft.Agents.AI
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
### Description
Track Wesley's follow-up suggestion from PR #7991: https://github.com/microsoft/agent-framework/pull/7991#discussion_r4007878901.
Promote a reusable `InMemoryAgentSessionStore` to the `Microsoft.Agents.AI` package, alongside `ChatClientAgent` and `DelegatingAgentSessionStore`, and consolidate the existing implementations in Hosting and Foundry.Hosting. This is intentionally out of scope for #7991.
Both implementations store serialized sessions in concurrent dictionaries and deserialize independent session instances on lookup. Their agent identity behavior differs: Hosting uses `agent.Id`; Foundry.Hosting uses a resolved hosting identity, with an instance-ID fallback for unnamed agents. Define how that hosting-specific behavior is preserved without adding Foundry dependencies to the core package.
Expected outcome:
- One reusable core implementation, with hosting packages using it or a thin adapter where identity behavior requires one.
- Preserve partition isolation, independent restored sessions, and experimental API annotations.
- Update registrations, public API declarations, documentation, and tests.
### Code Sample
Proposed usage after promotion:
```csharp
using Microsoft.Agents.AI;
AgentSessionStore store = new InMemoryAgentSessionStore();
```
### Language/SDK
.NET
Contributor guide
Research direction
Start by comparing the existing InMemoryAgentSessionStore implementations in Hosting and Foundry.Hosting, along with their registrations, public API declarations, documentation, and tests. Define how hosting-specific agent identity can remain available without Foundry dependencies in Microsoft.Agents.AI. Done means one reusable core implementation or a thin adapter, with partition isolation, independent restored sessions, and experimental API annotations preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100