Three drop-in adapters that bring Semantica’s context graph and hybrid search into LangChain chains and LangGraph agents.
Installation
langchain-core >= 0.3. If langchain-core is not installed, the integration still imports. Every class carries the full Semantica API and degrades gracefully (build() returns None; branch on LANGCHAIN_AVAILABLE).
Components at a Glance
- SemanticaRetriever (
BaseRetriever): hybrid-search seeds retrieval, then graph edges are walkedhopssteps (default 2) for GraphRAG-style results. - SemanticaVectorStore (
VectorStore):add_texts/similarity_search/similarity_search_with_score/from_textsoverHybridSearch. - SemanticaKGTool / SemanticaDecisionTool (
BaseToolsubclasses):semantica_query_graphandsemantica_query_decisionsfor LangGraph / tool-calling agents.
Component Details
- SemanticaRetriever
- SemanticaVectorStore
- Agent tools
Hybrid search seeds retrieval; then graph edges are walked
hops steps so results go beyond flat vector similarity. If hybrid search is omitted or fails, the retriever falls back to a ContextGraph.query keyword scan.