{"id":12813,"date":"2026-08-24T09:04:43","date_gmt":"2026-08-24T16:04:43","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=12813"},"modified":"2026-08-24T09:05:48","modified_gmt":"2026-08-24T16:05:48","slug":"powering-memory-in-foundry-agent-service-with-azure-cosmos-db","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/powering-memory-in-foundry-agent-service-with-azure-cosmos-db\/","title":{"rendered":"Powering Memory in Foundry Agent Service, with Azure Cosmos DB"},"content":{"rendered":"<div class=\"prc-PageLayout-PageLayoutRoot--KH-d\" data-component=\"SplitPageLayout\" data-has-sidebar=\"true\">\n<div class=\"prc-PageLayout-PageLayoutWrapper-2BhU2\" data-width=\"full\">\n<div class=\"prc-PageLayout-PageLayoutContent-BneH9\">\n<div class=\"prc-PageLayout-ContentWrapper-gR9eG\" data-component=\"SplitPageLayout.Content\" data-is-hidden-narrow=\"false\">\n<div class=\"prc-PageLayout-Content-xWL-A\" data-width=\"full\">\n<div id=\"repos-split-pane-content\" class=\"SharedPageLayout-module__content__IwGAp\" tabindex=\"0\" data-selector=\"repos-split-pane-content\">\n<div class=\"CodeView-module__contentWrapper__cG2JH\">\n<div class=\"d-flex flex-row\">\n<div class=\"container BlobViewContent-module__blobContainer__DtH2d\">\n<div class=\"BlobViewContent-module__blobContentWrapper__JS0W6\">\n<section class=\"BlobContent-module__blobContentSection__VOgZq BlobContent-module__blobContentSectionMarkdown__mPLOK\" aria-labelledby=\"file-name-id-wide file-name-id-mobile\">\n<div class=\"js-snippet-clipboard-copy-unpositioned BlobContent-module__markdownBlob__T8jpG\" data-hpc=\"true\">\n<article class=\"markdown-body entry-content container-lg\">\n<p dir=\"auto\"><em>Move from a locally composed memory-enabled agent to a deployed Foundry Agent Service agent, with keyless Azure infrastructure and an interactive browser sample.<\/em><\/p>\n<p dir=\"auto\">In\u00a0<a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/native-agent-memory-for-microsoft-agent-framework-powered-by-azure-cosmos-db\/\" rel=\"nofollow\">Native Agent Memory for Microsoft Agent Framework, Powered by Azure Cosmos DB<\/a>, we introduced\u00a0<code>CosmosMemoryContextProvider<\/code>: a Microsoft Agent Framework context provider that extracts useful information from conversations, stores it in Azure Cosmos DB, and retrieves it before later agent runs.<\/p>\n<p dir=\"auto\">That article used a locally composed Agent Framework agent and\u00a0<code>FoundryChatClient<\/code>. It was a useful way to isolate the memory concepts: one provider, two lifecycle hooks, and a stable user identity across new chat sessions.<\/p>\n<p dir=\"auto\">This post takes the next step. In our featured <a href=\"https:\/\/github.com\/AzureCosmosDB\/foundry-cosmos-memory\" target=\"_blank\" rel=\"noopener\">sample<\/a>, we will attach the same provider to a prompt agent deployed in <a href=\"https:\/\/learn.microsoft.com\/azure\/foundry\/agents\/overview\" target=\"_blank\" rel=\"noopener\">Microsoft Foundry Agent Service<\/a>, provision the complete environment with <code>azd up<\/code>, and use a small browser app to make the difference between conversation history and long-term memory visible.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">What the sample demonstrates<\/h2>\n<\/div>\n<p dir=\"auto\">A normal chat session gives an agent short-term context. When that session ends, its message history no longer follows the user automatically.<\/p>\n<p dir=\"auto\">Long-term memory has a different scope. In this sample:<\/p>\n<ul dir=\"auto\">\n<li>A\u00a0<strong>Foundry Agent Service session<\/strong>\u00a0represents one conversation.<\/li>\n<li>A stable\u00a0<strong>user ID<\/strong>\u00a0scopes long-term memory in Azure Cosmos DB.<\/li>\n<li>Starting a new conversation replaces the session but keeps the user ID.<\/li>\n<li>Switching users replaces both, demonstrating memory isolation.<\/li>\n<\/ul>\n<p dir=\"auto\">The sample lets you test all four behaviors directly. Tell the agent a preference, select\u00a0<strong>New conversation<\/strong>, and ask about that preference again. Then switch to another demo user and verify that the second user does not inherit it.<\/p>\n<p dir=\"auto\">This distinction matters in production systems. A thread ID answers \u201cwhich conversation is this?\u201d A user or tenant identity answers \u201cwhose durable memory is this?\u201d Treating those as the same identifier makes it difficult to support multiple conversations safely.<\/p>\n<p dir=\"auto\"><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/08\/conversation-vs-memory-identity.svg\"><img decoding=\"async\" class=\"alignnone wp-image-12814 size-full\" role=\"img\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/08\/conversation-vs-memory-identity.svg\" alt=\"Diagram titled &quot;A new conversation is not a new memory identity.&quot; Theo's first conversation saves the fact that his favorite color is vermilion; a second conversation with no carried-over messages still recalls &quot;vermilion&quot; from Theo's memory store. Casey, a separate user_id, asks the same question in the same database but retrieves nothing of Theo's, because each user_id is its own partition and retrieval scope.\" width=\"1600\" height=\"920\" \/><\/a><\/p>\n<p dir=\"auto\"><em>Figure 1. Conversation sessions are temporary, while a stable user ID scopes durable memory and keeps different users isolated.<\/em><\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Architecture<\/h2>\n<\/div>\n<p dir=\"auto\">The deployment contains:<\/p>\n<ul dir=\"auto\">\n<li>A Microsoft Foundry account and project.<\/li>\n<li>A prompt agent in Foundry Agent Service.<\/li>\n<li><code>gpt-5-mini<\/code>\u00a0for chat and\u00a0<code>text-embedding-3-large<\/code>\u00a0for memory embeddings.<\/li>\n<li>An Azure Cosmos DB for NoSQL account and database with vector and full-text search capabilities.<\/li>\n<li>Microsoft Entra ID role assignments for keyless access.<\/li>\n<li>A local Chainlit app for the interactive experience.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/08\/foundry-cosmos-memory-architecture-1.svg\"><img decoding=\"async\" class=\"alignnone wp-image-12816 size-full\" role=\"img\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2026\/08\/foundry-cosmos-memory-architecture-1.svg\" alt=\"Architecture diagram titled &quot;Long-term memory for a Foundry Agent Service agent.&quot; A Chainlit browser chat calls agent.run() on a deployed Foundry Agent Service agent, which uses gpt-4o-mini for responses and text-embedding-3 for semantic retrieval. A CosmosMemoryContextProvider sits underneath, retrieving relevant memory before each run and storing turns and extracted facts after, against an Azure Cosmos DB memory store that supports vector and full-text search.\" width=\"1600\" height=\"900\" \/><\/a><\/p>\n<p dir=\"auto\"><em>Figure 2. The context provider participates in each agent run, retrieving relevant memory before the run and storing turns and derived memory afterward.<\/em><\/p>\n<p dir=\"auto\">The browser app is intentionally local. The goal is to keep the sample focused on the agent and memory integration, without adding a second hosted application or an authentication system. For a production application, derive the memory user ID from an authenticated identity rather than accepting a typed value.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">The integration is still one context provider<\/h2>\n<\/div>\n<p dir=\"auto\">The shared runtime creates one credential, the Cosmos memory provider, and a\u00a0<code>FoundryAgent<\/code>\u00a0bound to the deployed prompt agent:<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre><span class=\"pl-s1\">credential<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">DefaultAzureCredential<\/span>()\r\n\r\n<span class=\"pl-s1\">memory<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">CosmosMemoryContextProvider<\/span>(\r\n    <span class=\"pl-s1\">cosmos_endpoint<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">COSMOS_ENDPOINT<\/span>,\r\n    <span class=\"pl-s1\">cosmos_database<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">COSMOS_DATABASE<\/span>,\r\n    <span class=\"pl-s1\">foundry_endpoint<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">FOUNDRY_PROJECT_ENDPOINT<\/span>,\r\n    <span class=\"pl-s1\">embedding_model<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">EMBEDDING_MODEL<\/span>,\r\n    <span class=\"pl-s1\">chat_model<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">CHAT_MODEL<\/span>,\r\n    <span class=\"pl-s1\">credential<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">credential<\/span>,\r\n    <span class=\"pl-s1\">memory_types<\/span><span class=\"pl-c1\">=<\/span>[<span class=\"pl-s\">\"fact\"<\/span>, <span class=\"pl-s\">\"procedural\"<\/span>, <span class=\"pl-s\">\"episodic\"<\/span>],\r\n)\r\n\r\n<span class=\"pl-s1\">agent<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-en\">FoundryAgent<\/span>(\r\n    <span class=\"pl-s1\">project_endpoint<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">FOUNDRY_PROJECT_ENDPOINT<\/span>,\r\n    <span class=\"pl-s1\">agent_name<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">config<\/span>.<span class=\"pl-c1\">FOUNDRY_AGENT_NAME<\/span>,\r\n    <span class=\"pl-s1\">agent_version<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">os<\/span>.<span class=\"pl-c1\">getenv<\/span>(<span class=\"pl-s\">\"FOUNDRY_AGENT_VERSION\"<\/span>),\r\n    <span class=\"pl-s1\">credential<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">credential<\/span>,\r\n    <span class=\"pl-s1\">context_providers<\/span><span class=\"pl-c1\">=<\/span>[<span class=\"pl-s1\">memory<\/span>],\r\n)<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">The important line remains:<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre><span class=\"pl-s1\">context_providers<\/span><span class=\"pl-c1\">=<\/span>[<span class=\"pl-s1\">memory<\/span>]<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">Microsoft Agent Framework invokes the provider around each run:<\/p>\n<ul dir=\"auto\">\n<li><code>before_run<\/code>\u00a0searches for relevant memory and adds it to the agent context.<\/li>\n<li><code>after_run<\/code>\u00a0records the turn and starts memory extraction and consolidation.<\/li>\n<\/ul>\n<p dir=\"auto\">The application does not need to add a memory tool to the prompt agent or ask the model to call Cosmos DB. Memory participates through the Agent Framework lifecycle.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Conversation identity versus memory identity<\/h2>\n<\/div>\n<p dir=\"auto\">When the app creates a conversation, it creates a new Agent Framework session and adds the durable user identity to the provider state:<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre><span class=\"pl-k\">def<\/span> <span class=\"pl-en\">create_session<\/span>(<span class=\"pl-s1\">self<\/span>, <span class=\"pl-s1\">user_id<\/span>: <span class=\"pl-smi\">str<\/span>):\r\n    <span class=\"pl-s1\">session<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">self<\/span>.<span class=\"pl-c1\">agent<\/span>.<span class=\"pl-c1\">create_session<\/span>()\r\n    <span class=\"pl-s1\">session<\/span>.<span class=\"pl-c1\">state<\/span>.<span class=\"pl-c1\">setdefault<\/span>(<span class=\"pl-s1\">self<\/span>.<span class=\"pl-c1\">memory<\/span>.<span class=\"pl-c1\">source_id<\/span>, {})[<span class=\"pl-s\">\"user_id\"<\/span>] <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">user_id<\/span>\r\n    <span class=\"pl-k\">return<\/span> <span class=\"pl-s1\">session<\/span><\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">Selecting\u00a0<strong>New conversation<\/strong>\u00a0calls this method again with the same\u00a0<code>user_id<\/code>. The new session has no previous chat transcript, but the provider can retrieve memories stored for that user.<\/p>\n<p dir=\"auto\">Switching users creates another session with another\u00a0<code>user_id<\/code>. Because memory documents are partitioned and queried by that identity, one demo user does not receive another demo user&#8217;s memories.<\/p>\n<p dir=\"auto\">This is the central design decision in the sample. The UI exists to make it observable rather than hiding it inside a test script.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Try the interactive sample<\/h2>\n<\/div>\n<p dir=\"auto\">You need the Azure Developer CLI, Azure CLI, Python 3.11 or later, and an Azure subscription where you can create resources and assign roles.<\/p>\n<p dir=\"auto\">Clone the repository and deploy:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre>git clone https:\/\/github.com\/AzureCosmosDB\/foundry-cosmos-memory\r\n<span class=\"pl-c1\">cd<\/span> foundry-cosmos-memory\r\n\r\naz login\r\nazd up<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">The Bicep deployment creates Foundry, the model deployments, Cosmos DB, and the required role assignments. A post-provision hook then creates a new version of the prompt agent and runs a deterministic cross-conversation memory test..<\/p>\n<p dir=\"auto\">After deployment, export the environment and start the chat.<\/p>\n<p dir=\"auto\">PowerShell:<\/p>\n<div class=\"highlight highlight-source-powershell notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre>azd env get-values | Set-Content .env\r\n.\\.venv\\Scripts\\python.exe -m pip install -r requirements-ui.txt --pre\r\n.\\.venv\\Scripts\\python.exe -m chainlit run src\/chat.py<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">Bash:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre>azd env get-values &gt; .env\r\n. .venv\/bin\/activate\r\npython -m pip install -r requirements-ui.txt --pre\r\npython -m chainlit run src\/chat.py<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">Open\u00a0<code>http:\/\/localhost:8000<\/code> and pick a demo user from the selector (for example,\u00a0<code>theo<\/code>), or choose\u00a0<strong>Type my own<\/strong>.<\/p>\n<p dir=\"auto\">Try this sequence:<\/p>\n<ol dir=\"auto\">\n<li>Send:\u00a0<code>Remember that my favorite color is vermilion.<\/code><\/li>\n<li>Wait for the\u00a0<strong>Save long-term memory<\/strong>\u00a0step to complete.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"146\">Start a\u00a0<strong>New chat<\/strong>\u00a0(top-left) and choose\u00a0<code>theo<\/code>\u00a0again.<\/li>\n<li>Ask:\u00a0<code>What is my favorite color?<\/code><\/li>\n<li>\n<div>\n<div>Start a <strong>New chat<\/strong> (top-left), choose <code>casey<\/code>, then ask the same question to demonstrate isolation.<\/div>\n<\/div>\n<\/li>\n<\/ol>\n<p dir=\"auto\">The first recall happens in a new Foundry Agent Service conversation. The second identity should not receive Theo&#8217;s preference.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">What Azure Cosmos DB contributes<\/h2>\n<\/div>\n<p dir=\"auto\">Agent memory needs more than transcript storage. A useful memory system must identify durable information, represent it for retrieval, and return only memories relevant to the current request.<\/p>\n<p dir=\"auto\">The provider uses Azure Cosmos DB as the operational store for turns and derived memory. It can combine:<\/p>\n<ul dir=\"auto\">\n<li>Vector similarity for semantic relevance.<\/li>\n<li>Full-text relevance for lexical matches.<\/li>\n<li>Structured metadata such as user and memory type.<\/li>\n<li>A single database for the original turns, extracted facts, summaries, and retrieval indexes.<\/li>\n<\/ul>\n<p dir=\"auto\">The sample enables vector and full-text search capabilities on the Cosmos DB account. It does not deploy a separate vector database or synchronize a second search service.<\/p>\n<p dir=\"auto\">Because Cosmos DB is the system of record, you can inspect the generated data in Data Explorer. After running the sample, look for turn documents and extracted memory associated with the demo user ID.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><\/div>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">A deterministic deployment check<\/h2>\n<\/div>\n<p dir=\"auto\">Conversational demos are useful, but deployment automation needs a clear pass or fail. The post-provision hook runs a separate smoke test that:<\/p>\n<ol dir=\"auto\">\n<li>Generates a fresh user ID.<\/li>\n<li>Teaches a peanut allergy in one session.<\/li>\n<li>Flushes memory extraction.<\/li>\n<li>Creates a second session for the same user.<\/li>\n<li>Asks for trail-lunch advice and checks that the reply mentions peanuts.<\/li>\n<\/ol>\n<p dir=\"auto\">A fresh identity on every run prevents old memory from creating a false positive. If recall is inconclusive, the script exits nonzero and\u00a0<code>azd up<\/code>\u00a0fails instead of reporting a successful deployment.<\/p>\n<p dir=\"auto\">You can rerun that check at any time:<\/p>\n<div class=\"highlight highlight-source-powershell notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre>.\\.venv\\Scripts\\<span class=\"pl-c1\">python.exe<\/span> <span class=\"pl-k\">-<\/span>m src.run_memory_test<\/pre>\n<div class=\"zeroclipboard-container\"><\/div>\n<\/div>\n<p dir=\"auto\">The browser app and smoke test use the same shared runtime, so the automated check exercises the same agent and provider construction as the interactive experience.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Production considerations<\/h2>\n<\/div>\n<p dir=\"auto\">The sample keeps identity deliberately simple to make the memory boundary easy to see. Before using the pattern in an application, consider:<\/p>\n<ul dir=\"auto\">\n<li>Map\u00a0<code>user_id<\/code>\u00a0to a trusted authenticated principal, and include tenant scope where needed.<\/li>\n<li>Define retention, deletion, export, and consent flows for durable memory.<\/li>\n<li>Avoid storing secrets or sensitive personal information unless your design and compliance requirements explicitly support it.<\/li>\n<li>Tune extraction prompts, memory types, confidence thresholds, and extraction cadence for your domain.<\/li>\n<li>Evaluate false recall, missing recall, contradictory facts, and cross-user isolation with representative conversations.<\/li>\n<li>Add observability around extraction latency, retrieval results, token use, Cosmos DB request units, and failures.<\/li>\n<li>Review model availability and quota in the target Azure region before deployment.<\/li>\n<\/ul>\n<p dir=\"auto\">Memory is application data. It deserves the same identity, privacy, lifecycle, and evaluation discipline as any other durable user data.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Get started<\/h2>\n<\/div>\n<p dir=\"auto\">The earlier post explained why a context provider is a natural Agent Framework abstraction for memory. This sample carries that abstraction into a deployed Foundry Agent Service agent without changing the core integration.<\/p>\n<p dir=\"auto\">Run\u00a0<code>azd up<\/code>, open the browser chat, and test the boundary yourself: new conversation, same user; then new user, isolated memory.<\/p>\n<ul dir=\"auto\">\n<li><a href=\"https:\/\/github.com\/AzureCosmosDB\/foundry-cosmos-memory\">Download the sample<\/a><\/li>\n<li><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/native-agent-memory-for-microsoft-agent-framework-powered-by-azure-cosmos-db\/\" target=\"_blank\" rel=\"nofollow noopener\">Read the previous Agent Framework memory post<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/agent-framework\/\" target=\"_blank\" rel=\"nofollow noopener\">Learn about Microsoft Agent Framework<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/nosql\/vector-search\" target=\"_blank\" rel=\"nofollow noopener\">Learn about vector search in Azure Cosmos DB for NoSQL<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/azure\/cosmos-db\/gen-ai\/full-text-search\" target=\"_blank\" rel=\"nofollow noopener\">Learn about full-text search in Azure Cosmos DB for NoSQL<\/a><\/li>\n<\/ul>\n<p dir=\"auto\">To remove the sample resources when you are finished:<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\">\n<pre>azd down --purge<\/pre>\n<div class=\"zeroclipboard-container\">\n<h2 id=\"about-azure-cosmos-db\" class=\"code-line\" dir=\"auto\" data-line=\"153\">About Azure Cosmos DB<button class=\"linkicon\" aria-label=\"Copy Post URL\"><\/button><\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"193\">Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.<\/p>\n<p class=\"code-line\" dir=\"auto\" data-line=\"195\">To stay in the loop on Azure Cosmos DB updates, follow us on\u00a0<a href=\"https:\/\/twitter.com\/AzureCosmosDB\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/twitter.com\/AzureCosmosDB\">X<\/a>,\u00a0<a href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\">YouTube<\/a>, and\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\" target=\"_blank\" rel=\"noopener\" data-href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\">LinkedIn<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/article>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Move from a locally composed memory-enabled agent to a deployed Foundry Agent Service agent, with keyless Azure infrastructure and an interactive browser sample. In\u00a0Native Agent Memory for Microsoft Agent Framework, Powered by Azure Cosmos DB, we introduced\u00a0CosmosMemoryContextProvider: a Microsoft Agent Framework context provider that extracts useful information from conversations, stores it in Azure Cosmos DB, [&hellip;]<\/p>\n","protected":false},"author":9387,"featured_media":12832,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-12813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-sql-api"],"acf":[],"blog_post_summary":"<p>Move from a locally composed memory-enabled agent to a deployed Foundry Agent Service agent, with keyless Azure infrastructure and an interactive browser sample. In\u00a0Native Agent Memory for Microsoft Agent Framework, Powered by Azure Cosmos DB, we introduced\u00a0CosmosMemoryContextProvider: a Microsoft Agent Framework context provider that extracts useful information from conversations, stores it in Azure Cosmos DB, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/9387"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=12813"}],"version-history":[{"count":2,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12813\/revisions"}],"predecessor-version":[{"id":12875,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/12813\/revisions\/12875"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/12832"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=12813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=12813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=12813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}