Skip to main content
If you came from the LangChain recipe, this page gives the longer comparison. LangChain memory classes live inside your process. They keep buffers, summaries, or graphs near the chain. Tex stores memory outside the process and returns the relevant slice when you call recall.

Mapping

Migration

Trade-offs

LangChain memory has no network hop. Tex adds a network call: writes are usually around 150ms, and reads can take a few seconds. In return, memory survives deploys, prompts stay bounded, sessions can share memory, and each recall has a confidence score. For a small hobby bot, a buffer may be enough. For a customer-facing app, Tex is usually the cleaner path.

Drop-in adapter (optional)

If your codebase has dozens of LangChain chains and you’d rather not rewrite them all, wrap Tex in a BaseChatMemory subclass:
tex_chat_memory.py
Use it like any other LangChain memory: