Skip to main content

LangChain integration for the Taguru long-term semantic memory server

Project description

langchain-taguru (Python)

Official LangChain integration for the Taguru long-term semantic memory server. The TypeScript twin (langchain-taguru on npm) exposes the identical surface.

pip install langchain-taguru
from langchain_openai import ChatOpenAI
from taguru_langchain import TaguruIngester, TaguruRetriever

# Write: an LLM decomposes documents into the association graph
# (the LangChain twin of `taguru extract`; per-source replace, idempotent).
ingester = TaguruIngester(
    context="sake",
    llm=ChatOpenAI(model="gpt-4.1", temperature=0),
    create_context=True,
    context_description="青嶺酒造という架空の酒蔵の知識",
)
ingester.ingest_documents(docs)          # docs[*].metadata["source"] required

# Read: graph lane (resolve → activate → citations) + text lane
# (search_passages), merged by Reciprocal Rank Fusion.
retriever = TaguruRetriever(context="sake", k=8)
documents = retriever.invoke("青嶺酒造")

Runnable use-case examples (RAG QA with citations, governed ingestion, conversational long-term memory — each mirrored in TypeScript) live in examples/langchain; they work offline, no API key needed.

Not provided, deliberately: a VectorStore facade (Taguru's retrieval is structural-first — similarity_search would misrepresent it), a Memory class (deprecated upstream in favor of LangGraph state), and agent Tools (the MCP bridge taguru-mcp already serves the identical tools; pair it with langchain-mcp-adapters).

The behavioral contract is the server's protocol document (GET /protocol); the ingestion prompt/validation mirror taguru extract (PROMPT_VERSION is kept in sync with src/extract.rs).

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_taguru-0.1.0.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

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

langchain_taguru-0.1.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_taguru-0.1.0.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for langchain_taguru-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d0b900f1d3dae4392357c0c74e00c112689d7f9bcb1886af70a8b66615b8d45
MD5 f5538e7fa93e99b6002ab76fcf38871e
BLAKE2b-256 516e82e9f580d1d93fb7a0e4215e32353781a8f3fa04f2152f12296c4d6e87fb

See more details on using hashes here.

File details

Details for the file langchain_taguru-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_taguru-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2c33ed77e8939ccfa9fdd159e0ec9f2fd8dfe1512521d6f7e28dce6c5f90a1
MD5 d50a1669fd6fd1aa1aaf12057645b35d
BLAKE2b-256 a209996ec0eb557e29b806539c918d42eaddf274fbe8ed7b69f81aa6989aefae

See more details on using hashes here.

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