Skip to main content

OpenViking integrations for LangChain and LangGraph

Reason this release was yanked:

Accidentally published development build to production PyPI. Use 0.1.0 instead.

Project description

langchain-openviking

langchain-openviking is the official OpenViking integration package for LangChain and LangGraph applications. It keeps framework-specific adapters separate from the OpenViking server and communicates with remote OpenViking instances through the lightweight openviking-sdk package.

Installation

For LangChain retrievers, tools, message history, and context wrappers:

pip install langchain-openviking

For the LangGraph store and middleware:

pip install "langchain-openviking[langgraph]"

Quick start

from langchain_openviking import OpenVikingRetriever
from openviking_sdk import SyncHTTPClient

client = SyncHTTPClient(
    url="http://127.0.0.1:1933",
    api_key="your-user-api-key",
)
client.initialize()
retriever = OpenVikingRetriever(
    client=client,
    target_uri="viking://user/memories",
)

try:
    documents = retriever.invoke("What deployment preferences should I remember?")
finally:
    client.close()

The package also provides OpenVikingSessionRecorder, OpenVikingContextMiddleware, OpenVikingStore, OpenVikingChatMessageHistory, and create_openviking_tools.

Client ownership

  • A client supplied through client= or async_client= remains caller-owned.
  • Clients created from url= are managed by the adapter and can be closed with close() or aclose() as documented by each adapter.
  • Embedded path= mode requires the full openviking package. It is kept for compatibility, while the standalone package's default boundary is HTTP.

The previous openviking.integrations.langchain import path remains available from the full openviking distribution as a compatibility shim.

See the OpenViking documentation and the repository's examples/langchain-langgraph directory for complete examples.

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

langchain_openviking-0.1.dev1885.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

langchain_openviking-0.1.dev1885-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file langchain_openviking-0.1.dev1885.tar.gz.

File metadata

File hashes

Hashes for langchain_openviking-0.1.dev1885.tar.gz
Algorithm Hash digest
SHA256 153263486b52f33f6ab2475bccf5a52636a561ecd9b5f57b63118d4bac691406
MD5 55885dbbf7cdd866dd84aec23af1dd83
BLAKE2b-256 8b9d6b718e13380052464c63bf166a7be39e41223ecee634ce6582544de540b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_openviking-0.1.dev1885.tar.gz:

Publisher: python-langchain-release.yml on volcengine/OpenViking

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_openviking-0.1.dev1885-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_openviking-0.1.dev1885-py3-none-any.whl
Algorithm Hash digest
SHA256 ae8b81b3dcaecd98f58dae91a4c5d270cc64056230d102bc3e1260939a259a08
MD5 13515ce67d3e58a6a24e9f71640d5700
BLAKE2b-256 fd0422260edb5da0b62462c57b357230901c32224551f4f6f843dab024607198

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_openviking-0.1.dev1885-py3-none-any.whl:

Publisher: python-langchain-release.yml on volcengine/OpenViking

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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