Semantica is a Python framework that puts a semantic and context layer underneath an LLM, a vector store, and an agent framework. It ingests enterprise data, extracts entities, relations, events, and triplets, and builds a Context Graph and knowledge graph that carries business meaning rather than embedding similarity alone. Graph construction, reasoning, and provenance are deterministic and need no LLM. Where an LLM is used (for example in extraction or community summaries) it is optional and vendor-neutral.
Every agent decision can be recorded as a first-class graph node with structured context, linked to upstream causes and downstream effects, searched by precedent, and exported as W3C PROV-O. The same structure answers "why did this happen?" for compliance, risk, and audit teams, and the framework explains what happens outside the model (the context fed in, the decision produced, applied policies, and the execution trail), not the model's internal reasoning. It is aimed at regulated domains such as finance, healthcare, legal, government, and defense, and at data teams on Databricks, Snowflake, or SAP who want a governed, lineage-tracked graph without exporting to a third-party service.
The pipeline runs Sources, Ingest, Parse, Normalize, Split, Extract, Conflict Detection, and Deduplication into a knowledge graph, with ontology, reasoning, provenance, and decision modules on top, then stores into vector stores and polyglot graph storage. Storage is swappable without code changes: RDF triple stores (embedded Oxigraph, Blazegraph, Apache Jena, Eclipse RDF4J), labeled property graphs (Neo4j, FalkorDB, Apache AGE, AWS Neptune), and vector stores (FAISS, Qdrant, Weaviate, Milvus, Pinecone, PgVector). Reasoning engines cover forward chaining, Rete, Datalog, and SPARQL with explainable paths, and bi-temporal facts support point-in-time snapshots and Allen interval algebra.
Semantica reaches agents through first-class Agno, CrewAI, and LangChain integrations (LangGraph through the LangChain extra), an MCP server whose tools extract entities and relations, record and query decisions, find precedents, walk causal chains, edit the graph, run reasoning, and export, a REST API, and a CLI with command groups for every module. Plugin bundles with domain skills and specialized agents ship for Claude Code, Cursor, Codex, Windsurf, Cline, Continue, VS Code, OpenClaw, and Pi. LLM access goes through its own provider module and LiteLLM, naming OpenAI, Anthropic, Google Gemini, Mistral, Meta Llama, Groq, Cohere, Azure OpenAI, AWS Bedrock, Ollama, DeepSeek, Perplexity, Together AI, Fireworks AI, Replicate, and Hugging Face. A browser-based Knowledge Explorer pans live graphs, scrubs a timeline, reviews decision chains, merges duplicates, and edits ontologies visually.
Reported benchmarks from v0.5.0 on a 118,000-node graph:
| Operation | Before | After | Improvement |
|---|---|---|---|
| Node search (118k nodes) | 24 ms | 0.004 ms | 6,000× faster |
| Embedding cache hit | cold load | revision-based cache | 10× throughput |
| Semantic deduplication | baseline | optimized candidate generation | 6.98× faster |
| Candidate generation | baseline | blocking strategy | 63.6% faster |
The deduplication and candidate-generation figures are historical measurements rather than automated test assertions, and results vary by hardware, dataset, and backend.
Features
- Context Graphs: a queryable graph of entities, decisions, and typed, weighted relationships, with BFS traversal, point-in-time snapshots, and an AgentContext API for agent memory
- Decision Intelligence: records each decision as a graph node, links causes and effects (CAUSED, INFLUENCED, PRECEDENT_FOR), finds precedents semantically, analyses impact, and checks decision rules
- Provenance and audit: W3C PROV-O lineage on every fact and relationship, exportable to JSON, CSV, or RDF for regulator submission
- Deterministic reasoning: forward chaining, Rete, deductive and abductive reasoning, Datalog, and SPARQL with explainable step-by-step output
- Ontology governance: OWL generation, SHACL validation, SKOS vocabularies, cross-ontology alignments, and a visual SHACL Studio editor
- Knowledge pipeline: multi-source ingestion (files, web, databases, APIs, Kafka and Kinesis streams, Git, email, Parquet, MCP servers), normalization, GraphRAG chunking, NER, relation and event extraction, and a declarative parallel pipeline DSL
- Conflict detection and entity resolution: flags value, type, relationship, temporal, and logical conflicts with several resolution strategies, tracks source credibility, and merges duplicates with blocking plus semantic deduplication
- Enterprise data platforms: Databricks (Unity Catalog and Delta Lake), Snowflake, and SAP OData connectors that turn warehouse tables into graph nodes with lineage
- Polyglot storage: RDF triple stores (Oxigraph, Blazegraph, Jena, RDF4J), property graphs (Neo4j, FalkorDB, Apache AGE, Neptune), and vector stores (FAISS, Qdrant, Weaviate, Milvus, Pinecone, PgVector) with hybrid search
- Temporal intelligence: bi-temporal facts (valid time versus recorded time), Allen interval algebra, and time travel over the graph
- Agent and editor integrations: Agno, CrewAI, and LangChain support, an MCP server, a REST API, a CLI, and plugin bundles for Claude Code, Cursor, Codex, Windsurf, Cline, Continue, VS Code, OpenClaw, and Pi
- Knowledge Explorer: a browser workbench with a live Sigma.js canvas, timeline, decision chains, mutation registry, entity resolution, ontology hub, and lineage views


