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.2.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.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langchain_taguru-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3f80472bd0febe278b6c4dfb4d4c3ca5869b15ca51a06888c9971c0bbd19447c
MD5 a8e9377cfac0e1357b471923cab6b30a
BLAKE2b-256 b2f64cdb6212a422ff92abdae0a8dc702d27b3c9ae5afeeeba722f36446aba47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_taguru-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20a654eba75da11cbf0c6ef92a506aa1c01a511da2dfae1d51a2a8527c60ca06
MD5 ea8affe975c26c251c68d3ce84ba0cec
BLAKE2b-256 bfb513260a201144b213f928e185094711dcdd7141c5dea8e4a4f03e8e879c7e

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