Skip to content

docs[patch]: add long-term memory agent tutorial #27057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"Please refer to the following [migration guide](/docs/versions/migrating_chains/conversation_chain/) for more information.\n",
"\n",
"\n",
"## Usasge with a pre-built agent\n",
"## Usage with a pre-built agent\n",
"\n",
"This example shows usage of an Agent Executor with a pre-built agent constructed using the [create_tool_calling_agent](https://python.langchain.com/api_reference/langchain/agents/langchain.agents.tool_calling_agent.base.create_tool_calling_agent.html) function.\n",
"\n",
Expand Down Expand Up @@ -546,7 +546,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/versions/migrating_memory/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ Memory classes that fall into this category include:
| `ConversationTokenBufferMemory` | [Link to Migration Guide](conversation_buffer_window_memory) | Keeps only the most recent messages in the conversation under the constraint that the total number of tokens in the conversation does not exceed a certain limit. |
| `ConversationSummaryMemory` | [Link to Migration Guide](conversation_summary_memory) | Continually summarizes the conversation history. The summary is updated after each conversation turn. The abstraction returns the summary of the conversation history. |
| `ConversationSummaryBufferMemory` | [Link to Migration Guide](conversation_summary_memory) | Provides a running summary of the conversation together with the most recent messages in the conversation under the constraint that the total number of tokens in the conversation does not exceed a certain limit. |
| `VectorStoreRetrieverMemory` | See related [long-term memory agent tutorial](https://langchain-ai.github.io/langgraph/tutorials/memory/long_term_memory_agent/) | Stores the conversation history in a vector store and retrieves the most relevant parts of past conversation based on the input. |
| `VectorStoreRetrieverMemory` | See related [long-term memory agent tutorial](long_term_memory_agent) | Stores the conversation history in a vector store and retrieves the most relevant parts of past conversation based on the input. |


### 2. Extraction of structured information from the conversation history

Please see [long-term memory agent tutorial](https://langchain-ai.github.io/langgraph/tutorials/memory/long_term_memory_agent/) implements an agent that can extract structured information from the conversation history.
Please see [long-term memory agent tutorial](long_term_memory_agent) implements an agent that can extract structured information from the conversation history.

Memory classes that fall into this category include:

Expand All @@ -114,7 +114,7 @@ abstractions are not as widely used as the conversation history management abstr

For this reason, there are no migration guides for these abstractions. If you're struggling to migrate an application
that relies on these abstractions, please:
1) Please review this [Long-term memory agent tutorial](https://langchain-ai.github.io/langgraph/tutorials/memory/long_term_memory_agent/) which should provide a good starting point for how to extract structured information from the conversation history.
1) Please review this [Long-term memory agent tutorial](long_term_memory_agent) which should provide a good starting point for how to extract structured information from the conversation history.
2) If you're still struggling, please open an issue on the LangChain GitHub repository, explain your use case, and we'll try to provide more guidance on how to migrate these abstractions.

The general strategy for extracting structured information from the conversation history is to use a chat model with tool calling capabilities to extract structured information from the conversation history.
Expand Down
1,082 changes: 1,082 additions & 0 deletions docs/docs/versions/migrating_memory/long_term_memory_agent.ipynb

Large diffs are not rendered by default.

Loading