mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
3446eb8d5d
* updates to final deprecated pieces and versions * fix mypy * fix readme links
3446eb8d5d
·
2026-04-02 15:26:30 +00:00
History
Context Provider Samples
These samples demonstrate how to use context providers to enrich agent conversations with external knowledge — from custom logic to Azure AI Search (RAG) and memory services.
Samples
| File / Folder | Description |
|---|---|
simple_context_provider.py |
Implement a custom context provider by extending ContextProvider to extract and inject structured user information across turns. |
azure_ai_foundry_memory.py |
Use FoundryMemoryProvider to add semantic memory — automatically retrieves, searches, and stores memories via Azure AI Foundry. |
azure_ai_search/ |
Retrieval Augmented Generation (RAG) with Azure AI Search in semantic and agentic modes. See its own README. |
mem0/ |
Memory-powered context using the Mem0 integration (open-source and managed). See its own README. |
redis/ |
Redis-backed context providers for conversation memory and sessions. See its own README. |
Prerequisites
For simple_context_provider.py:
FOUNDRY_PROJECT_ENDPOINT: Your Azure AI Foundry project endpointFOUNDRY_MODEL: Model deployment name- Azure CLI authentication (
az login)
For azure_ai_foundry_memory.py:
FOUNDRY_PROJECT_ENDPOINT: Your Azure AI Foundry project endpointFOUNDRY_MODEL: Chat/responses model deployment nameAZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME: Embedding model deployment name (e.g.,text-embedding-ada-002)- Azure CLI authentication (
az login)
See each subfolder's README for provider-specific prerequisites.