Skip to content

Commit ee0cec7

Browse files
authored
Add further chat history docs updates. (#785)
1 parent 8304c02 commit ee0cec7

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

agent-framework/user-guide/agents/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
href: agent-middleware.md
1111
- name: Agent Retrieval Augmented Generation (RAG)
1212
href: agent-rag.md
13-
- name: Agent Memory
13+
- name: Agent Chat History and Memory
1414
href: agent-memory.md
1515
- name: Agent Observability
1616
href: agent-observability.md

agent-framework/user-guide/agents/agent-memory.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Agent Memory
3-
description: Learn how to use memory with Agent Framework
2+
title: Agent Chat History and Memory
3+
description: Learn how to use chat history and memory with Agent Framework
44
zone_pivot_groups: programming-languages
55
author: markwallace
66
ms.topic: reference
@@ -9,15 +9,13 @@ ms.date: 09/24/2025
99
ms.service: agent-framework
1010
---
1111

12-
# Agent Memory
12+
# Agent Chat History and Memory
1313

14-
Agent memory is a crucial capability that allows agents to maintain context across conversations, remember user preferences, and provide personalized experiences. The Agent Framework provides multiple memory mechanisms to suit different use cases, from simple in-memory storage to persistent databases and specialized memory services.
14+
Agent chat history and memory are crucial capabilities that allow agents to maintain context across conversations, remember user preferences, and provide personalized experiences. The Agent Framework provides multiple features to suit different use cases, from simple in-memory chat message storage to persistent databases and specialized memory services.
1515

1616
::: zone pivot="programming-language-csharp"
1717

18-
The Agent Framework supports several types of memory to accommodate different use cases, including managing chat history as part of short term memory and providing extension points for extracting, storing and injecting long term memories into agents.
19-
20-
## Chat History (short term memory)
18+
## Chat History
2119

2220
Various chat history storage options are supported by the Agent Framework. The available options vary by agent type and the underlying service(s) used to build the agent.
2321

agent-framework/user-guide/agents/agent-rag.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,4 @@ Each connector provides the same `create_search_function` method that can be bri
297297
## Next steps
298298

299299
> [!div class="nextstepaction"]
300-
> [Agent Memory](./agent-memory.md)
300+
> [Agent Chat History and Memory](./agent-memory.md)

agent-framework/user-guide/agents/multi-turn-conversation.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ The Microsoft Agent Framework provides built-in support for managing multi-turn
1717

1818
For example, when using a ChatClientAgent based on a foundry agent, the conversation history is persisted in the service. While, when using a ChatClientAgent based on chat completion with gpt-4.1 the conversation history is in-memory and managed by the agent.
1919

20-
The differences between the underlying threading models are abstracted away via the `AgentThread` type.
20+
The `AgentThread` type is the abstraction that represents a conversation thread with an agent.
21+
`AIAgent` instances are stateless and the same agent instance can be used with multiple `AgentThread` instances. All state is therefore preserved in the `AgentThread`.
22+
An `AgentThread` can both represent chat history plus any other state that the agent needs to preserve across multiple interactions.
23+
The chat history may be stored in the thread itself, or remotely, with the `AgentThread` only containing a reference to the remote chat history.
24+
The `AgentThread` state may also include memories or references to memories stored remotely.
25+
26+
> [!TIP]
27+
> To learn more about Chat History and Memory in the Agent Framework, see [Agent Chat History and Memory](./agent-memory.md).
2128
2229
### AgentThread Creation
2330

@@ -42,7 +49,6 @@ response = await agent.RunAsync("Hello, how are you?");
4249

4350
::: zone-end
4451

45-
4652
### AgentThread Storage
4753

4854
`AgentThread` instances can be serialized and stored for later use. This allows for the preservation of conversation context across different sessions or service calls.
@@ -215,7 +221,6 @@ async def multi_turn_example():
215221
print(f"Agent: {response3.text}") # Should remember previous context
216222
```
217223

218-
219224
::: zone-end
220225

221226
## Next steps

0 commit comments

Comments
 (0)