LangChain integration for ArqonDB — VectorStore, ChatHistory, and GraphStore backed by a single self-hosted engine.
Project description
langchain-arqondb
LangChain integration for ArqonDB — VectorStore, ChatHistory, and GraphStore backed by a single self-hosted engine.
Install
pip install langchain-arqondb
For GraphStore support:
pip install langchain-arqondb[graph]
Prerequisites
ArqonDB must be running locally:
curl -sL https://github.com/AlbericByte/ArqonDB/releases/download/v0.1.1/install.sh | bash
Usage
VectorStore
from langchain_arqondb import ArqonDBVectorStore
from langchain_openai import OpenAIEmbeddings
vectorstore = ArqonDBVectorStore(
embedding=OpenAIEmbeddings(),
addr="localhost:9379",
index_name="my_docs",
)
# Add documents
vectorstore.add_texts(
["The cat sat on the mat", "The dog ran in the park"],
metadatas=[{"source": "a"}, {"source": "b"}],
)
# Search
docs = vectorstore.similarity_search("cat", k=2)
# Use as retriever in a RAG chain
retriever = vectorstore.as_retriever()
Chat Message History
from langchain_arqondb import ArqonDBChatMessageHistory
history = ArqonDBChatMessageHistory(session_id="user-123")
history.add_user_message("hello")
history.add_ai_message("hi there")
print(history.messages) # [HumanMessage(...), AIMessage(...)]
history.clear()
Graph Store
from langchain_arqondb import ArqonDBGraphStore
from langchain_community.graphs.graph_document import GraphDocument, Node, Relationship
from langchain_core.documents import Document
graph = ArqonDBGraphStore(addr="localhost:9379", graph_name="knowledge")
alice = Node(id="alice", type="Person", properties={"name": "Alice"})
bob = Node(id="bob", type="Person", properties={"name": "Bob"})
rel = Relationship(source=alice, target=bob, type="KNOWS")
graph.add_graph_documents([
GraphDocument(nodes=[alice, bob], relationships=[rel], source=Document(page_content=""))
])
results = graph.query("*")
schema = graph.get_structured_schema
Why ArqonDB?
ArqonDB is the only single backend that covers all three LangChain storage needs:
| Need | Pinecone | Neo4j | Redis | ArqonDB |
|---|---|---|---|---|
| VectorStore | Yes | No | Yes | Yes |
| GraphStore | No | Yes | No | Yes |
| ChatHistory | No | No | Yes | Yes |
| Self-hosted | No | Partial | Yes | Yes |
| Single engine | - | - | - | Yes |
Zero extra API keys. Apache-2.0. Self-hosted.
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
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 langchain_arqondb-0.1.9.tar.gz.
File metadata
- Download URL: langchain_arqondb-0.1.9.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9cd7ff5cb5f9dce47289cd46bc7361a88273c84594c7e9171be6330a4e00c4e
|
|
| MD5 |
30e5235ce130958ca80d1136363d2f07
|
|
| BLAKE2b-256 |
2b926fa9c1d66e3472e9a7a0c7a652a35f01aeace5dbd8d579bc84fa70da7c08
|
Provenance
The following attestation bundles were made for langchain_arqondb-0.1.9.tar.gz:
Publisher:
release.yml on AlbericByte/ArqonDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_arqondb-0.1.9.tar.gz -
Subject digest:
d9cd7ff5cb5f9dce47289cd46bc7361a88273c84594c7e9171be6330a4e00c4e - Sigstore transparency entry: 1184098422
- Sigstore integration time:
-
Permalink:
AlbericByte/ArqonDB@3b81fcb0058b52689e54c5447524a0316bdeef3a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlbericByte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3b81fcb0058b52689e54c5447524a0316bdeef3a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file langchain_arqondb-0.1.9-py3-none-any.whl.
File metadata
- Download URL: langchain_arqondb-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
130cedc3864eb945a3ec64225fd3b190ee14f92043f1d376b2deeb2cdba913d2
|
|
| MD5 |
f18f2a87023790b2d0d38ddc4c8964f8
|
|
| BLAKE2b-256 |
a600c3dad3f9cc7bec52e0ef2a6fa2f8c50ad3e30c27a6d574526b3a29b801da
|
Provenance
The following attestation bundles were made for langchain_arqondb-0.1.9-py3-none-any.whl:
Publisher:
release.yml on AlbericByte/ArqonDB
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_arqondb-0.1.9-py3-none-any.whl -
Subject digest:
130cedc3864eb945a3ec64225fd3b190ee14f92043f1d376b2deeb2cdba913d2 - Sigstore transparency entry: 1184098446
- Sigstore integration time:
-
Permalink:
AlbericByte/ArqonDB@3b81fcb0058b52689e54c5447524a0316bdeef3a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AlbericByte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3b81fcb0058b52689e54c5447524a0316bdeef3a -
Trigger Event:
workflow_dispatch
-
Statement type: