Prepstellar
Get it on Google Play

AI-103 · Choosing Foundry Models and Services

24 cards

Agent Memory, Tools, and Knowledge

Swipe, scroll or use ← →
  1. Three things an agent can draw on

    An agent that only has a model and instructions forgets the user, knows nothing about your organization, and can't act. Foundry gives it three kinds of help, and choosing well starts with knowing which one solves which gap.

    • Memory keeps what the agent learns about a user or a task across sessions.
    • Knowledge grounds the agent in content your organization curates.
    • Tools let the agent act: call APIs, search, run code, or reach other agents.

    The memory guidance gives a three-way rule. Use memory to capture user-specific or agent context that is learned and persists through interactions over time. Use a Foundry IQ knowledge base to ground the agent on curated organizational content. Use the file search tool to search user-provided documents during an interaction.

    1 / 24
  2. Three things an agent can draw on

    Where the information comes from decides the service: memory for what the agent learns about a user, Foundry IQ for curated organizational content, file search for documents shared during the chat.yesnoyesnoLearned aboutthe user overtime?Memorymemory storeCurated contentof theorganization?Foundry IQknowledge baseFile searchshared in this chat
    Ask where the information comes from before you pick a service. The agent learns it over time, the organization curates it, or the user hands it over in the conversation.
    2 / 24
  3. Quick check

    A user uploads a contract mid-conversation and asks the agent to check one clause. Which service handles that document?

    1. AMemory, since it keeps context

      Memory captures context the agent learns over time, such as preferences. A document handed over in this chat is a job for file search.

    2. BA Foundry IQ knowledge base

      A Foundry IQ knowledge base grounds the agent on curated organizational content, not on a file a user just shared.

    3. CThe file search tool

      Right. File search is the tool for user-provided documents during an interaction.

    3 / 24

  4. Short-term and long-term memory

    Agent memory falls into two categories.

    • Short-term memory tracks the current session's conversation and keeps immediate context. Agent orchestration frameworks typically manage it as part of the session context.
    • Long-term memory retains distilled knowledge across sessions, so the agent can recall and build on earlier interactions. It needs a persistent system that extracts, consolidates, and manages knowledge.

    Memory in Foundry Agent Service is designed for long-term memory. It's a managed solution that gives an agent continuity across sessions, devices, and workflows, so it can retain user preferences, maintain conversation history, and personalize its responses.

    Memory and the Memory Store API are both in preview, and pricing and billing can change during the preview. You're billed for the underlying chat and embedding models you configure.

    4 / 24
  5. Quick check

    Which kind of memory is the Foundry Agent Service memory feature designed to provide?

    1. ALong-term memory across sessions

      Right. Memory in Foundry Agent Service is a managed, long-term memory solution that carries knowledge across sessions.

    2. BShort-term memory of the current session only

      Short-term context of the current session is typically managed by the orchestration framework, not by this feature.

    3. CModel weights updated after each conversation

      Memory stores extracted knowledge as items in a memory store. It doesn't change the model itself.

    5 / 24

  6. How memory works

    Behind the scenes, memories are stored as items in a managed memory store, and memory works in three phases.

    1. Extraction: as a user interacts with the agent, the system extracts key information such as preferences, facts, and relevant context, for example "allergic to dairy".
    2. Consolidation: the system uses LLMs to merge similar or duplicate topics, so the store doesn't hold redundant information, and it resolves conflicting facts, such as a new allergy.
    3. Retrieval: when the agent needs to recall something, it searches the memory store for the most relevant memories.

    For best results, retrieve stable user profile information early in the conversation, so the agent can personalize its responses from the start.

    6 / 24
  7. How memory works

    Memory extracts facts from a conversation, consolidates them in a memory store, and retrieves the relevant ones in a later session.ConversationExtractionpreferences, factsConsolidationmerge, resolveMemory storeRetrievalmost relevantLater session
    Consolidation is the step that keeps the store clean: duplicates merge, and a newer fact such as a new allergy replaces the conflicting one.
    7 / 24
  8. Quick check

    A user who said last month they're allergic to dairy now reports a new allergy. Which memory phase keeps the store accurate?

    1. AExtraction, which appends each new fact

      Extraction captures the new fact, but on its own it would leave two conflicting entries in the store.

    2. BConsolidation, resolving conflicting facts

      Right. Consolidation merges duplicates and resolves conflicting facts, such as a new allergy, to keep memory accurate.

    3. CRetrieval, which surfaces the most recent item

      Retrieval searches for the most relevant memories. It doesn't clean up conflicts in what's stored.

    8 / 24

  9. Keep your progress in the app

    That’s 3 of 10 quick checks. In the app they stay answered, and every lesson remembers where you left off.

    Get it on Google Play Keep reading here
  10. The three memory types

    Foundry memory extracts and stores three types of long-term memory, and each has its own moment to be retrieved.

    Memory type What it holds When to retrieve
    User profile Durable preferences and personal context, such as language or accessibility needs Near the beginning of each conversation
    Chat summary Distilled summaries of prior conversation topics Per turn, using the current messages
    Procedural Reusable how-to routines inferred from prior interactions When the user asks for a recurring workflow

    In words: user profile memory is retrieved near the start of each conversation to set stable personalization. Chat summary memory is retrieved per turn for continuity. Procedural memory is retrieved when the user asks for a task the agent has handled before. All three are enabled by default, and you can configure or disable them when you create a memory store.

    9 / 24
  11. Quick check

    Which memory type should you retrieve near the start of each conversation to set a user's language and accessibility needs?

    1. AProcedural memory, for routines

      Procedural memory holds reusable how-to routines and is retrieved when the user asks for a recurring workflow.

    2. BChat summary memory of topics

      Chat summary memory holds summaries of past topics and is retrieved per turn for continuity.

    3. CUser profile memory, for durable preferences

      Right. User profile memory holds durable preferences and is retrieved near the beginning of each conversation.

    10 / 24

  12. Using and governing memory

    There are two ways to use memory:

    • The memory search tool: attach it to a prompt agent to read from and write to the memory store during conversations. This is ideal for most scenarios because it simplifies memory management.
    • The memory store APIs: work directly with the store through low-level APIs, for more control, including direct control of individual memory records and retention.

    Production controls include item-level create, read, update, list, and delete, a store-level default TTL in seconds for new memory entries, and direct remember-or-forget commands when a user explicitly asks for a memory change.

    11 / 24
  13. Using and governing memory

    Limits shape the design too:

    • Memory requires compatible Azure OpenAI chat and embedding model deployments.
    • With the low-level APIs, you must set scope explicitly in each request. Automatic scope from the caller's identity works only through the memory search tool with scope set to the user ID placeholder.
    • Virtual network (VNet) integration isn't supported for memory stores.
    • A store holds up to 100 scopes, with up to 10,000 memories per scope.

    Memory has its own risk: prompt injection and memory corruption, when harmful or wrong data gets stored and then shapes later answers. Validate prompts with Azure AI Content Safety and its prompt injection detection, and run adversarial tests regularly.

    12 / 24
  14. Quick check

    A security review requires every agent component to run inside a virtual network. What does that mean for Foundry memory?

    1. AMemory stores support VNet with a private endpoint

      Memory stores don't support VNet integration, so this requirement can't be met through a private endpoint on them.

    2. BVNet integration isn't supported by memory stores

      Right. VNet integration isn't supported for memory stores, which is a hard limit for a network-isolation requirement.

    3. COnly the memory search tool works inside a VNet

      No access path changes this: the limit applies to memory stores whether you use the tool or the APIs.

    13 / 24

  15. Toolbox: one endpoint for agent tools

    Tools let an agent act, and they multiply fast. An onboarding agent might use a knowledge base, REST API, skills, and an MCP server, each with its own authentication and owner. Across many agents, teams re-implement the same tools, duplicate credentials, and govern inconsistently.

    Toolbox fixes that. You define a curated set of tools once and expose them through a single MCP-compatible endpoint that agents consume across frameworks and runtimes. Toolboxes are created in Foundry but aren't limited to Foundry agents: any MCP-compatible runtime or client can use one, including Microsoft Agent Framework, LangGraph, or your own code.

    Its key capabilities:

    • Single endpoint: the agent discovers every tool at runtime, and you add, remove, or reconfigure tools without changing agent code.
    • Centralized authentication: the toolbox handles credential injection, token refresh, and policy enforcement using Microsoft Entra ID and OAuth identity passthrough.
    • Governance by default: apply guardrails to tool inputs and outputs at the toolbox level.
    • Versioning: create and test a new toolbox version, then promote it to default. Every agent that points to the toolbox picks it up automatically, with no code changes or redeployment.
    14 / 24
  16. Quick check

    A platform team updates a shared toolbox used by 30 agents. How do the agents start using the new version?

    1. AEach agent is redeployed with new code

      Redeploying isn't needed: agents keep pointing to the same toolbox endpoint.

    2. BPromote the new toolbox version to default

      Right. Promoting a new default version reaches every agent that points to the toolbox, with no code changes.

    3. CEach agent re-registers its own tools

      The point of a toolbox is that tools are defined once, centrally. Agents don't register them one by one.

    15 / 24

  17. Tool search and skills

    A toolbox can grow to hundreds of tools, and sending every definition with every request hurts in three ways: cost rises, because each definition adds input tokens; context shrinks, because definitions compete with conversation history; and tool selection gets less accurate.

    Tool search (preview) hides tools by default and exposes only two meta-tools: tool_search, which returns the most relevant tools for a described need, and call_tool, which invokes a discovered tool by name. You can pin critical tools so they're always available, add context with your organization's terms, and auto-pin frequently used tools.

    Skills (preview) separate what from how: tools define what an agent can do, and skills define how it performs a task. Skills package reusable, multistep workflows, are versioned and immutable, and agents discover and load them through MCP resources at startup.

    16 / 24
  18. Quick check

    With tool search turned on in a toolbox of 300 tools, what does the model see by default?

    1. AAll 300 definitions, ranked by use

      Sending every definition is the problem tool search solves: it adds tokens and lowers selection accuracy.

    2. BOnly the pinned tools and nothing else

      Pinned tools stay available, but the model also gets the two meta-tools to find and call the rest.

    3. CTwo meta-tools: tool_search and call_tool

      Right. Tool search hides tools by default and exposes tool_search to find tools and call_tool to invoke them.

    17 / 24

  19. What can go in a toolbox

    Not every tool can live in a toolbox, and the split is examinable.

    Where it runs Tools
    Toolbox and direct MCP, web search, Azure AI Search, code interpreter, file search, OpenAPI, agent-to-agent (A2A), browser automation, Fabric IQ, Work IQ
    Toolbox only Tool search, skills, reminder tool
    Direct only Function calling, Grounding with Bing, computer use, image generation, SharePoint, Fabric data agent, Azure Functions

    In words: most tools work both ways. Tool search, skills, and the reminder tool exist only in a toolbox. Function calling can't go in a toolbox, because it executes client-side, and the same direct-only rule applies to Grounding with Bing, computer use, image generation, SharePoint, the Fabric data agent, and Azure Functions.

    18 / 24
  20. Quick check

    Which tool must stay as a direct tool integration because it executes client-side?

    1. AFunction calling

      Right. Function calling runs client-side, so it isn't supported in a toolbox and stays a direct integration.

    2. BOpenAPI tool

      The OpenAPI tool is supported both in a toolbox and as a direct integration.

    3. CThe code interpreter

      Code interpreter is supported both in a toolbox and as a direct integration.

    19 / 24

  21. Foundry IQ: knowledge for agents

    The model behind an agent has a knowledge cutoff and can't reach your proprietary data on its own. Foundry IQ lets you create a configurable, multi-source knowledge base that gives agents permission-aware responses from your organization's data.

    A knowledge base consists of knowledge sources, which are connections to internal and external data stores, and parameters that control retrieval behavior, including the retrieval reasoning effort: minimal, low, or medium. Multiple agents can share the same knowledge base. When an agent queries it, Foundry IQ uses agentic retrieval to process the query, retrieve information, enforce user permissions, and return grounded answers with citations. Azure AI Search provides the underlying indexing and retrieval.

    20 / 24
  22. Foundry IQ: knowledge for agents

    What it can do:

    • Connect one knowledge base to many agents, over sources such as Azure Blob Storage, SharePoint, OneLake, and public web data.
    • Automate chunking, vector embedding generation, and metadata extraction, with scheduled indexer runs for incremental refresh.
    • Issue keyword, vector, or hybrid queries across indexed and remote sources.
    • Synchronize ACLs for supported sources, honor Microsoft Purview sensitivity labels, and run queries under the caller's Microsoft Entra identity, so agents return only authorized content.

    You can use a knowledge base from Foundry Agent Service, Microsoft Agent Framework, or any app through the REST API or Azure SDKs. Some features are generally available and others are still in preview, depending on the Search Service REST API version. Foundry IQ sits next to Fabric IQ, for Microsoft Fabric business data, and Work IQ, for Microsoft 365 collaboration signals.

    21 / 24
  23. Quick check

    Several agents must answer from SharePoint and OneLake content and return only what each user may see. What fits?

    1. AA memory store per agent with a TTL

      Memory keeps what an agent learns about users across sessions. It isn't a permission-aware index of organizational content.

    2. BOne shared Foundry IQ knowledge base

      Right. Multiple agents can share one knowledge base, and Foundry IQ enforces permissions at query time.

    3. CA toolbox with function calling per source

      Function calling can't go in a toolbox, because it executes client-side, and a toolbox doesn't enforce per-user access to documents.

    22 / 24

  24. Key takeaways

    • Use memory for context learned about a user over time, Foundry IQ for curated organizational content, and file search for documents shared during a chat.
    • Foundry memory is long-term, in preview, and works through extraction, consolidation, and retrieval.
    • User profile memory is retrieved near the start of a conversation, chat summary per turn, and procedural memory for recurring tasks.
    • Memory stores don't support VNet integration, and low-level memory APIs need an explicit scope.
    • A toolbox exposes curated tools through one MCP-compatible endpoint, and promoting a new default version updates every agent without code changes.
    • Function calling stays a direct tool, and tool search exposes only tool_search and call_tool.
    • A Foundry IQ knowledge base unifies knowledge sources, can be shared by many agents, and returns permission-aware answers with citations.
    23 / 24
  25. Quick check

    Which pairing of need and service is correct?

    1. ARemember a user's seat preference: memory

      Right. A preference learned about a user over time is exactly what memory captures.

    2. BShare curated policies across agents: memory

      Curated organizational content belongs in a Foundry IQ knowledge base that many agents can share.

    3. CSearch a file the user just uploaded: Foundry IQ

      A document the user hands over during the chat is a job for the file search tool.

    24 / 24

  26. 10 quick checks · then the test

    In the app, finishing the quick checks opens this lesson’s 10-question test, and the ones you miss come back exactly when you’re about to forget them.

← Previous Get it on Google Play Next card →

The whole course, on your phone

Lessons you can read, audio you can listen to on the way to work, and practice that remembers what you got wrong.

Get it on Google Play

“This app is the ‘One Lake’ for preparing the certification exams. Really worth it.”

Abdelhak Y. Google Play review