Illustration of what semantica does: Python toolkit that turns messy data into a knowledge graph with decision audit trails

semantica-agi /

semantica

Python toolkit that turns messy data into a knowledge graph with decision audit trails

Most AI agents recall things by embedding similarity. That gives a score, but no structure, no relationships and no explanation of why a result came back. Semantica adds a graph layer underneath your LLM, vector store and agent framework to fill that gap.

It takes data from files, databases, the web, streams and platforms like Databricks, Snowflake and SAP. It extracts entities and relations, flags conflicting facts, merges duplicates and builds a graph. Ontologies (OWL, SHACL, SKOS) define what entities mean. Reasoning engines such as forward chaining, Rete, Datalog and SPARQL run over the graph.

The README compares it with a plain vector database plus RAG, and with LLM memory. It says those silently overwrite conflicting facts and keep no decision history. Semantica keeps decisions as queryable objects with provenance. Graph building, reasoning and provenance need no LLM. It explains the context and decisions around a model, not what happens inside the model.

What it does

  • Decisions as queryable objects

    Each agent decision is stored with category, scenario, reasoning, outcome and confidence. You can trace its causal chain, find similar past decisions and map downstream impact.

  • Provenance on every fact

    Facts carry W3C PROV-O provenance, exportable to JSON, CSV or RDF, to support audit and compliance work.

  • Deterministic reasoning

    Forward chaining, Rete network, Datalog and SPARQL give explainable reasoning paths. No LLM is required for these.

  • Knowledge pipeline

    Multi-source ingestion, entity-aware chunking, entity, relation and event extraction, conflict detection and semantic deduplication feed the graph.

  • Swappable graph storage

    Supports RDF stores (Oxigraph, Blazegraph, Jena, RDF4J) and property graphs (Neo4j, FalkorDB, AGE, Neptune), plus vector stores. Integrations include LangChain, CrewAI, Agno, an MCP server, a CLI and a REST API.

What you could build

  • Record every agent decision and trace why it was made for a compliance review.
  • Build a governed knowledge graph from tables in Databricks, Snowflake or SAP.
  • Find precedent decisions similar to a new case before an agent acts.
  • Detect conflicting facts and merge duplicate entities across several data sources.
  • Define an ontology with SHACL rules and check decisions against policy.

Get started

Install the package with pip, then run the doctor command to check the install. Create a ContextGraph in Python and record a decision to see tracing and precedent search work.

pip install semantica
semantica doctor

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Memory, RAG & data

    ↑↓ to move, Enter to open, Esc to close