|
2 | 2 | title: Memory |
3 | 3 | --- |
4 | 4 |
|
5 | | -Agno provides 3 types of memory for Agents: |
| 5 | +If you're building intelligent agents, you need to give them memory which is the ability to **remember**, **reason** and **personalize** responses to users. Memory comes in 3 shapes: |
6 | 6 |
|
7 | | -1. **Chat History:** The message history of the session. Agno will store the sessions in a database for you, and retrieve them when you resume a session. |
8 | | -2. **User Memories:** Notes and insights about the user, this helps the model personalize the response to the user. |
9 | | -3. **Summaries:** A summary of the conversation, which is added to the prompt when chat history gets too long. |
| 7 | +1. **Chat History:** This is the current conversation between users and the agent, stored as sessions in chronological order. This is the most basic form of memory and **called "Storage" in Agno**. |
| 8 | +2. **User Memories:** Insights and facts about users extracted from conversations, helping agents personalize their responses to users. Think of this as adding a "ChatGPT like memory" to your agent. **This is called "Memory" in Agno**. |
| 9 | +3. **Session Summaries:** Condensed representations of conversations, useful when chat histories grow too long. **This is called "Summary" in Agno**. |
| 10 | + |
| 11 | +Memory helps Agents: |
| 12 | + - Manage conversation state (chat history) |
| 13 | + - Personalize responses to users (user memories) |
| 14 | + - Maintain long-session context (session summaries) |
| 15 | + |
| 16 | +Memory is critical for personal assistants, it allows Agents to "Remember" and "Personalize" their responses to users. |
10 | 17 |
|
11 | 18 | ## Built-in Memory |
12 | 19 |
|
13 | | -Every Agent comes with built-in memory that can be used to access the historical **runs** per session. |
| 20 | +Every Agent comes with built-in memory that can be used to access the historical **runs** per session. |
14 | 21 |
|
15 | 22 | You can give your agent access to chat history in the following ways: |
16 | 23 |
|
@@ -256,9 +263,9 @@ To enable session summaries, set `enable_session_summaries=True` on the `Agent`. |
256 | 263 | ) |
257 | 264 |
|
258 | 265 | agent.print_response( |
259 | | - "I would also like to know about LLMs?", |
260 | | - stream=True, |
261 | | - user_id=user_id, |
| 266 | + "I would also like to know about LLMs?", |
| 267 | + stream=True, |
| 268 | + user_id=user_id, |
262 | 269 | session_id=session_id |
263 | 270 | ) |
264 | 271 |
|
@@ -292,7 +299,7 @@ To enable session summaries, set `enable_session_summaries=True` on the `Agent`. |
292 | 299 |
|
293 | 300 | ## Agentic Memory Management |
294 | 301 |
|
295 | | -You can also enable an agent to manage the user memories for you. Enable agentic memory management by setting `enable_agentic_memory=True` on the `Agent`. |
| 302 | +You can also enable an agent to manage the user memories for you. Enable agentic memory management by setting `enable_agentic_memory=True` on the `Agent`. |
296 | 303 |
|
297 | 304 | <Note> |
298 | 305 | Enabling agentic memory will also add all existing user memories to the agent's system prompt. |
|
0 commit comments