Implement generative AI and agentic solutions 2.2 Build agents by using Foundry
A support agent in Foundry Agent Service keeps one conversation per customer, and some…
Study guide skill: Define agent roles, goals, conversation-tracking approach, and tool schemas
Question B4-021
A support agent in Foundry Agent Service keeps one conversation per customer, and some conversations now hold more items than the model's context window. What happens when a new response is generated against such a conversation?
Select one answer.
Answer: D
When a conversation is used, the full conversation is provided as input, and if it exceeds the model's context size the model automatically truncates the input context; the conversation itself isn't truncated. Memory isn't a spill area for long conversations: an agent reads and writes the memory store only when you attach the memory search tool or call the memory store APIs.
Deep dive
How it works
In Foundry Agent Service, a conversation stores the items of an exchange (messages, tool calls, outputs). When a conversation is used to generate a response, with or without an agent, the full conversation is provided as input to the model.
The runtime components page has a Note for long conversations: if the conversation exceeds the model's supported context size, the model automatically truncates the input context. The conversation itself isn't truncated. Only a subset of it is used to generate that response.
So nothing is deleted or moved. Every item stays stored, and the request still succeeds, but the model may not see the oldest items. If older details matter, that's a design decision for you: summarize, start a fresh conversation with a recap, or use memory deliberately.
Memory (preview) isn't an automatic overflow area. An agent reads and writes the memory store in only two ways: when you attach the memory search tool to a prompt agent, or when you call the memory store APIs directly.
The other options, and when you'd use them
- The service deletes the oldest items: The conversation itself isn't truncated. Only the model's input is.
- Older items move into memory automatically: Memory is used through the memory search tool or the memory store APIs, not as a spill area.
- The request fails: The model truncates the input context automatically and still generates a response.
Exam tip
Conversation too long = input context truncated by the model, stored conversation unchanged.
References
Last reviewed: