-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
.NETagentsIssues related to single agentsIssues related to single agentsblocked externalThis label indicates whenever an issue or a PR cannot proceed due to an external dependencyThis label indicates whenever an issue or a PR cannot proceed due to an external dependencypythonv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Description
Part of #3440
Summary
Add an \AIContextProvider\ implementation for Azure AI Foundry Memory service, enabling agents to store and retrieve long-term memories automatically.
Implementation Details
New Package: Microsoft.Agents.AI.FoundryMemory
Introduces \FoundryMemoryProvider, a context provider that integrates with Azure AI Foundry's managed memory service. The provider automatically extracts memories from conversations and retrieves relevant memories to augment agent context on each invocation, following the same pattern established by the Mem0 provider.
Features
- FoundryMemoryProvider implementing \AIContextProvider\ with automatic memory extraction and retrieval
- Scoped memory storage by configurable identifier (e.g., user ID) for multi-tenant scenarios
- Memory store management:
- \EnsureMemoryStoreCreatedAsync()\ - Create memory stores with specified chat and embedding models
- \EnsureStoredMemoriesDeletedAsync()\ - Clear memories for a scope
- Async update polling: \WhenUpdatesCompletedAsync()\ polls pending memory updates in parallel until completion
- Session serialization/deserialization support for state persistence
- Configurable options: max memories, update delay, and context prompt
Configuration
| Option | Default | Description |
|---|---|---|
| \MemoryStoreName\ | (required) | Name of the memory store in Azure AI Foundry |
| \MaxMemories\ | 5 | Maximum memories to retrieve per search |
| \UpdateDelay\ | 0 | Delay in seconds before processing updates |
| \ContextPrompt\ | (default) | Custom prompt prefix for injected memories |
Environment Variables (Sample)
- \FOUNDRY_PROJECT_ENDPOINT\ - Azure AI Foundry project endpoint
- \FOUNDRY_PROJECT_MEMORY_STORE_NAME\ - Memory store name
- \FOUNDRY_PROJECT_MODEL\ - Chat model deployment name
- \FOUNDRY_PROJECT_EMBEDDING_MODEL\ - Embedding model deployment name
Deliverables
- \Microsoft.Agents.AI.FoundryMemory\ package with provider implementation
- Unit tests for constructor validation and serialization
- Integration tests (skipped by default, requires Azure setup)
- Sample application demonstrating end-to-end usage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETagentsIssues related to single agentsIssues related to single agentsblocked externalThis label indicates whenever an issue or a PR cannot proceed due to an external dependencyThis label indicates whenever an issue or a PR cannot proceed due to an external dependencypythonv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GA
Type
Projects
Status
In Progress