microsoft / microsoft/agent-framework
.NET: [Bug]: Unable to get chat history from WorkflowSession
@peibekwe is already working on this.
Since Jul 7, 2026.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
### Description
When using a workflow as agent there is currently no way to access the chat history of the WorkflowSession in a comfortable way.
I have tried the following three things:
- As WorkflowSession is internal we can't access the public ChatHistoryProvider property (which is of type WorkflowChatHistoryProvider).
- We also can't supply an own implementation of ChatHistoryProvider for a WorkflowSession because in the ctor the following code is called:
`this.ChatHistoryProvider = new WorkflowChatHistoryProvider();`
- The StateBag stores the WorkflowChatHistoryProvider in a serialized way. But I can't extract it back from the StateBag because WorkflowChatHistoryProvider is also internal.
### Package Versions
Microsoft.Agents.AI.Workflows:1.13.0
### .NET Version
.NET 10
### Additional Context
_No response_
Contributor guide
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.
Assessment
This issue has not been assessed yet.