One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

semantica-agi/semantica

9,653+4,005 this weekPython

An open-source graph infrastructure that lets AI agents show their work, not just their answers

Semantica is an open-source Python framework that turns enterprise data into a knowledge graph and records every AI agent decision as a traceable, auditable object. Unlike vector-database RAG, which only finds things that look similar, it lets you traverse a graph to see how things are actually connected and why. It targets regulated industries like finance, healthcare, and legal where decisions need to survive an auditor's questions.

What it does

  1. Ingests data from many sources (files, web, databases, Databricks, Snowflake, etc.), builds it into a knowledge graph, and automatically extracts entities, deduplicates them, and flags conflicting facts instead of silently overwriting them
  2. Records every AI agent decision as a graph node via record_decision(), links decisions with causal relationships, and lets you replay the full history with functions like trace_decision_chain()
  3. Ships deterministic reasoning engines (Rete, Datalog, SPARQL) that work without any LLM, so the inference logic is rule-based and explainable rather than a black box
  4. Attaches W3C PROV-O provenance to every fact and can export audit trails as JSON, CSV, or RDF in formats accepted for regulator submission
  5. Reports a 6,000x speedup in node search on a 118,000-node benchmark graph compared to its prior version

Why it matters

As AI agents start making consequential decisions like loan approvals or medication checks, failing to explain why a decision was made becomes a compliance liability, not just an inconvenience. This project doesn't expose what happens inside the LLM itself, but it does make everything around it — the input data, the decision, and its provenance — traceable.

Terms in this repo

  • Knowledge Graph · a data structure representing entities and their relationships as nodes and edges
  • W3C PROV-O · a web standard for recording where data came from and how it was produced
  • SHACL · a W3C standard for validating that graph data follows defined rules
  • RDF/SPARQL · a standard way to store data as subject-predicate-object triples and query them
  • Rete network · a rule-matching algorithm designed to efficiently evaluate many rules at once

Repository description (English)

Graph-Native Infrastructure for Context and Accountable AI Systems

Open on GitHub

Trending repos

All repos →

Latest from METAL LAB