semantica-agi/semantica

Graph-Native Infrastructure for Context and Accountable AI Systems

Semantica – Graph‑Native Infrastructure for Context‑Aware, Accountable AI

What it is – An open‑source Python library that sits between your large language model (LLM) / agent stack and your enterprise data. It turns raw tables, documents, and streams into a Context Graph (a knowledge graph enriched with ontologies, provenance, and deterministic reasoning). The graph becomes a structured, queryable memory layer that records every AI decision as a first‑class node, enabling audit‑ready traceability, conflict detection, and policy enforcement.


Core capabilities

Feature What you get
Context Graphs Entity‑rich graph built from multi‑source ingestion (files, databases, Databricks, Snowflake, SAP OData, Kafka, etc.). Nodes carry source links and timestamps.
Decision Intelligence record_decision() creates a permanent graph node; you can trace causal chains, find precedents, analyse downstream impact, and export audit trails (W3C PROV‑O).
Deterministic reasoning Forward‑chaining, Rete network, Datalog and SPARQL inference with full explainable paths – no LLM needed for reasoning.
AI Governance & Ontology Built‑in SHACL/OWL/SKOS support, conflict detection, rule engine, and visual ontology editor.
Polyglot storage Swappable back‑ends: RDF triple stores (Oxigraph, Blazegraph, Jena, RDF4J) and labeled‑property graphs (Neo4j, FalkorDB, Apache AGE, AWS Neptune) plus vector stores.
Analytics & visualization Centrality, community detection, link prediction, shortest‑path queries, and an interactive browser workbench for exploring graphs, timelines, and ontologies.
Integrations Ready‑made adapters for LangChain, CrewAI, Agno, a REST/MCP server, CLI, and plugins for major editors.

Who should consider it

  • AI/ML platform teams that need a structured, searchable memory layer for agents making consequential decisions.
  • Data platform engineers on Databricks, Snowflake, or similar lakehouses who want to turn existing tables into a governed knowledge graph without moving data to a third‑party SaaS.
  • Compliance, risk, and audit groups in regulated sectors (finance, healthcare, legal, government, defense) that must answer "why did the AI do that?" with provenance that regulators accept.
  • Infrastructure engineers looking for a self‑hosted, vendor‑agnostic KG and reasoning stack.

Quick start (Python)

pip install semantica
from semantica.context import ContextGraph

graph = ContextGraph(advanced_analytics=True)

# Record a decision
decision_id = graph.record_decision(
    category="vendor_selection",
    scenario="Choose cloud provider for HIPAA workload",
    reasoning="AWS offers BAA, mature HIPAA tooling, and existing team expertise",
    outcome="selected_aws",
    confidence=0.93,
)

# Query the decision
chain = graph.trace_decision_chain(decision_id)      # full causal ancestry
similar = graph.find_similar_decisions("cloud vendor", max_results=5)
impact = graph.analyze_decision_impact(decision_id)

Run semantica doctor to verify the installation.


Architecture snapshot

Sources → Ingest → Parse → Normalize → Split → Extract → Conflict Detection → Deduplication
   → Knowledge Graph → [Ontology·Reasoning·Provenance·Decisions] → Enriched KG
   → Polyglot Store (RDF/LPG + Vector) → Export / Visualize / REST / CLI

Each stage is a separate importable module, so you can use only the parts you need.


Where to learn more


TL;DR

Semantica gives you a self‑hosted, standards‑compliant knowledge graph that sits on top of your existing LLM/agent stack, turning raw enterprise data into a traceable, queryable, and governable context layer. It provides deterministic reasoning, decision auditability, and polyglot graph storage—making AI systems explainable and compliant for high‑stakes, regulated environments.

Related

  • Project
  • Project
  • Project
  • Project
  • Project