// agents · langchain-ai/langmem

langmem

langmem — проект с открытым исходным кодом из категории «ИИ-агенты» от langchain-ai (langchain-ai/langmem на GitHub). У него 1 698 звёзд на GitHub и 194 форка, он распространяется по лицензии MIT и последний раз обновлялся на GitHub 2 октября 2026.

LangMem: long-term memory primitives for LangGraph agents that learn and adapt from conversations.

★ 1,7 тыс. звёзд⑂ 194 форкаMITобновлено окт. 2026
▦ визуал — в README этого проекта нет встраиваемого скриншота,
поэтому здесь заглушка. Руководство ниже в любом случае полное.
// факты о проекте

Факты о проекте

Репозиторий
langchain-ai/langmem
Звёзды GitHub
1 698
Форки
194
Лицензия
MIT
Последнее обновление на GitHub
2 октября 2026
Категория
ИИ-агенты
Тип страницы
Полное руководство по установке
Официальный сайт
Official site
// как это работает

Как это работает

  1. Clarify your goal

    Decide your memory strategy: agents managing memory in the hot path during conversation, a background manager that consolidates knowledge, or both.

  2. Get the project

    Install LangMem from PyPI and configure an API key for your LLM provider.

  3. Install and configure

    Create a store (in-memory for development, database-backed for production) and give your agent the memory management and search tools with a namespace.

  4. Run your first task

    Chat with the agent normally; it records and retrieves memories itself, and you can verify recall by asking about earlier preferences.

// возможности

Почему его любят

Core memory API

Storage-agnostic primitives for extracting, consolidating, and updating knowledge from conversations, usable with any storage system.

Hot-path memory tools

Ready-made manage and search memory tools let an agent record and look up information during active conversations, under your control of what gets stored.

Background memory manager

Automatically extracts, consolidates, and updates agent knowledge outside the conversation flow.

Native LangGraph integration

Works directly with LangGraph's Long-term Memory Store, which is available by default in LangGraph Platform deployments.

Prompt refinement

Beyond facts, LangMem can optimise agent behaviour through prompt updates informed by past interactions.

Production store options

Swap the development in-memory store for a persistent Postgres-backed store so memories survive restarts.

Advertisement
// запустите сами

Запустите сами

  1. Clone the project (optional)

    Most developers simply pip install the library.

    git clone https://github.com/langchain-ai/langmem.git
    cd langmem
  2. Install and configure a provider key

    Install LangMem and export the key for the LLM provider your agent will use.

    pip install -U langmem
    export ANTHROPIC_API_KEY=<your key>
  3. Create an agent with memory tools

    Wire the manage and search memory tools into a LangGraph agent with a store, following the README example. # see README for the full code snippet

    python -c "from langmem import create_manage_memory_tool, create_search_memory_tool; print('tools ready')"
// сценарии использования

Что можно создать

Advertisement
// вопросы и ответы

Вопросы и ответы

Who maintains it?

It is maintained by LangChain (langchain-ai), the team behind LangGraph.

Is it free to use?

Yes, LangMem is MIT-licensed and free. You pay your LLM provider for the model calls the agent and memory manager make.

Does it need a paid API key?

Yes, you configure an API key for your chosen LLM provider (the README example uses Anthropic), and embeddings for the store use a configured embedding model.

How does it compare to a well-known alternative?

Vector databases store and retrieve text; LangMem adds the agent-facing layer: tools for in-conversation memory management, background consolidation, and prompt optimisation, integrated with LangGraph.

How do I get started?

Run pip install -U langmem, set your provider key, and follow the README's short example to build an agent with the two memory tools.

// продолжить изучение

Похожие инструменты

ИИ-агенты

magic-context

Self-managing, unbounded context and long-term memory for coding agents: one session, for life.

★ 2,3 тыс. звёздMIT
Смотреть руководство →
ИИ-агенты

agent-memory

Long-term memory runtime for AI agents — plain Markdown as truth, local ranked retrieval, no API key

★ 2,6 тыс. звёздMIT
Смотреть руководство →
ИИ-агенты

cognee

Open-source AI memory that gives agents persistent long-term recall.

★ 31,6 тыс. звёздApache-2.0
Смотреть руководство →
ИИ-агенты

MemoryOS

A memory operating system for long-term, personalized AI agents.

★ 1,6 тыс. звёздApache-2.0
Смотреть руководство →
ИИ-агенты

memobase

User-profile-based long-term memory for AI chatbot applications

★ 2,9 тыс. звёздApache-2.0
Смотреть руководство →
ИИ-агенты

honcho

Honcho — Plastic Labs' memory library for stateful agents that learn about their users over time.

★ 7,5 тыс. звёздAGPL-3.0
Смотреть руководство →
// альтернативы

Альтернативы: ИИ-агенты

Другие проекты из категории «ИИ-агенты» с наибольшим числом звёзд в каталоге LibreAI — реалистичный список альтернатив, если langmem вам не подходит.

// ещё в категории agents

Больше проектов: ИИ-агенты

Соседние проекты из категории «ИИ-агенты» в каталоге, ближайшие по числу звёзд к langmem — продолжайте изучать полку по обе стороны от него.

Получить langmem

Бесплатно и открыто — забирайте исходный код, ставьте звезду репозиторию и начинайте создавать.