Metadata-Version: 2.4
Name: langgraph-synapse
Version: 0.1.0
Summary: An integration package connecting Synapse memory and LangGraph. Privacy-first checkpointing and cross-thread memory store.
Project-URL: Homepage, https://github.com/raghuram369/synapse
Project-URL: Repository, https://github.com/raghuram369/synapse
Project-URL: Issues, https://github.com/raghuram369/synapse/issues
License: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: langgraph-checkpoint>=2.0.0
Requires-Dist: synapse-ai-memory>=0.3.0
Description-Content-Type: text/markdown

# langgraph-synapse

An integration package connecting [Synapse](https://github.com/raghuram369/synapse) memory and [LangGraph](https://github.com/langchain-ai/langgraph).

**Privacy-first checkpointing and cross-thread memory** — all data stays local.

## Installation

```bash
pip install langgraph-synapse
```

## Components

### SynapseCheckpointer

Persist LangGraph state across invocations:

```python
from synapse import Synapse
from langgraph_synapse import SynapseCheckpointer

syn = Synapse("./agent_state")
checkpointer = SynapseCheckpointer(synapse=syn)

# Use with LangGraph
graph = builder.compile(checkpointer=checkpointer)
graph.invoke(
    {"messages": [{"role": "user", "content": "hello"}]},
    config={"configurable": {"thread_id": "thread-1"}},
)
```

### SynapseStore

Cross-thread memory store with semantic search:

```python
from synapse import Synapse
from langgraph_synapse import SynapseStore

syn = Synapse("./shared_memory")
store = SynapseStore(synapse=syn)

# Store shared context
store.put(("user", "preferences"), "diet", {"value": "vegetarian"})

# Retrieve across any thread
item = store.get(("user", "preferences"), "diet")

# Semantic search
results = store.search(("user",), query="food preferences")
```

## Why Synapse?

- **🔒 Privacy-first**: All state stays on your machine
- **🧠 Semantic recall**: Not just key-value — find relevant state by meaning
- **⚡ Zero dependencies**: Synapse is pure Python
- **📦 Portable**: `.synapse` files can be shared and federated

## License

MIT
