-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
.NETagent memoryRelated to agentic memoryRelated to agentic memoryagentsIssues related to single agentsIssues related to single agentsv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Description
Description:
In the Python implementation, when multiple context providers are passed to the agent constructor (e.g., context_providers=[provider1, provider2]), the framework automatically creates an AggregateContextProvider that aggregates them. This allows seamless combination of multiple providers (e.g., memory + RAG + custom state) without manual merging.
In the .NET implementation (Microsoft.Agents.AI), the ChatClientAgentOptions.AIContextProviderFactory only accepts a single AIContextProvider. There is no built-in AggregateAIContextProvider (or equivalent) class, and no automatic aggregation when multiple providers are needed.
Just like this in Python samples
# Create multiple context providers
provider1 = CustomContextProvider1()
provider2 = CustomContextProvider2()
provider3 = CustomContextProvider3()
# Pass them to the agent - AggregateContextProvider is created automatically
agent = ChatAgent(chat_client=client, name="assistant", context_providers=[provider1, provider2, provider3])
# Verify that an AggregateContextProvider was created
assert isinstance(agent.context_providers, AggregateContextProvider)
# Add additional providers to the agent
provider4 = CustomContextProvider4()
agent.context_providers.add(provider4)
Metadata
Metadata
Assignees
Labels
.NETagent memoryRelated to agentic memoryRelated to agentic memoryagentsIssues related to single agentsIssues related to single agentsv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Type
Projects
Status
Done