Context-M LangChain Adapter
Drop-in replacement for ConversationBufferMemory that routes through Context-M's REST API. Gives any LangChain agent access to Context-M's bi-temporal Trace, cryptographic provenance, Memory Git (branch/merge/diff/blame), ZK-lite proofs, federation-ready schema export, and the mu=0 ingest protocol (zero LLM calls during save).
Quickstart
from context_m_langchain import ContextMMemory
memory = ContextMMemory(user_id='alice')
memory.save_context(
{'input': 'Hi I\'m Alice'},
{'output': 'Nice to meet you, Alice!'})
memory.load_memory_variables(
{'input': 'what\'s my name?'})
Configuration
Environment variables:
CONTEXT_M_REST_URL— defaulthttp://localhost:8900CONTEXT_M_API_KEY— default empty (set if REST server requires RBAC)CONTEXT_M_USER_ID— default"default"
What's new in v0.2.0 (2026-08-28)
- Timeout raised to 10s default (was 5s) for large-context search.
intentfield surfaced inload_memory_variablesoutput.save_contextstreams through the unmess pipeline by default.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file context_m_langchain-0.2.0.tar.gz.
File metadata
- Download URL: context_m_langchain-0.2.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631f95fe641ef665393a53a0ab223e93852006170ca1ff7666b3f98035beda7b
|
|
| MD5 |
c6c45c30787908fe72c4cc7ad11946a3
|
|
| BLAKE2b-256 |
217855dc4b7a4d6ebdcd5c2d44493bdf835a29db0dc77bb049416213e39492f2
|
File details
Details for the file context_m_langchain-0.2.0-py3-none-any.whl.
File metadata
- Download URL: context_m_langchain-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aab51e7d729cb00039c54f69676ecc6c9ec7ff7040a59e9e426bfaace0e562e7
|
|
| MD5 |
f47f5dfb0f37fb997b9fb28f90413a27
|
|
| BLAKE2b-256 |
758f454772175769eedcaa41c8b1a7586cee5863ca04055fe237e34816ab433c
|