Skip to main content

langgraph-agentram

An AgentRAM-backed BaseStore for LangGraph. It gives your LangGraph agents cross-thread long-term memory through a hosted key-value API, with no vector database and no embedding pipeline to run.

LangGraph's long-term memory is built on stores: JSON values organized by a namespace and a key. AgentRAM is a hosted memory API with exactly that shape, so this adapter is a thin, honest bridge between the two.

Install

pip install langgraph-agentram

Get a free AgentRAM API key at agentram.dev. New accounts start with 1,000 credits, no card required.

Use it

Pass the store to your agent and it gains memory that survives across threads:

from langchain.agents import create_agent
from langgraph_agentram import AgentRAMStore

store = AgentRAMStore(api_key="agentram_your_key_here")

agent = create_agent("claude-sonnet-4-6", tools=[], store=store)

Or use the store directly:

store.put(("memories", "user-1"), "language", {"value": "French"})
item = store.get(("memories", "user-1"), "language")
print(item.value)  # {"value": "French"}

# list a namespace, or text-search within it
store.search(("memories", "user-1"))
store.search(("memories", "user-1"), query="French")

Memory tools for any LangChain agent

The store plugs into LangGraph's native memory slot. If you would rather give an agent memory it can call as tools, and have it work in plain LangChain too, use the tools:

from langgraph_agentram import create_agentram_tools

tools = create_agentram_tools(api_key="agentram_your_key_here")

from langchain.agents import create_agent
agent = create_agent("claude-sonnet-4-6", tools=tools)

create_agentram_tools returns four tools the agent can call: save_memory, recall_memory, search_memory, and list_memories. They are backed by the same AgentRAM store, so the same honest limits apply. Give separate agents separate namespaces to keep their memories apart:

tools = create_agentram_tools(api_key="agentram_...", namespace=("memories", "user-1"))

How it maps to AgentRAM

  • A namespace tuple becomes an AgentRAM agent_id, joined with / (for example ("memories", "user-1") becomes memories/user-1).
  • The key is the AgentRAM key.
  • The value dict is JSON-encoded into AgentRAM's value field.

Honest limits

This adapter does what AgentRAM does, and nothing it does not.

  • search is a text match, not semantic ranking. score is always None. That is the point: memory without a vector database.
  • search treats the namespace you pass as a full namespace, not a prefix to walk into nested sub-namespaces.
  • list_namespaces is not supported. AgentRAM has no endpoint to enumerate namespaces, so the adapter raises rather than return a wrong answer. Track namespaces in your own app if you need them.
  • A namespace maps to an agent_id capped at 100 characters, and a value is capped at 5,000 characters. Both raise a clear error if exceeded, rather than truncating.
  • Per-item TTL is not mapped in this version.

Config

  • api_key (required): your key, starts with agentram_.
  • base_url (optional): defaults to https://api.agentram.dev.

Links

MIT

Release files for langgraph-agentram 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langgraph-agentram 0.2.0
File Size Uploaded
langgraph_agentram-0.2.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-agentram 0.2.0
File Interpreter ABI Platform
langgraph_agentram-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / langgraph_agentram-0.2.0.tar.gz

Download URL langgraph_agentram-0.2.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
35ba6a4e51ee58a538d8dc4c985a4b228bacc6588c3371e6a7ef75d40291669b
BLAKE2b-256 checksum
How to use checksums
b7909fa6640aa4339972092445056bbb68536093869b7b4086c885aded983506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / langgraph_agentram-0.2.0-py3-none-any.whl

Download URL langgraph_agentram-0.2.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fe6d197a882da195a3c1ce4dd7e0ed81f09c3b589be815dac4d92aa3447a94d
BLAKE2b-256 checksum
How to use checksums
6dcb582159b7b6e64f22dc77abab7f34c26ee864f9dc6c6a160b1fbe5670b1c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page