Skip to content

Commit

Permalink
docs[patch]: add long-term memory agent tutorial (#27057)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda authored Oct 3, 2024
1 parent 635c55c commit 907c758
Show file tree
Hide file tree
Showing 3 changed files with 1,087 additions and 5 deletions.
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.

0 comments on commit 907c758

Please sign in to comment.