Graph-Native Infrastructure for Context and Accountable AI Systems
The Open Source Palantir for AI Agents
Ingest your enterprise data, extract what matters, build a Context Graph and knowledge graph (KG), and run graph analytics and causal reasoning over all of it, with full decision provenance baked in. Explainable, traceable, and trustworthy by design.
Most AI agents act without a trail. They store embeddings, not meaning: context that can’t be explained, decisions that can’t be audited. In lending, that gap is a compliance exposure, not an inconvenience: an underwriting agent’s approval has to survive a regulator’s “why” months later.
Semantica sits underneath your LLM, vector store, and agent framework as a deterministic infrastructure layer: no LLM required for graph construction, reasoning, or provenance.
Who it’s for:
AI/ML platform teams shipping agents that make consequential decisions and need structured, queryable context built from fragmented raw data, not just a vector index
Data platform teams on Databricks or Snowflake who need to turn tables already sitting in Unity Catalog or a Snowflake warehouse into a governed, lineage-tracked knowledge graph, without exporting that data to a third-party SaaS first
Compliance, risk, and audit teams who need a straight answer to “why did the AI do that?” in a format a regulator will actually accept
Regulated enterprises (finance, healthcare, legal, government, defense) that can’t ship a black box, and can’t send their data to someone else’s SaaS to get one
Platform and infra engineers who want the KG, reasoning, and provenance stack self-hosted and swappable, not locked to one vendor’s backend
Data and knowledge engineers building a KG from messy, multi-source data: entities and relationships get extracted, conflicting or contradictory facts are flagged instead of silently overwritten, and duplicates are merged before they turn into noise
Context Graphs: A structured, queryable graph of everything your agent knows, decides, and reasons about
Decision Intelligence: Every decision is a first-class object: traceable, searchable by precedent, and causally linked
AI Governance & Ontology: SHACL constraints, conflict detection, compliance rules, OWL generation, and SKOS vocabulary management with a visual editor
Full Auditability: W3C PROV-O provenance on every fact, with audit trails exportable to JSON, CSV, or RDF
Deterministic Reasoning: Forward chaining, Rete network, Datalog, and SPARQL with fully explainable paths, not black boxes
Knowledge Pipeline: Multi-source ingestion, entity-aware chunking, NER/relation/event extraction, and knowledge graph construction, with semantic deduplication and provenance-preserving merges throughout
Enterprise Data Platforms: Native connectors for Databricks (Unity Catalog + Delta Lake, PAT/OAuth M2M auth, catalog/schema/table/lineage introspection) and Snowflake (warehouse/database/schema, key-pair and OAuth auth), so tables already living in your lakehouse or warehouse become graph nodes with provenance, not another export/import hop
Graph Analytics: Centrality, community detection, link prediction, and shortest-path queries over the graph you just built
Polyglot Graph Storage: Native RDF (embedded Oxigraph, Blazegraph, Apache Jena, Eclipse RDF4J via SPARQL) and Labeled Property Graphs (Neo4j, FalkorDB, Apache AGE, AWS Neptune via Cypher), plus vector stores, all swappable without touching your code
Visualization: Explore any graph, ontology, or timeline in an interactive browser workbench
Drop-in Integrations: Native Agno support, a full-featured MCP server, a comprehensive CLI, a REST API, and plugins across major editors
Why Semantica
Vector DB + RAG
Plain LLM Memory
Semantica
Recall method
Embedding similarity
Token window
Graph traversal + semantic search
Decision history
Not stored
Not stored
First-class queryable objects
Provenance
None
None
W3C PROV-O, source-linked
Reasoning
None
Black box
Forward chain, Rete, Datalog, SPARQL
Conflict detection
Silent overwrite
Silent overwrite
Detected, flagged, resolved
Time travel
No
No
Point-in-time graph snapshots
Compliance export
None
None
PROV-O, SHACL, OWL, RDF
Policy enforcement
None
None
Built-in rule engine + SHACL
Entity resolution
No
No
Blocking + semantic deduplication
Multi-agent context
Separate per agent
Separate per agent
Single shared intelligence layer
Semantica complements your existing stack rather than replacing it. Keep your LLM, vector store, and agent framework exactly as they are; Semantica adds the decision records, causal reasoning, provenance, ontology governance, conflict detection, and audit trails on top. The reasoning engines, KG construction, and provenance layer are fully deterministic; no LLM is required to use them.
Quick Start
1
pip install semantica
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fromsemantica.contextimportContextGraphgraph=ContextGraph(advanced_analytics=True)# Every agent decision becomes a queryable, auditable knowledge nodedecision_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,)# Ask "why did this happen?" and get a real, structured answerchain=graph.trace_decision_chain(decision_id)# full causal ancestrysimilar=graph.find_similar_decisions("cloud vendor",max_results=5)# precedentsimpact=graph.analyze_decision_impact(decision_id)# downstream influence mapcompliant=graph.check_decision_rules({"category":"vendor_selection"})# policy gate
Verify your install in 5 seconds:
1
2
3
4
5
semantica doctor
# Python 3.11.9 pass# semantica 0.6.0 pass# faiss vector store pass# Config file pass ~/.semantica/config.yaml
If Semantica solves a real problem for you, a star helps others find it.
Extract → Conflict Detection → Deduplication: NER, relations, events, triplets; conflicting facts flagged and resolved before they merge
Knowledge Graph:GraphBuilder constructs the graph; bi-temporal facts and full graph analytics (centrality, communities, link prediction) run on top of it
Ontology · Reasoning · Provenance · Decisions: the intelligence layer sitting on the KG, with SHACL/OWL governance, Rete/Datalog/SPARQL inference, W3C PROV-O lineage, and first-class decision records
Storage: polyglot by design, with RDF triple stores (embedded Oxigraph, Blazegraph, Apache Jena, Eclipse RDF4J), Labeled Property Graphs (Neo4j, FalkorDB, Apache AGE, AWS Neptune), and vector stores, all swappable without touching your code
Outputs: export (RDF, OWL, Parquet, Cypher, JSON-LD), interactive visualization, and access via REST API, MCP server, or CLI
Decision Intelligence turns every AI choice from an ephemeral inference into a permanent, auditable, queryable record. It answers “what did your AI decide, why, and what happened next?”: the question regulators and enterprise risk teams ask with increasing urgency.
In Semantica, a decision is not a log line. It is a first-class graph node with a full lifecycle. In regulated domains, every AI decision must be traceable to a source and defensible to an auditor: record_decision() creates a permanent, structured record exportable as W3C PROV-O, the format most compliance frameworks accept for regulator submission.
fromsemantica.contextimportContextGraphgraph=ContextGraph(advanced_analytics=True)# Record decisions with full structured contextapp_id=graph.record_decision(category="credit_application",scenario="Personal loan, $85k income, 31% DTI, 3yr employment",reasoning="Income meets threshold; employment stable; no adverse credit events",outcome="proceed_to_underwriting",confidence=0.88,metadata={"applicant_id":"A-7291"},)uw_id=graph.record_decision(category="loan_underwriting",scenario="Underwriting review for A-7291",reasoning="DTI within policy; clean 36-month credit history",outcome="approved",confidence=0.94,)rate_id=graph.record_decision(category="interest_rate",scenario="Rate assignment for approved loan A-7291",outcome="rate_set_8.9pct",reasoning="Prime + 2.4% based on risk tier B2",confidence=0.99,)# Build the auditable causal chain - relationship_type must be one of# CAUSED, INFLUENCED, or PRECEDENT_FORgraph.add_causal_relationship(app_id,uw_id,relationship_type="CAUSED")graph.add_causal_relationship(uw_id,rate_id,relationship_type="INFLUENCED")# Query the intelligencechain=graph.trace_decision_chain(rate_id)similar=graph.find_similar_decisions("personal loan approval, 31% DTI",max_results=5)impact=graph.analyze_decision_impact(uw_id)compliant=graph.check_decision_rules({"category":"loan_underwriting","confidence":0.94})insights=graph.get_decision_insights()
Context Graphs
A Context Graph is the structured memory layer that traditional RAG is missing. Instead of flat embeddings that answer “what is similar?”, a Context Graph answers “what is connected, why, and how?” Every entity, relationship, decision, and fact is a first-class node, queryable by graph traversal. Entities link to source documents, decisions link to evidence and consequences, facts carry full provenance, and conflicts are detected, not silently overwritten.
fromsemantica.contextimportContextGraph,AgentContextfromsemantica.vector_storeimportVectorStoregraph=ContextGraph(advanced_analytics=True)# Add nodes with typed propertiesgraph.add_node("acme_corp","Organization",name="Acme Corp",industry="SaaS")graph.add_node("alice_chen","Person",name="Alice Chen",role="CTO")graph.add_node("contract_001","Contract",value=2_400_000,currency="USD")# Add typed, weighted edges (extra kwargs become edge metadata)graph.add_edge("alice_chen","acme_corp",edge_type="works_for",since="2019-03-01")graph.add_edge("acme_corp","contract_001",edge_type="party_to",signed="2024-01-15")# BFS traversal - hop through the graph from any nodeneighbors=graph.get_neighbors("acme_corp",hops=2)# Point-in-time snapshot - the graph as it existed on any past datesnapshot=graph.state_at("2024-01-01")# AgentContext - high-level API for agent memory workflowsvs=VectorStore(backend="faiss")ctx=AgentContext(vector_store=vs,knowledge_graph=graph)ctx.store("Alice approved the Acme renewal in Q1 2024",conversation_id="conv_001")retrieved=ctx.retrieve("who approved the Acme contract?")
Why graph over embeddings: traversal finds connections embeddings miss (a person 3 hops from a contract); every node carries provenance so you can always ask “where did this come from?”; conflicts are flagged before they corrupt your knowledge base; point-in-time snapshots let you replay history without reprocessing.
Recipe: Audit Trail for a Regulated Decision
The flagship pattern: record a causally-linked decision chain, attach provenance to every entity, and export a regulator-ready audit trail.
fromsemantica.contextimportContextGraphfromsemantica.provenanceimportProvenanceManagerfromsemantica.exportimportRDFExportergraph=ContextGraph(advanced_analytics=True)prov=ProvenanceManager(storage_path="./audit.db")# Record the decision chaind1=graph.record_decision(category="drug_interaction_check",scenario="Patient P-4821: warfarin + amiodarone co-prescribed",reasoning="Amiodarone potentiates warfarin's anticoagulant effect",outcome="flag_for_review",confidence=0.91,)d2=graph.record_decision(category="dosage_adjustment",scenario="INR monitoring plan for P-4821",reasoning="Reduce warfarin dose per interaction severity; recheck INR in 5 days",outcome="dose_reduced_30pct",confidence=0.87,)# relationship_type must be one of CAUSED, INFLUENCED, or PRECEDENT_FORgraph.add_causal_relationship(d1,d2,relationship_type="CAUSED")# Track provenance for every entityprov.track_entity("patient_P4821",source="ehr/medication_orders_2024.json",metadata={"extractor":"NamedEntityRecognizer"})# Export W3C PROV-O for regulator submission - RDFExporter expects# {"entities": [...], "relationships": [...]}, so map ContextGraph.to_dict()'s# {"nodes": [...], "edges": [...]} shape onto it firstgraph_dict=graph.to_dict()kg={"entities":[{"id":n["id"],"type":n["type"],"text":n["content"]}forningraph_dict["nodes"]],"relationships":[{"source_id":e["source"],"target_id":e["target"],"type":e["type"]}foreingraph_dict["edges"]],}RDFExporter().export(kg,"audit_trail.ttl",format="turtle")
More recipes (GraphRAG pipelines, an AML rules engine, ontology-to-KG in one pass) are in More Recipes below.
Explore the Platform
Every module below is independently importable, with working code samples verified against the current source tree; use one or all of them.
Ingest from files, web, databases, APIs, streams, email, Git repos, Parquet, Databricks, Snowflake, or MCP servers, all through a unified interface.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fromsemantica.ingestimportFileIngestor,WebIngestor,ParquetIngestor,DBIngestor# Ingest an entire directory of contracts (PDF, DOCX, HTML, TXT)docs=FileIngestor().ingest_directory("./contracts/",recursive=True)# Ingest live web content with robots.txt compliancepages=WebIngestor().ingest_url("https://example.com/reports/annual-2024.html")# Ingest structured data from Parquet with Snappy compressionrecords=ParquetIngestor().ingest("./data/transactions.parquet")# Ingest from a SQL database - specify which tables to pullrows=DBIngestor().ingest_database(connection_string="postgresql://user:pass@localhost/mydb",include_tables=["customer_events"],max_rows_per_table=50_000,)
# Enterprise data platforms - pull tables straight out of your lakehouse# or warehouse, with lineage, instead of exporting to CSV firstfromsemantica.ingestimportDatabricksIngestor,SnowflakeIngestor# pip install "semantica[db-databricks]"databricks=DatabricksIngestor(host="https://adb-xxx.azuredatabricks.net",token="dapi-xxxxxxxx",# or client_id/client_secret for OAuth M2Mhttp_path="/sql/1.0/warehouses/xxxxxxxx",catalog="main",)customers=databricks.ingest_table("customers",limit=10_000)sales=databricks.ingest_query("SELECT * FROM sales WHERE region = 'EMEA'")table_lineage=databricks.get_table_lineage("customers",catalog="main",schema="default")# Unity Catalog lineage# pip install semantica[db-snowflake]snowflake=SnowflakeIngestor(account="myaccount",user="myuser",password="mypassword",# or private_key=... for key-pair; use authenticator="oauth", token=... for OAuthwarehouse="COMPUTE_WH",database="MYDB",)orders=snowflake.ingest_table("ORDERS",limit=10_000)
Security Note: Never hardcode credentials (token, password, private_key) in production code; pass them via environment variables (e.g., DATABRICKS_TOKEN, SNOWFLAKE_PASSWORD) or a secrets manager.
DuckDB, Elasticsearch, Google Drive, HuggingFace, MongoDB, and Pandas ingestion also ship (DuckDBIngestor, ElasticIngestor, GDriveIngestor, HuggingFaceIngestor, MongoIngestor, PandasIngestor) but aren’t re-exported from the top-level semantica.ingest namespace yet — import them directly: from semantica.ingest.duckdb_ingestor import DuckDBIngestor.
fromsemantica.semantic_extractimport(NamedEntityRecognizer,RelationExtractor,EventDetector,TripletExtractor,)text="""
Anthropic CEO Dario Amodei announced a $7.3B Series E funding round in partnership
with Google and Spark Capital, valuing the company at $61.5B as of Q4 2024.
"""# Named entity recognition with confidence thresholdingner=NamedEntityRecognizer(confidence_threshold=0.7)entities=ner.extract_entities(text)# → [Entity(name="Dario Amodei", type="PERSON"), Entity(name="Anthropic", type="ORG"),# Entity(name="Google", type="ORG"), Entity(name="$7.3B", type="MONEY"), ...]# Relationship extraction - bidirectional supportrel_extractor=RelationExtractor(confidence_threshold=0.6,bidirectional=True)relations=rel_extractor.extract_relations(text,entities=entities)# → [Relation(subject="Dario Amodei", predicate="ceo_of", object="Anthropic"),# Relation(subject="Anthropic", predicate="raised", object="$7.3B Series E"), ...]# Event detection with temporal processingevents=EventDetector(extract_participants=True,extract_time=True).detect_events(text)# → [Event(type="FUNDING", participants=["Anthropic","Google","Spark Capital"],# amount="$7.3B", date="Q4 2024")]# RDF triplets with optional provenance metadatatriplets=TripletExtractor(include_temporal=True,include_provenance=True).extract_triplets(text)# → [("Anthropic", "valuation", "$61.5B"), ("Dario Amodei", "is_ceo_of", "Anthropic"), ...]
Batch processing across many documents uses ner.process_batch([...]), not a per-call extract_entities_batch on the facade class.
semantica.kg: Knowledge Graph Construction & Analysis
Build a production knowledge graph from documents and run graph algorithms over it.
Current limitation:ReteEngine’s alpha-node condition matcher is intentionally simple in this release — validate match_patterns() output against your actual rule set before wiring it into a production compliance gate; more selective condition evaluation is on the roadmap.
# Explainable reasoning - trace the path, not just the answerfromsemantica.reasoningimportExplanationGenerator,Reasonerreasoner=Reasoner()reasoner.add_fact("parent(tom, bob)")reasoner.add_rule("ancestor(X, Y) :- parent(X, Y)")result=reasoner.forward_chain()explainer=ExplanationGenerator()explanation=explainer.generate_explanation(result)# → Explanation(conclusion="...", steps=[ReasoningStep(...)], justification=Justification(...))
fromsemantica.vector_storeimportVectorStore,HybridSearch# In-memory backend shown here: HybridSearch and explain_decision() work out of the box.# Swap backend="qdrant" / "weaviate" / "milvus" / "pinecone" / "pgvector" / "faiss" once you# scale past a single process — search() and store_decision() work identically on all of them.vs=VectorStore(backend="inmemory",dimension=1536)# Store a decision with scenario description and outcomevs.store_decision(scenario="Personal loan A-7291, $85k income, 31% DTI, 3yr employment",outcome="approved",confidence=0.94,category="loan_underwriting",)# Semantic similarity searchresults=vs.search(query="personal loan approval with low DTI",limit=10,)# Hybrid search - dense + sparse retrieval in one pass with RRF fusionhs=HybridSearch(vector_store=vs)hits=hs.search("high-risk transactions 2024")# Explain why a decision was retrievedexplanation=vs.explain_decision(results[0]["id"])
fromsemantica.provenanceimportProvenanceManagerprov=ProvenanceManager(storage_path="./provenance.db")# Track where every entity came fromprov.track_entity(entity_id="acme_corp",source="contracts/acme_master_agreement_2024.pdf",metadata={"page":1,"confidence":0.97,"extractor":"NamedEntityRecognizer"},)# Track a relationship's provenance - entity linkage travels in metadataprov.track_relationship(relationship_id="alice_works_for_acme",source="hr_records/employees_q1_2024.csv",metadata={"source_entity_id":"alice_chen","target_entity_id":"acme_corp"},)# Answer "where did this come from?"lineage=prov.get_lineage("acme_corp")trail=prov.trace_lineage("alice_chen")# full ancestor chainentry=prov.get_provenance("acme_corp")
fromsemantica.pipelineimportPipelineBuilder,ExecutionEnginebuilder=PipelineBuilder()# add_step() returns the created PipelineStep, not the builder, so these don't chainbuilder.add_step("ingest",step_type="ingest",source="./contracts/",recursive=True)builder.add_step("extract",step_type="ner_extract")builder.add_step("relations",step_type="relation_extract")builder.add_step("build_kg",step_type="kg_build",merge_entities=True)builder.add_step("deduplicate",step_type="deduplicate",threshold=0.75)builder.add_step("export",step_type="export",format="turtle",output="kg.ttl")# connect_steps() and set_parallelism() return the builder, so these do chainpipeline=(builder.connect_steps("ingest","extract").connect_steps("extract","relations").connect_steps("relations","build_kg").connect_steps("build_kg","deduplicate").connect_steps("deduplicate","export").set_parallelism(4).build(name="contracts_pipeline"))engine=ExecutionEngine()result=engine.execute_pipeline(pipeline)status=engine.get_pipeline_status(pipeline.name)progress=engine.get_progress(pipeline.name)
Temporal Intelligence: Bi-Temporal Graphs & Time Travel
Track when facts were true in the world vs. when they were recorded, and query either axis.
fromsemantica.contextimportContextGraphfromsemantica.kgimport(BiTemporalFact,TemporalGraphQuery,TemporalNormalizer,)fromdatetimeimportdatetimegraph=ContextGraph(advanced_analytics=True)graph.add_node("alice_chen","Person",role="VP Engineering")graph.add_node("acme_corp","Organization",valuation=1_200_000_000)# A temporally-bounded edge - valid_from/valid_until define when it held truegraph.add_edge("alice_chen","acme_corp",edge_type="works_for",valid_from="2024-03-01T00:00:00",valid_until="2025-01-01T00:00:00",)# Point-in-time snapshots - replay history without reprocessingsnapshot_2023=graph.state_at("2023-06-01")snapshot_2024=graph.state_at("2024-01-01")# Bi-temporal facts - valid_time is when true in the world;# recorded_at is when you learned about itfact=BiTemporalFact(valid_from=datetime(2024,3,1),valid_until=datetime(2025,1,1),recorded_at=datetime(2024,3,5),)# Query facts valid within a time window - query_time_range() expects# {"relationships": [...]} with source_id/target_id keys, which differs from# ContextGraph.to_dict()'s {"nodes", "edges"} shape, so map it firstgraph_dict=graph.to_dict()kg_relationships={"relationships":[{**e,"source_id":e["source"],"target_id":e["target"]}foreingraph_dict["edges"]]}tq=TemporalGraphQuery()facts_in_window=tq.query_time_range(kg_relationships,query="valid_facts",start_time="2024-01-01",end_time="2024-12-31")# Normalize natural language temporal expressions - returns a (start, end) rangenorm=TemporalNormalizer()start,end=norm.normalize("last quarter")
# pip install semantica[agno]fromagno.agentimportAgentfromagno.teamimportTeamfromagno.models.anthropicimportClaudefromsemantica.contextimportContextGraphfromsemantica.vector_storeimportVectorStorefromintegrations.agnoimportAgnoSharedContext,AgnoDecisionKit,AgnoKGToolkitshared=AgnoSharedContext(vector_store=VectorStore(backend="faiss"),knowledge_graph=ContextGraph(advanced_analytics=True),decision_tracking=True,)researcher=Agent(name="Researcher",model=Claude(id="claude-sonnet-4-5"),memory=shared.bind_agent("researcher"),tools=[AgnoKGToolkit(context=shared)],)analyst=Agent(name="Analyst",model=Claude(id="claude-sonnet-4-5"),memory=shared.bind_agent("analyst"),tools=[AgnoDecisionKit(context=shared)],)team=Team(agents=[researcher,analyst],mode="coordinate")# Researcher's findings are instantly available to the Analyst - no copy, no sync
fromsemantica.ingestimportFileIngestorfromsemantica.splitimportTextSplitterfromsemantica.semantic_extractimportNamedEntityRecognizer,RelationExtractorfromsemantica.kgimportGraphBuilderfromsemantica.vector_storeimportVectorStore,HybridSearchfromsemantica.contextimportAgentContext# 1. Ingestdocs=FileIngestor().ingest_directory("./docs/",recursive=True)# 2. Entity-aware chunking - never splits an entity across a chunk boundarysplitter=TextSplitter(method="entity_aware",chunk_size=1000)chunks=[splitter.split(doc["text"])fordocindocs]# 3. Extract entities and relationsner=NamedEntityRecognizer(confidence_threshold=0.7)rel_ext=RelationExtractor(confidence_threshold=0.6)entities=[ner.extract_entities(chunk)forchunk_groupinchunksforchunkinchunk_group]# 4. Build KGkg=GraphBuilder(merge_entities=True,enable_temporal=True).build(docs)# 5. Hybrid retrievalvs=VectorStore(backend="inmemory")ctx=AgentContext(vector_store=vs,knowledge_graph=kg)ctx.store("Alice approved the Acme renewal in Q1 2024",conversation_id="c1")results=HybridSearch(vector_store=vs).search("who approved the renewal?")
fromsemantica.reasoningimportReteEngine,Rule,Fact,RuleTyperete=ReteEngine()rete.build_network([Rule(rule_id="sanctions_check",name="Flag sanctioned-country transactions",conditions=[{"field":"amount","operator":">","value":10_000},{"field":"country","operator":"in","value":["IR","KP","SY","CU"]},],conclusion="flag_for_compliance_review",rule_type=RuleType.IMPLICATION,),])# Run the rule across a batch of incoming transactions, not just onefortxin[Fact("tx_101","transaction",[{"amount":25_000,"country":"IR"}]),Fact("tx_102","transaction",[{"amount":4_500,"country":"DE"}]),Fact("tx_103","transaction",[{"amount":60_000,"country":"KP"}]),]:rete.add_fact(tx)flagged=rete.match_patterns()
Same condition-matcher caveat as above applies — validate against your rule set before production use.
All already supported today: OpenAI (GPT-4o, o1, o3) · Anthropic (Claude) · Google Gemini · Mistral · Meta Llama · Groq · Cohere · Azure OpenAI · AWS Bedrock · Ollama · DeepSeek · Perplexity · Together AI · Fireworks AI · Replicate · HuggingFace · via semantica.llms and LiteLLM
Performance
Benchmarks from v0.5.0 on a 118,000-node production 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 gen
6.98× faster
Candidate generation
baseline
blocking strategy
63.6% faster
Measured on a 118,000-node production graph (AMD EPYC, 64 GB RAM); the deduplication/candidate-generation figures are historical measurements recorded in CHANGELOG.md rather than an automated tests/ assertion. Results vary by hardware, dataset topology, and backend selection — run pytest tests/vector_store/test_performance_benchmarks.py -s to measure your own data.
CLI
Every capability is available from the terminal. The CLI ships with the package, no separate install required.
1
2
3
4
pip install semantica
semantica # startup dashboardsemantica doctor # health checksemantica --help # full grouped command reference
Start with semantica, verify with doctor, build a graph, and explore the command groups from one terminal.
Native plugin bundles for Claude Code, Cursor, Codex, Windsurf, Cline, Continue, VS Code, and OpenClaw; a full-featured MCP server for any MCP-compatible client; a comprehensive REST API; and first-class Agno support for multi-agent shared context. Every major LLM provider is already supported via semantica.llms and LiteLLM: OpenAI, Anthropic, Gemini, Mistral, Llama, Groq, Cohere, Azure, Bedrock, Ollama, DeepSeek, HuggingFace, and more.
MCP setup takes 30 seconds — see MCP Server below.
Full integrations matrix (editors, MCP clients, REST clients, agentic frameworks)
# Start the backendpython -m semantica.server # port 8000# Extract entities & relations via RESTcurl -X POST http://localhost:8000/api/enrich/extract \
-H "Content-Type: application/json"\
-d '{"text": "Apple CEO Tim Cook announced record earnings."}'# List recorded decisionscurl "http://localhost:8000/api/decisions?category=vendor_selection"# Query the knowledge graphcurl "http://localhost:8000/api/graph/node/acme_corp/neighbors?depth=2"
Bundles for Claude Code, Cursor, Codex, Windsurf, Cline, Continue, VS Code, and OpenClaw in plugins/.
Knowledge Explorer
A browser-based graph workbench. Pan and zoom live graphs, scrub the timeline, review every decision’s causal chain, resolve duplicates, and author your ontology visually. Built on React 19 + Sigma.js.
Workspace
What you can do
Knowledge Graph
Live Sigma.js canvas with ForceAtlas2 layout, Ego Mode, semantic distance heatmap
Timeline
Scrub through temporal events and watch the graph evolve
Decisions
Browse the causal chain behind every recorded decision
Named-Graph Support for JenaStore: Migrated onto rdflib.Dataset(default_union=False), completing cross-backend named-graph parity across Blazegraph, RDF4J, and Jena; add_triplets() gains a graph= option
SPARQL CONSTRUCT Query Templates: Parameterized, injection-safe CONSTRUCT templates extended from Blazegraph-only to RDF4J and Jena, plus pipeline integration via the construct_template step type
Databricks Connector:DatabricksIngestor for Unity Catalog + Delta Lake ingestion, with PAT/OAuth M2M auth, table/query ingestion, and catalog/schema/table/lineage introspection. Install with pip install "semantica[db-databricks]"
SQLite Vector Store Backend:SQLiteVecStore, a disk-backed local vector store on sqlite-vec’s vec0 virtual tables, with Cosine/L2 metrics, metadata filtering, and WAL mode. Install with pip install semantica[vectorstore-sqlite]
Semantica is designed for environments where AI outputs must be explainable, auditable, and defensible, and where the data itself can’t leave your infrastructure. Self-hostable with zero vendor lock-in, it’s built as much for organizations handling confidential or classified data as for regulated industries chasing an audit trail:
Healthcare: Clinical decision support, drug interaction graphs, and patient safety audit trails
Legal: Evidence-backed research, contract analysis, case law reasoning, and privilege tracking
Government & Defense: Policy decision records, classified information governance, and regulatory reporting, fully self-hosted with no data leaving your perimeter
Law Enforcement: Case linkage, evidence provenance chains, and investigative knowledge graphs that hold up under legal scrutiny
Cybersecurity: Threat attribution, incident response timelines, and IOC provenance tracking
Autonomous Systems: Decision logs, safety validation, and explainable AI for certification
pip install semantica[agno]# Agno multi-agent integrationpip install semantica[llm-litellm]# OpenAI, Anthropic, Gemini, Mistral, Llama, Groq, Cohere, Bedrock, Ollama, DeepSeek, and morepip install semantica[graph-neo4j]# Neo4j graph store (LPG)pip install semantica[graph-falkordb]# FalkorDB graph store (LPG)pip install semantica[graph-apache-age]# Apache AGE graph store (LPG)pip install semantica[graph-amazon-neptune]# AWS Neptune graph store (LPG)pip install semantica[tripletstore-oxigraph]# Embedded in-memory/on-disk RDF store# RDF triple stores (Blazegraph, Apache Jena, Eclipse RDF4J) need no extra:# semantica.triplet_store talks SPARQL over HTTP using the core `requests` dependencypip install semantica[vectorstore-qdrant]# Qdrant vector storepip install semantica[vectorstore-pinecone]# Pinecone vector storepip install semantica[db-snowflake]# Snowflakepip install semantica[db-databricks]# Databricks (SDK + SQL connector)pip install semantica[ingest-parquet]# Parquet / PyArrowpip install semantica[ingest-arrow]# Apache Arrow, Feather, IPCpip install semantica[viz]# HTML interactive visualizationpip install semantica[watch]# Directory file watcherpip install semantica[explorer]# Knowledge Explorer dashboard
For production deployments, use Docker or Kubernetes rather than a local pip install. Set SEMANTICA_SECRET_KEY, configure a persistent LPG graph store (Neo4j / FalkorDB / Apache AGE / AWS Neptune) and/or RDF triple store (Blazegraph / Apache Jena / Eclipse RDF4J), and point the vector store at a hosted backend (Qdrant / Pinecone). See ARCHITECTURE.md for the full deployment topology.
1
2
3
# From sourcegit clone https://github.com/semantica-agi/semantica.git
cd semantica && pip install -e ".[dev]"&& pytest tests/
Enterprise
On-premises deployment · Private cloud · Custom domain implementations · SLA-backed support · Professional services for regulated industries (finance, healthcare, legal, government).