A fully managed platform in Microsoft Foundry for hosting, scaling, and securing AI agents built with any supported framework or model
Hi @Mohamed Rihan,
Thank you for the detailed explanation of your architecture and requirements.
For Microsoft Foundry Agent Service, the recommended approach is to use the built-in memory capability (preview) when your goal is to retain user-specific information such as preferences across conversations. The service provides managed memory stores that can be associated with agents and used to persist information beyond a single chat session.
Regarding your specific questions:
- Persistent user memory can be implemented using Foundry Agent Service memory stores rather than building a custom memory layer from scratch.
- Session-only context should remain in the current conversation/thread and should not be written to long-term memory unless you explicitly want it persisted.
- Per-user isolation is supported by scoping memory to a user identifier. For Teams integrations, a common pattern is to use the Teams/Bot user identity as the key for memory retrieval and storage.
- If a user updates a preference, the application or agent logic can update the stored memory, so the latest preference supersedes the previous value.
- Memory items can be managed programmatically, allowing backend processes to read, update, and remove stored memory as needed.
- Microsoft has published memory concepts, how-to guidance, and quickstart samples for Foundry Agent Service memory, which cover creating memory stores, attaching memory to agents, and implementing persistent memory scenarios.
From the requirements you've described (persistent preferences, per-user storage, session-only instructions, and backend management), the built-in Foundry memory capability appears to align well with your use case without requiring a separate custom database for memory management.
I recommend reviewing the Foundry Agent Service memory documentation and quickstart samples to determine whether the preview functionality meets your production requirements before implementing a custom solution.
Hope this helps clarify the supported approach.