Skip to main content

Drop-in LangGraph integration for Neruva agent memory. Wraps BaseCheckpointSaver + BaseStore to persist graph checkpoints and cross-thread KV state into the Neruva substrate (records + KG + federated agent_context). One-line install, works with every LangGraph StateGraph.

Project description

neruva-langgraph

PyPI License

Drop-in LangGraph integration for Neruva agent memory. Two wrappers cover the canonical LangGraph plug points: graph checkpoints and the cross-thread KV store.

pip install neruva-langgraph

NeruvaCheckpointSaver

Persists every graph checkpoint into Neruva Records. One namespace per thread_id, so each conversation gets its own replayable timeline. Drop into any StateGraph.compile():

from langgraph.graph import StateGraph
from neruva_langgraph import NeruvaCheckpointSaver

graph = builder.compile(
    checkpointer=NeruvaCheckpointSaver(api_key="nv_..."),
)
graph.invoke(
    {"input": "hello"},
    config={"configurable": {"thread_id": "user_alice"}},
)

Realistic example -- multi-turn StateGraph with persistent checkpoints

from typing import TypedDict
from langgraph.graph import StateGraph, END
from langchain_anthropic import ChatAnthropic
from neruva_langgraph import NeruvaCheckpointSaver

class State(TypedDict):
    messages: list

def call_model(state: State) -> State:
    llm = ChatAnthropic(model="claude-opus-4-7")
    state["messages"].append(llm.invoke(state["messages"]))
    return state

builder = StateGraph(State)
builder.add_node("model", call_model)
builder.set_entry_point("model")
builder.add_edge("model", END)
graph = builder.compile(checkpointer=NeruvaCheckpointSaver())
graph.invoke({"messages": ["What did I tell you last week?"]},
             config={"configurable": {"thread_id": "user_alice"}})

NeruvaContextStore

LangGraph's BaseStore for cross-thread KV (e.g. user preferences, shared facts). Backed by Records + agent_recall for semantic search:

from neruva_langgraph import NeruvaContextStore

store = NeruvaContextStore(api_key="nv_...")
graph = builder.compile(
    checkpointer=NeruvaCheckpointSaver(),
    store=store,
)
store.put(("users", "alice"), "profile", {"city": "Toronto"})
hit = store.get(("users", "alice"), "profile")
print(hit)   # -> Item(value={'city': 'Toronto'}, ...)

Why Neruva instead of LangGraph's built-in checkpointers?

Feature LangGraph defaults Neruva
Persists across process restart sqlite / postgres setup Built-in (GCS-backed)
Cross-session recall No Yes via namespaces=[...]
Vector / semantic store search No (KV only) Yes via agent_recall
Auto fact extraction (KG) No Auto (hd_kg_extraction_prompt)
Determinism / replayability No Bit-identical from seed
Portability DB-locked .neruva zip container

Get an API key - Docs - Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neruva_langgraph-0.1.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neruva_langgraph-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file neruva_langgraph-0.1.0.tar.gz.

File metadata

  • Download URL: neruva_langgraph-0.1.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for neruva_langgraph-0.1.0.tar.gz
Algorithm Hash digest
SHA256 156e8583acce60d7ce1752b57c9930e086772c9dafa38e96da0005317a63eff3
MD5 524c7900b709b0e3d257bde12ed93270
BLAKE2b-256 b62097255dc72514294553257ab7feea4b47f5ba363ad90665b621e3a6ce401c

See more details on using hashes here.

File details

Details for the file neruva_langgraph-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for neruva_langgraph-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfe07e65bb05790618a051cac9f3eadce2f6ff4bd07ae78dd7bf451e4f3220a9
MD5 d530938faa6769fb85fcf2e994c181c0
BLAKE2b-256 4078bcb406e72145faba409d23888943e21743d1cfd5ef620b68f91a5e5e597e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page