microsoft / microsoft/agent-framework

.NET: [Feature]: Add ability to define a custom ChatHistoryProvider for Workflow as Agent

Open
#6,327 2 comments 7 reactions 1 assignee View on GitHub

@peibekwe is already working on this.

Since Jun 4, 2026.

.NET
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

### Description

When I create a Workflow as an Agent, for example:

```csharp
var agent = AgentWorkflowBuilder.BuildSequential(agent1, agent2).AsAIAgent();
var session = await agent.CreateSessionAsync();
```

The `CreateSessionAsync` method creates a [WorkflowSession](https://github.com/microsoft/agent-framework/blob/dotnet-1.9.0/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs) that always uses a `WorkflowChatHistoryProvider`:

https://github.com/microsoft/agent-framework/blob/afa7834e2ec8a93b2224fe7ab184b97fbcaa8c9a/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs#L90

It would be useful to have the ability to specify a custom chat history provider, or change its properties, as is possible with regular Agents.

### Language/SDK

.NET

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.