skillfed

langchain-neo4j

An integration package connecting Neo4j and LangChain

langchain-neo4j v0.10.0 252.7K downloads/30d#8,535 on PyPI42
Permissive license MIT Active released

What it is and what it does

langchain-neo4j bridges Neo4j graph databases and LangChain's LLM framework, providing high-level abstractions for common patterns. It includes Neo4jGraph for direct Cypher queries, Neo4jChatMessageHistory for persisting conversations, Neo4jVector for semantic search over documents, and GraphCypherQAChain for translating natural language questions into Cypher queries. It also offers Neo4jSaver and AsyncNeo4jSaver as checkpoint backends for LangGraph workflows, and LLMGraphTransformer to extract knowledge graphs from unstructured text.

The package is designed for developers building AI applications that need to store, query, or reason over structured knowledge in a graph. Its main dependencies are langchain-core, langgraph, neo4j, and neo4j-graphrag—all part of the LangChain ecosystem. Installation is straightforward, but you must have a Neo4j instance running and accessible over the network.

Use it for:

  • Build a chatbot that recalls conversation history from Neo4j across sessions.
  • Translate natural language questions into Cypher queries and retrieve graph data via an LLM.
  • Store and search document embeddings in Neo4j for semantic similarity retrieval.
  • Extract entities and relationships from unstructured text and populate a Neo4j knowledge graph.
  • Persist LangGraph agent state and checkpoints in Neo4j for fault tolerance and replay.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates Neo4j graph databases with LangChain, providing wrappers for querying graphs, storing chat history, managing vector stores, and building knowledge graphs from text using LLMs.

Yes, if you are building LangChain applications that need to integrate Neo4j. The package is actively maintained, has low install friction, carries no known vulnerabilities, and provides well-documented abstractions for common graph-LLM patterns. Install only if you have a Neo4j instance available and a use case that benefits from graph storage or reasoning.

Install

langchain-neo4j on PyPI

pip

pip install langchain-neo4j

uv

uv add langchain-neo4j

poetry

poetry add langchain-neo4j

Installing langchain-neo4j

Before you install

Low friction install with a pure Python wheel. Active maintenance with recent releases; last commit 2026-08-10. Depends on langchain-core, langgraph, neo4j, and neo4j-graphrag, which are established LangChain ecosystem packages.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install langchain-neo4j

from langchain_neo4j import Neo4jGraph

graph = Neo4jGraph(url="bolt://localhost:7687", username="neo4j", password="password")
result = graph.query("MATCH (n) RETURN n LIMIT 1;")

Requires a running Neo4j instance accessible at the specified URL; Python 3.10 or later.

Verify before relying

  • Whether Neo4jVector requires external embedding models (e.g., OpenAI) or supports local embeddings.
  • Performance characteristics when storing large chat histories or vector indexes in Neo4j.
  • Compatibility with Neo4j versions older than the driver's minimum requirement.

Package facts

License MIT (permissive)
Python support supports the current Python release (<3.15,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — langchain-classic, langchain-core, langgraph, neo4j-graphrag, neo4j
Maintenance actively maintained — 65 days since the last release
Last repo commit
First released
Downloads 252,731/month — #8,535 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: langchain_neo4j-0.10.0-py3-none-any.whl

Tags

neo4j langchain integrationgraph database llmcypher query natural languageneo4j vector storeknowledge graph from textchat history in neo4jlanggraph checkpoint neo4j
graph-databaseknowledge-graphllm-integration

More Artificial Intelligence packages

Further reading