Add C# content to the Self-hosting doc, including session storage customization (match Python coverage)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- documentation
Research direction
Start with agent-framework/hosting/self-hosting/index.md and compare the existing Python pivot with the C# stub. Verify the documented .NET APIs in Microsoft.Agents.AI.Hosting and Microsoft.Agents.AI.Hosting.AspNetCore, including session stores and isolation options. Done means the C# section covers the equivalent hosting, persistence, and secure session-continuation guidance without leaving the current stub.
Written by the indexing model from the issue text.
Description
Summary
The Self-host Agent Framework applications doc has full Python coverage but only a "coming soon" stub for C#. The C# pivot should be filled in to match the Python content, and in particular should cover customizing session storage (and the related secure-session-continuation / principal-isolation guidance), which is where that content belongs — it's a general hosting concern, not specific to any one protocol integration.
Source file:
agent-framework/hosting/self-hosting/index.md(inMicrosoftDocs/semantic-kernel-pr).
Current state
- C# pivot: "Self-hosting protocol helpers for .NET are coming soon." (stub)
- Go pivot: "not currently available for Go."
- Python pivot: fully documented, including:
- What the hosting helpers provide (
AgentState,SessionStore,WorkflowState) - Customize session storage — subclass
SessionStore(get/set/delete), storeAgentSessionin Redis/DB/blob,AgentState(session_store=...), and theSessionStorevs.HistoryProviderdistinction - Secure session continuation — treat protocol-provided IDs as untrusted; authenticate, authorize, and partition durable state per tenant/user
- What the hosting helpers provide (
What the C# content should cover
The .NET hosting equivalents already ship and should be documented here:
- Registering a session store:
IHostedAgentBuilder.WithInMemorySessionStore(bool withIsolation = true)andWithSessionStore(...)(namespaceMicrosoft.Agents.AI.Hosting), plus implementing a customAgentSessionStorefor Redis/DB/blob-backed persistence. - Principal isolation for multi-user hosts:
SessionIsolationKeyProviderandUseClaimsBasedSessionIsolation(...)(namespaceMicrosoft.Agents.AI.Hosting.AspNetCore). This is the C# analog of the Python "Secure session continuation" guidance and is a general hosting concern — the same isolation types are used by the AG-UI, A2A, and Foundry hosting integrations. - Important default behavior to call out (verified):
WithInMemorySessionStore()defaults towithIsolation: true, which requires a registeredSessionIsolationKeyProvider. With no provider registered, requests fail closed with an HTTP 500 ("Session isolation key is required..."). Guidance:withIsolation: falsefor single-user / local development.UseClaimsBasedSessionIsolation(...)(or a customSessionIsolationKeyProvider) for multi-user hosts.- Persistence is opt-in; by default a self-hosted agent endpoint is stateless.
Why now / context
While updating the AG-UI C# docs (PR #430), we drafted a "Persisting Sessions" section in the AG-UI getting-started. On review, server-side session storage + principal isolation turned out to be a general MAF hosting concern (shared by AG-UI, A2A, and Foundry hosting), not AG-UI-specific, so we removed it from the AG-UI getting-started. The Python docs already document it in one shared place — the self-hosting doc — and the C# content should live there too.
- Dominant language
- Mermaid
- Stars
- 263
- Forks
- 167
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MicrosoftDocs/semantic-kernel-docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MicrosoftDocs/semantic-kernel-docs#434 · 1 reaction ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
All issues in MicrosoftDocs/semantic-kernel-docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·