Skip to main content

OpenViking integrations for LangChain and LangGraph

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.0.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.0-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_openviking-0.1.0.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for langchain_openviking-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc4ee47a122527881eae1fbbe6f9ca857cc0269cd60f08c8d3fd3fff94996e9e
MD5 f1a6a62775ae3336a618fc0701d57d7f
BLAKE2b-256 7fc0418dba42bddb5093d20d5e36c3e8d9ceff0b27ce92a6bc2f16fb33535fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_openviking-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_openviking-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea32f08fa4bed81743e0d11e5f2f52e940c1464de74408d45bd574c081a4dffb
MD5 b86f65e533dbe5a01af997b1faa41a23
BLAKE2b-256 042287f547ab4a84fa4094462e1e1cfdbadf28a539b5cd0efdb147b754d3b88a

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_openviking-0.1.0-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