├── .github └── workflows │ ├── deploy_docs.yml │ └── release.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── docs ├── .gitignore ├── README.md ├── _scripts │ ├── generate_api_reference_links.py │ ├── notebook_convert.py │ ├── notebook_convert_templates │ │ └── mdoutput │ │ │ ├── conf.json │ │ │ └── index.md.j2 │ └── notebook_hooks.py ├── docs │ ├── background_quickstart.md │ ├── concepts │ │ ├── conceptual_guide.md │ │ └── img │ │ │ ├── filter.png │ │ │ ├── hot_path_vs_background.png │ │ │ ├── short-vs-long.png │ │ │ ├── summary.png │ │ │ ├── update-instructions.png │ │ │ ├── update-list.png │ │ │ └── update-profile.png │ ├── guides │ │ ├── delayed_processing.md │ │ ├── dynamically_configure_namespaces.md │ │ ├── extract_episodic_memories.md │ │ ├── extract_semantic_memories.md │ │ ├── manage_user_profile.md │ │ ├── memory_tools.md │ │ ├── optimize_compound_system.md │ │ ├── optimize_memory_prompt.md │ │ ├── summarization.md │ │ ├── use_tools_in_crewai.md │ │ └── use_tools_in_custom_agent.md │ ├── hot_path_quickstart.md │ ├── index.md │ ├── reference │ │ ├── .meta.yml │ │ ├── index.md │ │ ├── memory.md │ │ ├── prompt_optimization.md │ │ ├── short_term.md │ │ ├── tools.md │ │ └── utils.md │ └── static │ │ ├── favicon.png │ │ ├── values_vs_updates.png │ │ ├── wordmark_dark.svg │ │ └── wordmark_light.svg ├── mkdocs.yml ├── overrides │ ├── main.html │ └── partials │ │ ├── comments.html │ │ └── logo.html └── templates │ └── python │ └── material │ └── function.html.jinja ├── examples ├── intro_videos │ ├── procedural_memory.ipynb │ └── semantic_memory.ipynb └── standalone_examples │ ├── README.md │ └── custom_store_example.py ├── langgraph.json ├── pyproject.toml ├── pytest.ini ├── src └── langmem │ ├── __init__.py │ ├── errors.py │ ├── graph_rag.py │ ├── graphs │ ├── __init__.py │ ├── auth.py │ ├── prompts.py │ └── semantic.py │ ├── knowledge │ ├── __init__.py │ ├── extraction.py │ └── tools.py │ ├── prompts │ ├── __init__.py │ ├── _layers.py │ ├── gradient.py │ ├── metaprompt.py │ ├── optimization.py │ ├── prompt.py │ ├── stateful.py │ ├── stateless.py │ ├── types.py │ └── utils.py │ ├── reflection.py │ ├── short_term │ ├── __init__.py │ └── summarization.py │ └── utils.py ├── tests ├── __init__.py ├── cassettes │ └── ed2e87ca-f890-4900-9a09-dfbc12b51964.yaml ├── conftest.py ├── short_term │ ├── __init__.py │ ├── test_summarization.py │ ├── test_summarization_async.py │ └── utils.py └── test_docstring_examples.py └── uv.lock /.github/workflows/deploy_docs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/.github/workflows/deploy_docs.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/README.md -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/.gitignore -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/README.md -------------------------------------------------------------------------------- /docs/_scripts/generate_api_reference_links.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/_scripts/generate_api_reference_links.py -------------------------------------------------------------------------------- /docs/_scripts/notebook_convert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/_scripts/notebook_convert.py -------------------------------------------------------------------------------- /docs/_scripts/notebook_convert_templates/mdoutput/conf.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/_scripts/notebook_convert_templates/mdoutput/conf.json -------------------------------------------------------------------------------- /docs/_scripts/notebook_convert_templates/mdoutput/index.md.j2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/_scripts/notebook_convert_templates/mdoutput/index.md.j2 -------------------------------------------------------------------------------- /docs/_scripts/notebook_hooks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/_scripts/notebook_hooks.py -------------------------------------------------------------------------------- /docs/docs/background_quickstart.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/background_quickstart.md -------------------------------------------------------------------------------- /docs/docs/concepts/conceptual_guide.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/conceptual_guide.md -------------------------------------------------------------------------------- /docs/docs/concepts/img/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/filter.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/hot_path_vs_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/hot_path_vs_background.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/short-vs-long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/short-vs-long.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/summary.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/update-instructions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/update-instructions.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/update-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/update-list.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/update-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/concepts/img/update-profile.png -------------------------------------------------------------------------------- /docs/docs/guides/delayed_processing.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/delayed_processing.md -------------------------------------------------------------------------------- /docs/docs/guides/dynamically_configure_namespaces.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/dynamically_configure_namespaces.md -------------------------------------------------------------------------------- /docs/docs/guides/extract_episodic_memories.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/extract_episodic_memories.md -------------------------------------------------------------------------------- /docs/docs/guides/extract_semantic_memories.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/extract_semantic_memories.md -------------------------------------------------------------------------------- /docs/docs/guides/manage_user_profile.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/manage_user_profile.md -------------------------------------------------------------------------------- /docs/docs/guides/memory_tools.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/memory_tools.md -------------------------------------------------------------------------------- /docs/docs/guides/optimize_compound_system.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/optimize_compound_system.md -------------------------------------------------------------------------------- /docs/docs/guides/optimize_memory_prompt.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/optimize_memory_prompt.md -------------------------------------------------------------------------------- /docs/docs/guides/summarization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/summarization.md -------------------------------------------------------------------------------- /docs/docs/guides/use_tools_in_crewai.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/use_tools_in_crewai.md -------------------------------------------------------------------------------- /docs/docs/guides/use_tools_in_custom_agent.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/guides/use_tools_in_custom_agent.md -------------------------------------------------------------------------------- /docs/docs/hot_path_quickstart.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/hot_path_quickstart.md -------------------------------------------------------------------------------- /docs/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide_comments: true 3 | title: Introduction 4 | --- 5 | 6 | {!README.md!} 7 | -------------------------------------------------------------------------------- /docs/docs/reference/.meta.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/.meta.yml -------------------------------------------------------------------------------- /docs/docs/reference/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/index.md -------------------------------------------------------------------------------- /docs/docs/reference/memory.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/memory.md -------------------------------------------------------------------------------- /docs/docs/reference/prompt_optimization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/prompt_optimization.md -------------------------------------------------------------------------------- /docs/docs/reference/short_term.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/short_term.md -------------------------------------------------------------------------------- /docs/docs/reference/tools.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/tools.md -------------------------------------------------------------------------------- /docs/docs/reference/utils.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/reference/utils.md -------------------------------------------------------------------------------- /docs/docs/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/static/favicon.png -------------------------------------------------------------------------------- /docs/docs/static/values_vs_updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/static/values_vs_updates.png -------------------------------------------------------------------------------- /docs/docs/static/wordmark_dark.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/static/wordmark_dark.svg -------------------------------------------------------------------------------- /docs/docs/static/wordmark_light.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/docs/static/wordmark_light.svg -------------------------------------------------------------------------------- /docs/mkdocs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/mkdocs.yml -------------------------------------------------------------------------------- /docs/overrides/main.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/overrides/main.html -------------------------------------------------------------------------------- /docs/overrides/partials/comments.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/overrides/partials/comments.html -------------------------------------------------------------------------------- /docs/overrides/partials/logo.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/overrides/partials/logo.html -------------------------------------------------------------------------------- /docs/templates/python/material/function.html.jinja: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/docs/templates/python/material/function.html.jinja -------------------------------------------------------------------------------- /examples/intro_videos/procedural_memory.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/examples/intro_videos/procedural_memory.ipynb -------------------------------------------------------------------------------- /examples/intro_videos/semantic_memory.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/examples/intro_videos/semantic_memory.ipynb -------------------------------------------------------------------------------- /examples/standalone_examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/examples/standalone_examples/README.md -------------------------------------------------------------------------------- /examples/standalone_examples/custom_store_example.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/examples/standalone_examples/custom_store_example.py -------------------------------------------------------------------------------- /langgraph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/langgraph.json -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/pyproject.toml -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/pytest.ini -------------------------------------------------------------------------------- /src/langmem/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/__init__.py -------------------------------------------------------------------------------- /src/langmem/errors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/errors.py -------------------------------------------------------------------------------- /src/langmem/graph_rag.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/graph_rag.py -------------------------------------------------------------------------------- /src/langmem/graphs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/langmem/graphs/auth.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/graphs/auth.py -------------------------------------------------------------------------------- /src/langmem/graphs/prompts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/graphs/prompts.py -------------------------------------------------------------------------------- /src/langmem/graphs/semantic.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/graphs/semantic.py -------------------------------------------------------------------------------- /src/langmem/knowledge/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/knowledge/__init__.py -------------------------------------------------------------------------------- /src/langmem/knowledge/extraction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/knowledge/extraction.py -------------------------------------------------------------------------------- /src/langmem/knowledge/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/knowledge/tools.py -------------------------------------------------------------------------------- /src/langmem/prompts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/__init__.py -------------------------------------------------------------------------------- /src/langmem/prompts/_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/_layers.py -------------------------------------------------------------------------------- /src/langmem/prompts/gradient.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/gradient.py -------------------------------------------------------------------------------- /src/langmem/prompts/metaprompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/metaprompt.py -------------------------------------------------------------------------------- /src/langmem/prompts/optimization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/optimization.py -------------------------------------------------------------------------------- /src/langmem/prompts/prompt.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/prompt.py -------------------------------------------------------------------------------- /src/langmem/prompts/stateful.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/stateful.py -------------------------------------------------------------------------------- /src/langmem/prompts/stateless.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/stateless.py -------------------------------------------------------------------------------- /src/langmem/prompts/types.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/types.py -------------------------------------------------------------------------------- /src/langmem/prompts/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/prompts/utils.py -------------------------------------------------------------------------------- /src/langmem/reflection.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/reflection.py -------------------------------------------------------------------------------- /src/langmem/short_term/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/short_term/__init__.py -------------------------------------------------------------------------------- /src/langmem/short_term/summarization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/short_term/summarization.py -------------------------------------------------------------------------------- /src/langmem/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/src/langmem/utils.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cassettes/ed2e87ca-f890-4900-9a09-dfbc12b51964.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/cassettes/ed2e87ca-f890-4900-9a09-dfbc12b51964.yaml -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/conftest.py -------------------------------------------------------------------------------- /tests/short_term/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/short_term/test_summarization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/short_term/test_summarization.py -------------------------------------------------------------------------------- /tests/short_term/test_summarization_async.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/short_term/test_summarization_async.py -------------------------------------------------------------------------------- /tests/short_term/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/short_term/utils.py -------------------------------------------------------------------------------- /tests/test_docstring_examples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/tests/test_docstring_examples.py -------------------------------------------------------------------------------- /uv.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langmem/HEAD/uv.lock --------------------------------------------------------------------------------