{"id":50718161,"url":"https://github.com/semantica-agi/semantica","last_synced_at":"2026-06-26T22:00:35.900Z","repository":{"id":325411584,"uuid":"1008304614","full_name":"semantica-agi/semantica","owner":"semantica-agi","description":"Semantica 🧠 • Build AI systems that can explain, trace, and justify every decision. Knowledge graphs, context graphs, reasoning engines, provenance, and governance for production AI.","archived":false,"fork":false,"pushed_at":"2026-06-24T10:06:58.000Z","size":39933,"stargazers_count":1245,"open_issues_count":33,"forks_count":185,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-06-24T10:14:29.158Z","etag":null,"topics":["agent-memory","agentic-ai","ai-agents","ai-infrastructure","context-graph","context-management","data-infrastructure","developer-tools","graph-analytics","graph-modeling","graphrag","knowledge-engineering","knowledge-graphs","ontology-engineering","python-library","rag","schema-design","semantic-layer","semantic-web"],"latest_commit_sha":null,"homepage":"https://getsemantica.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semantica-agi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":".github/SUPPORT.md","governance":"docs/governance.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Hawksight-AI"}},"created_at":"2025-06-25T10:41:00.000Z","updated_at":"2026-06-24T10:06:55.000Z","dependencies_parsed_at":"2026-03-17T20:01:14.059Z","dependency_job_id":"51a08ade-89c1-4c91-b32c-22f5451dd77c","html_url":"https://github.com/semantica-agi/semantica","commit_stats":null,"previous_names":["hawksight-ai/semantica","semantica-agi/semantica"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/semantica-agi/semantica","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantica-agi%2Fsemantica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantica-agi%2Fsemantica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantica-agi%2Fsemantica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantica-agi%2Fsemantica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semantica-agi","download_url":"https://codeload.github.com/semantica-agi/semantica/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semantica-agi%2Fsemantica/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34834415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-memory","agentic-ai","ai-agents","ai-infrastructure","context-graph","context-management","data-infrastructure","developer-tools","graph-analytics","graph-modeling","graphrag","knowledge-engineering","knowledge-graphs","ontology-engineering","python-library","rag","schema-design","semantic-layer","semantic-web"],"created_at":"2026-06-09T21:00:25.962Z","updated_at":"2026-06-26T22:00:35.892Z","avatar_url":"https://github.com/semantica-agi.png","language":"Python","funding_links":["https://github.com/sponsors/Hawksight-AI"],"categories":["*Ops for AI","Model Monitoring \u0026 Governance"],"sub_categories":["LLMOps","AI Governance \u0026 Compliance"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"Semantica Logo.png\" alt=\"Semantica\" width=\"420\"/\u003e\n\n### The Context \u0026 Accountability Layer for AI Systems\n\n**Auditable \u0026nbsp;·\u0026nbsp; Governed \u0026nbsp;·\u0026nbsp; Explainable \u0026nbsp;·\u0026nbsp; Production-Ready**\n\n[![PyPI](https://img.shields.io/pypi/v/semantica.svg?style=flat-square\u0026color=0066CC)](https://pypi.org/project/semantica/)\n[![Total Downloads](https://static.pepy.tech/badge/semantica?style=flat-square)](https://pepy.tech/project/semantica)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg?style=flat-square)](https://www.python.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![CI](https://img.shields.io/github/actions/workflow/status/semantica-agi/semantica/ci.yml?style=flat-square\u0026label=CI)](https://github.com/semantica-agi/semantica/actions)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=flat-square\u0026logo=discord\u0026logoColor=white)](https://discord.gg/sV34vps5hH)\n[![Docs](https://img.shields.io/badge/Docs-docs.getsemantica.ai-0099FF?style=flat-square\u0026logo=readthedocs\u0026logoColor=white)](https://docs.getsemantica.ai/)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/semantica-agi/semantica)\n\n**[Website](https://getsemantica.ai/)** \u0026nbsp;·\u0026nbsp; **[Docs](https://docs.getsemantica.ai/)** \u0026nbsp;·\u0026nbsp; **[Discord](https://discord.gg/sV34vps5hH)** \u0026nbsp;·\u0026nbsp; **[Twitter/X](https://x.com/BuildSemantica)** \u0026nbsp;·\u0026nbsp; **[YouTube](https://www.youtube.com/watch?v=QfnNZg4-dZA)** \u0026nbsp;·\u0026nbsp; **[PyPI](https://pypi.org/project/semantica/)** \u0026nbsp;·\u0026nbsp; **[Changelog](CHANGELOG.md)**\n\n\u003c/div\u003e\n\n---\n\n\u003e Most AI agents act without a trail.\n\u003e\n\u003e They store embeddings, not meaning. They make decisions that cannot be audited, recall context that cannot be explained, and produce outputs that cannot be traced back to a source. Regulators, auditors, and enterprise risk teams ask the same question: **can you prove what your AI did and why?**\n\u003e\n\u003e Semantica is the **Context and Accountability Layer** that sits alongside your LLM, vector store, and agent framework. It complements your existing stack, not replaces it, adding structured intelligence, causal reasoning, and a full audit trail to every decision your agents make.\n\n**Core capabilities:**\n\n- **Context Graphs:** A structured, queryable graph of everything your agent knows, decides, and reasons about\n- **Decision Intelligence:** Every decision is a first-class object: traceable, searchable by precedent, and causally linked\n- **AI Governance:** Policy enforcement, SHACL constraints, conflict detection, and compliance rule checks built in\n- **Full Auditability:** W3C PROV-O provenance on every fact, with audit trails exportable to JSON, CSV, or RDF\n- **Reasoning Engines:** Forward chaining, Rete network, Datalog, and SPARQL with fully explainable paths, not black boxes\n- **Drop-in Integrations:** Agno native, 12-tool MCP server, 50+ CLI commands, 109 REST endpoints, plugins for 8 editors\n\n---\n\n**[Quick Start](#quick-start)** \u0026nbsp;·\u0026nbsp; **[Architecture](ARCHITECTURE.md)** \u0026nbsp;·\u0026nbsp; **[Why Semantica](#why-semantica)** \u0026nbsp;·\u0026nbsp; **[Context Graphs](#context-graphs)** \u0026nbsp;·\u0026nbsp; **[Decision Intelligence](#decision-intelligence)** \u0026nbsp;·\u0026nbsp; **[Module Reference](#module-reference)** \u0026nbsp;·\u0026nbsp; **[Recipes](#recipes)** \u0026nbsp;·\u0026nbsp; **[CLI](#cli)** \u0026nbsp;·\u0026nbsp; **[Integrations](#integrations)** \u0026nbsp;·\u0026nbsp; **[Performance](#performance)** \u0026nbsp;·\u0026nbsp; **[Install](#installation)**\n\n---\n\n## See It in Action\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg\n  src=\"docs/assets/img/semantica-knowledge-explorer-demo.gif\"\n  alt=\"Semantica Knowledge Explorer: live graph, decisions, entity resolution, ontology hub\"\n  width=\"900\"\n/\u003e\n\n\u003ca href=\"https://www.youtube.com/watch?v=QfnNZg4-dZA\" target=\"_blank\"\u003e\n  \u003cimg\n    src=\"https://img.youtube.com/vi/QfnNZg4-dZA/maxresdefault.jpg\"\n    alt=\"Semantica: Full Platform Walkthrough on YouTube\"\n    width=\"900\"\n  /\u003e\n\u003c/a\u003e\n\n**[Watch the full platform walkthrough →](https://www.youtube.com/watch?v=QfnNZg4-dZA)**\n\n*Knowledge Explorer · Context Graphs · Reasoning Engine · Decision Intelligence · Ontology Hub*\n\n\u003c/div\u003e\n\n---\n\n## Quick Start\n\n```bash\npip install semantica\n```\n\n```python\nfrom semantica.context import ContextGraph\n\ngraph = ContextGraph(advanced_analytics=True)\n\n# Every agent decision becomes a queryable, auditable knowledge node\ndecision_id = graph.record_decision(\n    category=\"vendor_selection\",\n    scenario=\"Choose cloud provider for HIPAA workload\",\n    reasoning=\"AWS offers BAA, mature HIPAA tooling, and existing team expertise\",\n    outcome=\"selected_aws\",\n    confidence=0.93,\n)\n\n# Ask \"why did this happen?\" and get a real, structured answer\nchain     = graph.trace_decision_chain(decision_id)       # full causal ancestry\nsimilar   = graph.find_similar_decisions(\"cloud vendor\", max_results=5)  # precedents\nimpact    = graph.analyze_decision_impact(decision_id)    # downstream influence map\ncompliant = graph.check_decision_rules({\"category\": \"vendor_selection\"})  # policy gate\n```\n\n**Verify your install in 5 seconds:**\n\n```bash\nsemantica doctor\n# Python 3.11.9         pass\n# semantica 0.5.0       pass\n# faiss vector store    pass\n# Config file           pass    ~/.semantica/config.yaml\n```\n\n\u003e [!TIP]\n\u003e Run `semantica doctor` immediately after install to verify all backends are wired correctly. It catches misconfigured API keys, missing drivers, and backend connectivity issues before they surface at runtime.\n\n\u003cdiv align=\"center\"\u003e\n\nIf Semantica solves a real problem for you, a star helps others find it.\n\n**[⭐ Star on GitHub](https://github.com/semantica-agi/semantica)** \u0026nbsp;·\u0026nbsp; **[Join Discord](https://discord.gg/sV34vps5hH)**\n\n\u003c/div\u003e\n\n---\n\n## Architecture\n\nThe full data pipeline and decision intelligence lifecycle are documented with Mermaid flowcharts in **[ARCHITECTURE.md](ARCHITECTURE.md)**:\n\n- [Full data pipeline](ARCHITECTURE.md#full-data-pipeline): all sources → ingest → parse → normalize → split → extract → deduplication → KG → storage → export\n- [Decision intelligence lifecycle](ARCHITECTURE.md#decision-intelligence-lifecycle): record → link → query → govern → audit\n\n**→ [View architecture →](ARCHITECTURE.md)**\n\nEvery component is independently importable. Use one module or all of them.\n\n---\n\n## Why Semantica\n\n| | Vector DB + RAG | Plain LLM Memory | **Semantica** |\n| --- | --- | --- | --- |\n| **Recall method** | Embedding similarity | Token window | Graph traversal + semantic search |\n| **Decision history** | Not stored | Not stored | First-class queryable objects |\n| **Provenance** | None | None | W3C PROV-O, source-linked |\n| **Reasoning** | None | Black box | Forward chain, Rete, Datalog, SPARQL |\n| **Conflict detection** | Silent overwrite | Silent overwrite | Detected, flagged, resolved |\n| **Time travel** | No | No | Point-in-time graph snapshots |\n| **Compliance export** | None | None | PROV-O, SHACL, OWL, RDF |\n| **Policy enforcement** | None | None | Built-in rule engine + SHACL |\n| **Entity resolution** | No | No | Blocking + semantic deduplication |\n| **Multi-agent context** | Separate per agent | Separate per agent | Single shared intelligence layer |\n\n\u003e [!IMPORTANT]\n\u003e **Semantica complements your existing stack — it does not replace anything you already have.** Keep your LLM, vector store, and agent framework exactly as they are. Semantica sits alongside them as the accountability and intelligence layer, adding structured decision records, causal reasoning, W3C PROV-O provenance, ontology governance, conflict detection, and compliance-grade audit trails. Your stack handles retrieval and generation. Semantica handles accountability and explainability. They are built to work together.\n\n\u003e [!NOTE]\n\u003e Semantica is designed for AI agents, GraphRAG systems, enterprise knowledge intelligence, and temporal reasoning applications. The reasoning engines, KG construction, and provenance layer are fully deterministic; no LLM is required to use them.\n\n### How Semantica Compares\n\nMost AI frameworks are built for retrieval. Semantica is built for accountability. The comparison below focuses on the intelligence capabilities that define the difference.\n\n| | LangChain | LlamaIndex | MS GraphRAG | Mem0 | Zep | **Semantica** |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: |\n| **Knowledge Graph construction** | ⚡ Plugin | ⚡ PropertyGraph | ⚡ Community KG | ❌ | ❌ | ✅ Native, full-stack |\n| **Decision tracking** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ First-class objects |\n| **Audit trail \u0026 provenance** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ W3C PROV-O, exportable |\n| **Explainable reasoning** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ Rete · Datalog · SPARQL |\n| **Ontology (OWL / SHACL)** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ Generation + visual editor |\n| **Conflict detection** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ 5 resolution strategies |\n| **Bi-temporal graph \u0026 time travel** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ Point-in-time snapshots |\n| **Entity resolution** | ❌ | ⚡ Partial | ⚡ Partial | ❌ | ⚡ Partial | ✅ Blocking + semantic dedup |\n| **Multi-agent shared context** | ⚡ LangGraph | ⚡ Partial | ❌ | ✅ | ⚡ Partial | ✅ Single shared graph |\n| **Policy enforcement** | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ SHACL + rule engine |\n\n\u003e ✅ Full support \u0026nbsp;\u0026nbsp; ⚡ Partial / via plugin \u0026nbsp;\u0026nbsp; ❌ Not supported\n\n**The key distinction:** LangChain, LlamaIndex, and MS GraphRAG are excellent retrieval and orchestration layers. Mem0 and Zep excel at personal agent memory. None of them answer *\"prove what your AI decided, why, and whether it complied with policy.\"* Semantica is built specifically for that question.\n\n---\n\n## Context Graphs\n\nA 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?\"*\n\nEvery entity, relationship, decision, and fact is a first-class node, queryable by graph traversal and neighbor expansion. Entities link to source documents. Decisions link to evidence and consequences. Facts carry full provenance. Conflicts are detected, not silently overwritten.\n\n```python\nfrom semantica.context import ContextGraph, AgentContext\nfrom semantica.vector_store import VectorStore\n\ngraph = ContextGraph(advanced_analytics=True)\n\n# Add nodes with typed properties\ngraph.add_node(\"acme_corp\",    \"Organization\", name=\"Acme Corp\", industry=\"SaaS\")\ngraph.add_node(\"alice_chen\",   \"Person\",       name=\"Alice Chen\", role=\"CTO\")\ngraph.add_node(\"contract_001\", \"Contract\",     value=2_400_000, currency=\"USD\")\n\n# Add typed, weighted edges (extra kwargs become edge metadata)\ngraph.add_edge(\"alice_chen\", \"acme_corp\",    edge_type=\"works_for\",  since=\"2019-03-01\")\ngraph.add_edge(\"acme_corp\",  \"contract_001\", edge_type=\"party_to\",   signed=\"2024-01-15\")\n\n# BFS traversal - hop through the graph from any node\nneighbors = graph.get_neighbors(\"acme_corp\", hops=2)\n\n# Point-in-time snapshot - the graph as it existed on any past date\nsnapshot  = graph.state_at(\"2024-01-01\")\n\n# AgentContext - high-level API for agent memory workflows\nvs  = VectorStore(backend=\"faiss\")\nctx = AgentContext(vector_store=vs, knowledge_graph=graph)\nctx.store(\"Alice approved the Acme renewal in Q1 2024\", conversation_id=\"conv_001\")\nretrieved = ctx.retrieve(\"who approved the Acme contract?\")\n```\n\n**Why graph over embeddings:**\n\n- Traversal finds connections embeddings miss, including a person 3 hops from a contract\n- Every node carries provenance so you can always ask *\"where did this come from?\"*\n- Conflicts are detected and flagged before they corrupt your knowledge base\n- Point-in-time snapshots let you replay history without reprocessing\n\n---\n\n## Decision Intelligence\n\nDecision 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 are asking with increasing urgency.\n\nIn Semantica, a decision is not a log line. It is a first-class graph node with a full lifecycle:\n\n\u003e [!IMPORTANT]\n\u003e In regulated domains (healthcare, finance, legal, government), 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.\n\n```\nrecord_decision()             → stored as a graph node with full structured context\nadd_causal_relationship()     → linked to upstream causes and downstream effects\nfind_similar_decisions()      → semantic precedent search across all past decisions\ntrace_decision_chain()        → full causal ancestry back to root causes\nanalyze_decision_impact()     → downstream influence map - everything this decision affected\ncheck_decision_rules()        → policy compliance gate against configurable rule sets\nexport / audit trail          → W3C PROV-O, CSV, or JSON for regulator submission\n```\n\n```python\nfrom semantica.context import ContextGraph\n\ngraph = ContextGraph(advanced_analytics=True)\n\n# Record decisions with full structured context\napp_id = graph.record_decision(\n    category=\"credit_application\",\n    scenario=\"Personal loan, $85k income, 31% DTI, 3yr employment\",\n    reasoning=\"Income meets threshold; employment stable; no adverse credit events\",\n    outcome=\"proceed_to_underwriting\",\n    confidence=0.88,\n    metadata={\"applicant_id\": \"A-7291\"},\n)\nuw_id = graph.record_decision(\n    category=\"loan_underwriting\",\n    scenario=\"Underwriting review for A-7291\",\n    reasoning=\"DTI within policy; clean 36-month credit history\",\n    outcome=\"approved\",\n    confidence=0.94,\n)\nrate_id = graph.record_decision(\n    category=\"interest_rate\",\n    scenario=\"Rate assignment for approved loan A-7291\",\n    outcome=\"rate_set_8.9pct\",\n    reasoning=\"Prime + 2.4% based on risk tier B2\",\n    confidence=0.99,\n)\n\n# Build the auditable causal chain\ngraph.add_causal_relationship(app_id, uw_id,   relationship_type=\"triggers\")\ngraph.add_causal_relationship(uw_id,  rate_id, relationship_type=\"enables\")\n\n# Query the intelligence\nchain     = graph.trace_decision_chain(rate_id)\nsimilar   = graph.find_similar_decisions(\"personal loan approval, 31% DTI\", max_results=5)\nimpact    = graph.analyze_decision_impact(uw_id)\ncompliant = graph.check_decision_rules({\"category\": \"loan_underwriting\", \"confidence\": 0.94})\ninsights  = graph.get_decision_insights()\n```\n\n---\n\n## Module Reference\n\nSemantica is a full platform. Every module is independently importable and composable. Below are working examples for each.\n\n### `semantica.ingest`: Multi-Source Ingestion\n\nIngest from files, web, databases, APIs, streams, email, Git repos, Parquet, Snowflake, or MCP servers, all through a unified interface.\n\n```python\nfrom semantica.ingest import FileIngestor, WebIngestor, ParquetIngestor, DBIngestor\n\n# Ingest an entire directory of contracts (PDF, DOCX, HTML, TXT)\ndocs = FileIngestor().ingest_directory(\"./contracts/\", recursive=True)\n\n# Ingest live web content with robots.txt compliance\npages = WebIngestor().ingest_url(\"https://example.com/reports/annual-2024.html\")\n\n# Ingest structured data from Parquet with Snappy compression\nrecords = ParquetIngestor().ingest(\"./data/transactions.parquet\")\n\n# Ingest from a SQL database - specify which tables to pull\nrows = DBIngestor().ingest_database(\n    connection_string=\"postgresql://user:pass@localhost/mydb\",\n    include_tables=[\"customer_events\"],\n    max_rows_per_table=50_000,\n)\n```\n\n**Supported sources:** Local files (PDF, DOCX, PPTX, HTML, TXT, CSV, JSON, YAML, Excel, XML) · Web pages · RSS/Atom feeds · REST APIs · Databases (PostgreSQL, MySQL, SQLite, Oracle, SQL Server) · Parquet datasets · Snowflake · Git repositories · Email (IMAP/POP3) · Message streams (Kafka, RabbitMQ, Kinesis, Pulsar) · MCP resources\n\n---\n\n### `semantica.semantic_extract`: NER, Relations, Events, Triplets\n\nExtract structured knowledge from raw text in one pass.\n\n```python\nfrom semantica.semantic_extract import (\n    NamedEntityRecognizer,\n    RelationExtractor,\n    EventDetector,\n    TripletExtractor,\n)\n\ntext = \"\"\"\nAnthropic CEO Dario Amodei announced a $7.3B Series E funding round in partnership\nwith Google and Spark Capital, valuing the company at $61.5B as of Q4 2024.\n\"\"\"\n\n# Named entity recognition with confidence thresholding\nner = NamedEntityRecognizer(confidence_threshold=0.7)\nentities = ner.extract_entities(text)\n# → [Entity(name=\"Dario Amodei\", type=\"PERSON\"), Entity(name=\"Anthropic\", type=\"ORG\"),\n#    Entity(name=\"Google\", type=\"ORG\"), Entity(name=\"$7.3B\", type=\"MONEY\"), ...]\n\n# Relationship extraction - bidirectional support\nrel_extractor = RelationExtractor(confidence_threshold=0.6, bidirectional=True)\nrelations = rel_extractor.extract_relations(text, entities=entities)\n# → [Relation(subject=\"Dario Amodei\", predicate=\"ceo_of\", object=\"Anthropic\"),\n#    Relation(subject=\"Anthropic\", predicate=\"raised\", object=\"$7.3B Series E\"), ...]\n\n# Event detection with temporal processing\nevents = EventDetector(extract_participants=True, extract_time=True).detect_events(text)\n# → [Event(type=\"FUNDING\", participants=[\"Anthropic\",\"Google\",\"Spark Capital\"],\n#          amount=\"$7.3B\", date=\"Q4 2024\")]\n\n# RDF triplets with optional provenance metadata\ntriplets = TripletExtractor(include_temporal=True, include_provenance=True).extract_triplets(text)\n# → [(\"Anthropic\", \"valuation\", \"$61.5B\"), (\"Dario Amodei\", \"is_ceo_of\", \"Anthropic\"), ...]\n```\n\n---\n\n### `semantica.kg`: Knowledge Graph Construction \u0026 Analysis\n\nBuild a production knowledge graph from documents and run graph algorithms over it.\n\n```python\nfrom semantica.ingest import FileIngestor\nfrom semantica.kg import (\n    GraphBuilder,\n    GraphAnalyzer,\n    CentralityCalculator,\n    CommunityDetector,\n    PathFinder,\n    LinkPredictor,\n    BiTemporalFact,\n)\nfrom datetime import datetime\n\n# Build KG - merge duplicate entities, track temporal edges\nsources = FileIngestor().ingest_directory(\"./contracts/\", recursive=True)\nkg = GraphBuilder(merge_entities=True, enable_temporal=True).build(sources)\n\n# Graph analytics\nanalyzer    = GraphAnalyzer()\nanalysis    = analyzer.analyze_graph(kg)             # full graph metrics\n\ncentrality  = CentralityCalculator()\ndegree      = centrality.calculate_degree_centrality(kg)    # most-connected entities\nbetweenness = centrality.calculate_betweenness_centrality(kg)\n\ncommunities = CommunityDetector().detect_communities(kg, method=\"louvain\")  # natural clusters\npath        = PathFinder().find_shortest_path(kg, \"alice_chen\", \"contract_001\")\npredictions = LinkPredictor().predict_links(kg, top_k=10)   # relationship predictions\n\n# Bi-temporal facts - track valid time vs. recorded time independently\nfact = BiTemporalFact(\n    valid_from=datetime(2024, 3, 1),\n    valid_until=datetime(2025, 1, 1),\n    recorded_at=datetime(2024, 3, 5),\n)\n```\n\n---\n\n### `semantica.reasoning`: Forward Chaining, Rete, Datalog, SPARQL\n\nRun explainable rule-based inference, not a black box.\n\n```python\nfrom semantica.reasoning import ReteEngine, Rule, Fact, RuleType\n\nrete = ReteEngine()\nrete.build_network([\n    Rule(\n        rule_id=\"aml_flag\",\n        name=\"Flag high-risk transactions\",\n        conditions=[\n            {\"field\": \"amount\",  \"operator\": \"\u003e\",  \"value\": 10_000},\n            {\"field\": \"country\", \"operator\": \"in\", \"value\": [\"IR\", \"KP\", \"SY\"]},\n        ],\n        conclusion=\"flag_for_compliance_review\",\n        rule_type=RuleType.IMPLICATION,\n    ),\n    Rule(\n        rule_id=\"velocity_check\",\n        name=\"Flag rapid sequential transfers\",\n        conditions=[\n            {\"field\": \"transfers_in_1h\", \"operator\": \"\u003e\", \"value\": 5},\n            {\"field\": \"total_amount\",    \"operator\": \"\u003e\", \"value\": 50_000},\n        ],\n        conclusion=\"flag_velocity_breach\",\n        rule_type=RuleType.IMPLICATION,\n    ),\n])\n\nrete.add_fact(Fact(\"tx_001\", \"transaction\", [{\"amount\": 15_000, \"country\": \"IR\"}]))\nflagged = rete.match_patterns()\n# → [{\"rule\": \"aml_flag\", \"matched_facts\": [\"tx_001\"], \"conclusion\": \"flag_for_compliance_review\"}]\n```\n\n```python\n# Recursive Datalog - natural language for graph queries\nfrom semantica.reasoning import DatalogReasoner\n\nengine = DatalogReasoner()\nengine.add_fact(\"parent(tom, bob)\")\nengine.add_fact(\"parent(bob, ann)\")\nengine.add_fact(\"parent(ann, pat)\")\nengine.add_rule(\"ancestor(X, Y) :- parent(X, Y).\")\nengine.add_rule(\"ancestor(X, Z) :- parent(X, Y), ancestor(Y, Z).\")\nancestors = engine.query(\"ancestor(tom, ?X)\")\n# → [{\"X\": \"bob\"}, {\"X\": \"ann\"}, {\"X\": \"pat\"}]\n```\n\n```python\n# Explainable reasoning - trace the path, not just the answer\nfrom semantica.reasoning import ExplanationGenerator, Reasoner\n\nreasoner = Reasoner()\nresult   = reasoner.infer(kg, rules=[...])\n\nexplainer = ExplanationGenerator()\nexplanation = explainer.generate(result)\n# → Explanation(conclusion=\"...\", steps=[ReasoningStep(...)], justification=Justification(...))\n```\n\n---\n\n### `semantica.vector_store`: Hybrid \u0026 Filtered Semantic Search\n\nDrop-in vector store with 7 backends, hybrid search, and decision-aware retrieval.\n\n```python\nfrom semantica.vector_store import VectorStore, HybridSearch\n\n# Works with FAISS, Qdrant, Weaviate, Milvus, Pinecone, PgVector, or in-memory\nvs = VectorStore(backend=\"qdrant\", dimension=1536)\n\n# Store a decision with scenario description and outcome\nvs.store_decision(\n    scenario=\"Personal loan A-7291, $85k income, 31% DTI, 3yr employment\",\n    outcome=\"approved\",\n    confidence=0.94,\n    category=\"loan_underwriting\",\n)\n\n# Semantic similarity search\nresults = vs.search(\n    query=\"personal loan approval with low DTI\",\n    limit=10,\n)\n\n# Hybrid search - dense + sparse retrieval in one pass with RRF fusion\nhs   = HybridSearch(vector_store=vs)\nhits = hs.search(\"high-risk transactions 2024\")\n\n# Explain why a decision was retrieved\nexplanation = vs.explain_decision(results[0][\"id\"])\n```\n\n---\n\n\u003e [!CAUTION]\n\u003e Mixing vectors generated from different embedding models in the same `VectorStore` index leads to inconsistent similarity scores. Always use a single embedding model per index, or isolate per-model data using namespaces.\n\n### `semantica.split`: GraphRAG-Native Document Chunking\n\nKG-aware splitting that preserves entity boundaries, relation triplets, and ontology concepts, essential for GraphRAG pipelines.\n\n```python\nfrom semantica.split import TextSplitter, EntityAwareChunker, RelationAwareChunker\n\ntext = open(\"contracts/master_agreement.txt\").read()\n\n# Standard recursive chunking\nchunks = TextSplitter(method=\"recursive\", chunk_size=1000, chunk_overlap=200).split(text)\n\n# Entity-aware chunking - never splits a named entity across chunks (GraphRAG)\nchunks = TextSplitter(method=\"entity_aware\", ner_method=\"llm\", chunk_size=1000).split(text)\n\n# Relation-aware chunking - preserves (subject, predicate, object) triplets intact\nchunks = RelationAwareChunker(chunk_size=1000, preserve_triplets=True).chunk(text)\n\n# Graph-based chunking - uses centrality to find natural community boundaries\nchunks = TextSplitter(method=\"graph_based\", chunk_size=1000).split(text)\n\n# Hierarchical chunking - multi-level (section → paragraph → sentence)\nchunks = TextSplitter(method=\"hierarchical\", levels=[\"section\", \"paragraph\"]).split(text)\n```\n\n**Supported methods:** `recursive` · `token` · `sentence` · `paragraph` · `semantic_transformer` · `entity_aware` · `relation_aware` · `graph_based` · `ontology_aware` · `hierarchical` · `community_detection` · `centrality_based` · `llm`\n\n---\n\n### `semantica.provenance`: W3C PROV-O Lineage\n\nEvery fact is linked to its source. No black boxes, no mystery outputs.\n\n```python\nfrom semantica.provenance import ProvenanceManager\n\nprov = ProvenanceManager(storage_path=\"./provenance.db\")\n\n# Track where every entity came from\nprov.track_entity(\n    entity_id=\"acme_corp\",\n    source=\"contracts/acme_master_agreement_2024.pdf\",\n    metadata={\"page\": 1, \"confidence\": 0.97, \"extractor\": \"NamedEntityRecognizer\"},\n)\n\nprov.track_relationship(\n    relationship_id=\"alice_works_for_acme\",\n    source_entity_id=\"alice_chen\",\n    target_entity_id=\"acme_corp\",\n    source=\"hr_records/employees_q1_2024.csv\",\n)\n\n# Answer \"where did this come from?\"\nlineage = prov.get_lineage(\"acme_corp\")\ntrail   = prov.trace_lineage(\"alice_chen\")   # full ancestor chain\nentry   = prov.get_provenance(\"acme_corp\")\n```\n\n---\n\n### `semantica.ontology`: OWL Generation, SHACL Validation\n\nGenerate ontologies from data, validate shapes, and manage your vocabulary.\n\n```python\nfrom semantica.ontology import OntologyGenerator, OntologyValidator\n\ndata = {\n    \"entities\": [\n        {\"id\": \"acme_corp\",  \"type\": \"Organization\", \"industry\": \"SaaS\", \"founded\": 2012},\n        {\"id\": \"alice_chen\", \"type\": \"Person\",        \"role\": \"CTO\",     \"since\": 2019},\n    ],\n    \"relationships\": [\n        {\"source\": \"alice_chen\", \"target\": \"acme_corp\", \"type\": \"works_for\"},\n    ],\n}\n\ngen       = OntologyGenerator(base_uri=\"https://semantica.dev/ontology/\")\nontology  = gen.generate_ontology(data)\nclasses   = gen.infer_classes(data)\nprops     = gen.infer_properties(data, classes)\noptimized = gen.optimize_ontology(ontology)\n\n# Validate against SHACL shapes\nvalidator = OntologyValidator()\nreport    = validator.validate(ontology)\n# → ValidationResult(conforms=True, errors=[], warnings=[])\n```\n\n---\n\n### `semantica.conflicts`: Conflict Detection \u0026 Resolution\n\nDetect and resolve conflicting facts from multiple sources before they corrupt your knowledge base.\n\n```python\nfrom semantica.conflicts import ConflictDetector, ConflictResolver, SourceTracker\n\nentities_from_source_a = [\n    {\"id\": \"alice_chen\", \"role\": \"CTO\",   \"salary\": 250_000, \"start_date\": \"2019-03-01\"},\n]\nentities_from_source_b = [\n    {\"id\": \"alice_chen\", \"role\": \"VP Eng\", \"salary\": 275_000, \"start_date\": \"2019-03-01\"},\n]\n\n# Detect all conflict types: value, type, relationship, temporal, logical\ndetector   = ConflictDetector()\nconflicts  = detector.detect_conflicts(entities_from_source_a + entities_from_source_b)\n# → [Conflict(entity=\"alice_chen\", field=\"role\",   values=[\"CTO\",\"VP Eng\"], severity=\"HIGH\"),\n#    Conflict(entity=\"alice_chen\", field=\"salary\",  values=[250000,275000],   severity=\"MEDIUM\")]\n\n# Resolve using multiple strategies\nresolver = ConflictResolver()\nresolved = resolver.resolve(conflicts, strategy=\"credibility_weighted\")  # weighted by source trust\nresolved = resolver.resolve(conflicts, strategy=\"temporal\")              # prefer most recent\nresolved = resolver.resolve(conflicts, strategy=\"voting\")                # majority wins\n\n# Track source credibility over time\ntracker = SourceTracker()\ntracker.track(\"source_a\", credibility=0.85)\ntracker.track(\"source_b\", credibility=0.72)\n```\n\n---\n\n### `semantica.deduplication`: Entity Resolution at Scale\n\nBlock, cluster, and merge duplicates with semantic similarity. **6.98× faster** than baseline.\n\n```python\nfrom semantica.deduplication import DuplicateDetector, EntityMerger\n\nentities = [\n    {\"id\": \"e1\", \"name\": \"Acme Corporation\",  \"domain\": \"acme.com\"},\n    {\"id\": \"e2\", \"name\": \"Acme Corp.\",         \"domain\": \"acme.com\"},\n    {\"id\": \"e3\", \"name\": \"ACME Corp\",          \"domain\": \"acme.co\"},\n    {\"id\": \"e4\", \"name\": \"Globex Industries\",  \"domain\": \"globex.com\"},\n]\n\ndetector   = DuplicateDetector(similarity_threshold=0.75, use_clustering=True)\ncandidates = detector.detect_duplicates(entities)\ngroups     = detector.detect_duplicate_groups(entities)\n# → DuplicateGroup(entities=[\"e1\",\"e2\",\"e3\"], confidence=0.91, strategy=\"semantic+blocking\")\n\nmerger  = EntityMerger(preserve_provenance=True)\nops     = merger.merge_duplicates(entities, strategy=\"keep_most_complete\")\nhistory = merger.get_merge_history()\n```\n\n---\n\n### `semantica.normalize`: Data Normalization \u0026 Cleaning\n\nStandardize text, entities, dates, numbers, and encodings before building your knowledge graph.\n\n```python\nfrom semantica.normalize import (\n    TextNormalizer,\n    EntityNormalizer,\n    DateNormalizer,\n    NumberNormalizer,\n    DataCleaner,\n)\n\n# Unicode, whitespace, casing, HTML tags, smart quotes\ntext  = TextNormalizer().normalize(\"  Acme Corp.’s Q4 report…  \")\n# → \"Acme Corp.'s Q4 report...\"\n\n# Alias resolution + entity disambiguation with confidence scores\nnames = EntityNormalizer().normalize_entity(\"ACME Corp.\")\n# → NormalizedEntity(canonical=\"Acme Corporation\", type=\"Organization\", confidence=0.91)\n\n# Natural language date parsing with timezone conversion\ndt    = DateNormalizer().normalize_date(\"3 weeks ago\")\n# → datetime(2026, 5, 22, tzinfo=UTC)\n\n# Unit conversion and currency normalization\nprice = NumberNormalizer().normalize(\"$1.25M USD\")\n# → NormalizedNumber(value=1_250_000, currency=\"USD\")\n\n# Deduplicate and impute missing values across a dataset\nclean = DataCleaner().clean(records, dedup_threshold=0.9, fill_missing=\"mean\")\n```\n\n---\n\n### `semantica.pipeline`: Pipeline DSL\n\nCompose ingestion, extraction, and graph-building into a declarative, parallel pipeline.\n\n```python\nfrom semantica.pipeline import PipelineBuilder, ExecutionEngine\n\npipeline = (\n    PipelineBuilder()\n    .add_step(\"ingest\",      step_type=\"ingest\",           source=\"./contracts/\", recursive=True)\n    .add_step(\"extract\",     step_type=\"ner_extract\")\n    .add_step(\"relations\",   step_type=\"relation_extract\")\n    .add_step(\"build_kg\",    step_type=\"kg_build\",         merge_entities=True)\n    .add_step(\"deduplicate\", step_type=\"deduplicate\",      threshold=0.75)\n    .add_step(\"export\",      step_type=\"export\",           format=\"turtle\", output=\"kg.ttl\")\n    .connect_steps(\"ingest\",      \"extract\")\n    .connect_steps(\"extract\",     \"relations\")\n    .connect_steps(\"relations\",   \"build_kg\")\n    .connect_steps(\"build_kg\",    \"deduplicate\")\n    .connect_steps(\"deduplicate\", \"export\")\n    .set_parallelism(4)\n    .build(name=\"contracts_pipeline\")\n)\n\nengine   = ExecutionEngine()\nresult   = engine.execute(pipeline)\nstatus   = engine.get_status(pipeline)\nprogress = engine.get_progress(pipeline)\n```\n\n\u003e [!WARNING]\n\u003e Large-scale ingestion may require significant memory. For datasets exceeding 500k nodes, use `StreamIngestor` or enable incremental batch mode with `GraphBuilder(incremental=True)`. Use `set_parallelism()` conservatively on memory-constrained machines.\n\n---\n\n### Temporal Intelligence: Bi-Temporal Graphs \u0026 Time Travel\n\nTrack when facts were true *in the world* vs. when they were *recorded*, and query either axis.\n\n```python\nfrom semantica.context import ContextGraph\nfrom semantica.kg import (\n    BiTemporalFact,\n    TemporalGraphQuery,\n    TemporalVersionManager,\n    TemporalNormalizer,\n)\nfrom datetime import datetime\n\ngraph = ContextGraph(advanced_analytics=True)\ngraph.add_node(\"alice_chen\", \"Person\",       role=\"VP Engineering\")\ngraph.add_node(\"acme_corp\",  \"Organization\", valuation=1_200_000_000)\n\n# Point-in-time snapshots - replay history without reprocessing\nsnapshot_2023 = graph.state_at(\"2023-06-01\")\nsnapshot_2024 = graph.state_at(\"2024-01-01\")\n\n# Bi-temporal facts - valid_time is when true in the world;\n# recorded_at is when you learned about it\nfact = BiTemporalFact(\n    valid_from=datetime(2024, 3, 1),\n    valid_until=datetime(2025, 1, 1),\n    recorded_at=datetime(2024, 3, 5),\n)\n\n# Allen interval algebra - 13 temporal relations (before, during, overlaps, etc.)\ntq = TemporalGraphQuery(graph)\nfacts_in_window = tq.query_time_range(\"2024-01-01\", \"2024-12-31\")\n\n# Normalize natural language temporal expressions\nnorm = TemporalNormalizer()\ndt   = norm.normalize(\"last quarter\")  # → datetime range for Q1 2026\n```\n\n---\n\n### `semantica.export`: RDF, OWL, Parquet, Cypher, JSON-LD\n\nExport to any format required by regulators, graph databases, or downstream systems.\n\n```python\nfrom semantica.export import (\n    RDFExporter,\n    JSONExporter,\n    ParquetExporter,\n    LPGExporter,\n    ReportGenerator,\n)\n\nkg = {\"entities\": [...], \"relationships\": [...]}\n\nrdf = RDFExporter()\nturtle_str = rdf.export_to_rdf(kg, format=\"turtle\")     # returns string\njsonld_str = rdf.export_to_rdf(kg, format=\"json-ld\")\n\nrdf.export(kg, \"kg_audit.ttl\",    format=\"turtle\")\nrdf.export(kg, \"kg_audit.jsonld\", format=\"json-ld\")\nrdf.export(kg, \"kg_audit.nt\",     format=\"n-triples\")\n\n# Columnar analytics - Snappy-compressed Parquet\nParquetExporter().export(kg, \"kg_snapshot.parquet\", compression=\"snappy\")\n\n# JSON knowledge graph\nJSONExporter().export_knowledge_graph(kg, \"kg.json\")\n\n# Neo4j / Memgraph Cypher statements for graph database import\nLPGExporter().export(kg, \"kg_import.cypher\", method=\"cypher\")\n\n# Human-readable HTML / Markdown report\nReportGenerator().generate(kg, \"audit_report.html\", format=\"html\")\n```\n\n---\n\n### `semantica.visualization`: Interactive Graph Workbench\n\nRender force-directed graphs, community maps, ontology hierarchies, and temporal dashboards.\n\n```python\nfrom semantica.visualization import (\n    KGVisualizer,\n    OntologyVisualizer,\n    EmbeddingVisualizer,\n    TemporalVisualizer,\n)\nimport numpy as np\n\nkg = {\"entities\": [...], \"relationships\": [...]}\n\n# Interactive force-directed graph (opens in browser)\nviz = KGVisualizer(layout=\"force\", color_scheme=\"default\")\nviz.visualize_network(kg, output=\"interactive\", file_path=\"kg.html\")\nviz.visualize_communities(kg, communities, output=\"interactive\")\nviz.visualize_centrality(kg, centrality, centrality_type=\"degree\")\nviz.visualize_entity_types(kg, output=\"html\", file_path=\"entity_types.html\")\n\n# Ontology class hierarchy\nOntologyVisualizer().visualize_hierarchy(ontology, output=\"interactive\")\n\n# 2D embedding projection (UMAP / t-SNE / PCA)\nEmbeddingVisualizer().visualize_2d_projection(\n    embeddings=np.array([...]),\n    labels=[\"entity_a\", \"entity_b\"],\n    method=\"umap\",\n)\n\n# Timeline scrubber - watch the graph evolve\nTemporalVisualizer().visualize_timeline(kg, output=\"interactive\")\n```\n\n---\n\n### Multi-Agent Shared Context with Agno\n\nOne shared intelligence layer. All agents read and write to the same context graph.\n\n```python\n# pip install semantica[agno]\nfrom agno.agent import Agent\nfrom agno.team import Team\nfrom agno.models.anthropic import Claude\nfrom semantica.context import ContextGraph\nfrom semantica.vector_store import VectorStore\nfrom integrations.agno import AgnoSharedContext, AgnoDecisionKit, AgnoKGToolkit\n\nshared = AgnoSharedContext(\n    vector_store=VectorStore(backend=\"faiss\"),\n    knowledge_graph=ContextGraph(advanced_analytics=True),\n    decision_tracking=True,\n)\n\nresearcher = Agent(\n    name=\"Researcher\",\n    model=Claude(id=\"claude-sonnet-4-6\"),\n    memory=shared.bind_agent(\"researcher\"),\n    tools=[AgnoKGToolkit(context=shared)],\n)\nanalyst = Agent(\n    name=\"Analyst\",\n    model=Claude(id=\"claude-sonnet-4-6\"),\n    memory=shared.bind_agent(\"analyst\"),\n    tools=[AgnoDecisionKit(context=shared)],\n)\n\nteam = Team(agents=[researcher, analyst], mode=\"coordinate\")\n# Researcher's findings are instantly available to the Analyst - no copy, no sync\n```\n\n→ [40+ runnable notebooks in the cookbook](https://github.com/semantica-agi/semantica/tree/main/cookbook)\n\n\u003e [!TIP]\n\u003e New to Semantica? Start with the [cookbook notebooks](https://github.com/semantica-agi/semantica/tree/main/cookbook). They walk through each module end-to-end with real datasets before you write production code. Each notebook is self-contained and runnable in under 5 minutes.\n\n---\n\n## Recipes\n\nCopy-paste patterns for the most common use cases.\n\n### End-to-End GraphRAG Pipeline\n\n```python\nfrom semantica.ingest import FileIngestor\nfrom semantica.split import TextSplitter\nfrom semantica.semantic_extract import NamedEntityRecognizer, RelationExtractor\nfrom semantica.kg import GraphBuilder\nfrom semantica.vector_store import VectorStore, HybridSearch\nfrom semantica.context import AgentContext\n\n# 1. Ingest\ndocs = FileIngestor().ingest_directory(\"./docs/\", recursive=True)\n\n# 2. Entity-aware chunking - never splits an entity across a chunk boundary\nsplitter = TextSplitter(method=\"entity_aware\", chunk_size=1000)\nchunks   = [splitter.split(doc[\"text\"]) for doc in docs]\n\n# 3. Extract entities and relations\nner      = NamedEntityRecognizer(confidence_threshold=0.7)\nrel_ext  = RelationExtractor(confidence_threshold=0.6)\nentities = [ner.extract_entities(chunk) for chunk_group in chunks for chunk in chunk_group]\n\n# 4. Build KG\nkg = GraphBuilder(merge_entities=True, enable_temporal=True).build(docs)\n\n# 5. Hybrid retrieval\nvs  = VectorStore(backend=\"faiss\")\nctx = AgentContext(vector_store=vs, knowledge_graph=kg)\nctx.store(\"Alice approved the Acme renewal in Q1 2024\", conversation_id=\"c1\")\n\nresults = HybridSearch(vector_store=vs).search(\"who approved the renewal?\")\n```\n\n---\n\n### Audit Trail for a Regulated Decision\n\n```python\nfrom semantica.context import ContextGraph\nfrom semantica.provenance import ProvenanceManager\nfrom semantica.export import RDFExporter\n\ngraph = ContextGraph(advanced_analytics=True)\nprov  = ProvenanceManager(storage_path=\"./audit.db\")\n\n# Record the decision chain\nd1 = graph.record_decision(\n    category=\"loan_application\", scenario=\"A-7291, $85k income\",\n    reasoning=\"Income threshold met\", outcome=\"proceed\", confidence=0.88,\n)\nd2 = graph.record_decision(\n    category=\"loan_underwriting\", scenario=\"Underwriting A-7291\",\n    reasoning=\"Clean credit history\", outcome=\"approved\", confidence=0.94,\n)\ngraph.add_causal_relationship(d1, d2, relationship_type=\"triggers\")\n\n# Track provenance for every entity\nprov.track_entity(\"applicant_A7291\", source=\"loan_application_form.pdf\",\n                  metadata={\"page\": 1, \"extractor\": \"NamedEntityRecognizer\"})\n\n# Export W3C PROV-O for regulator submission\nkg = graph.export_graph()\nRDFExporter().export(kg, \"audit_trail.ttl\", format=\"turtle\")\n```\n\n---\n\n### AML Rules Engine\n\n```python\nfrom semantica.reasoning import ReteEngine, Rule, Fact, RuleType\n\nrete = ReteEngine()\nrete.build_network([\n    Rule(\n        rule_id=\"sanctions_check\",\n        name=\"Flag sanctioned-country transactions\",\n        conditions=[\n            {\"field\": \"amount\",  \"operator\": \"\u003e\",  \"value\": 10_000},\n            {\"field\": \"country\", \"operator\": \"in\", \"value\": [\"IR\", \"KP\", \"SY\", \"CU\"]},\n        ],\n        conclusion=\"flag_for_compliance_review\",\n        rule_type=RuleType.IMPLICATION,\n    ),\n])\nrete.add_fact(Fact(\"tx_99\", \"transaction\", [{\"amount\": 25_000, \"country\": \"IR\"}]))\nmatches = rete.match_patterns()\n# → [{\"rule\": \"sanctions_check\", \"matched_facts\": [\"tx_99\"],\n#     \"conclusion\": \"flag_for_compliance_review\"}]\n```\n\n---\n\n### Ontology-to-Knowledge-Graph in One Pass\n\n```python\nfrom semantica.ingest import FileIngestor\nfrom semantica.semantic_extract import NamedEntityRecognizer, RelationExtractor\nfrom semantica.kg import GraphBuilder\nfrom semantica.ontology import OntologyGenerator, OntologyValidator\nfrom semantica.export import RDFExporter\n\nsources   = FileIngestor().ingest_directory(\"./contracts/\")\nner       = NamedEntityRecognizer(confidence_threshold=0.7)\nentities  = ner.extract_entities_batch([s[\"text\"] for s in sources])\n\nkg  = GraphBuilder(merge_entities=True).build(sources)\ngen = OntologyGenerator(base_uri=\"https://myco.dev/ontology/\")\nont = gen.generate_ontology({\"entities\": entities[0], \"relationships\": []})\n\nreport = OntologyValidator().validate(ont)\nif report.conforms:\n    RDFExporter().export({\"entities\": entities[0]}, \"ontology.ttl\", format=\"turtle\")\n```\n\n---\n\n## Performance\n\nBenchmarks from v0.5.0 on a 118,000-node production graph:\n\n| Operation | Before | After | Improvement |\n| --- | --- | --- | --- |\n| Node search (118k nodes) | 24 ms | 0.004 ms | **6,000×** faster |\n| Embedding cache hit | cold load | revision-based cache | **10×** throughput |\n| Semantic deduplication | baseline | optimized candidate gen | **6.98×** faster |\n| Candidate generation | baseline | blocking strategy | **63.6%** faster |\n\n\u003e [!NOTE]\n\u003e Benchmarks are from v0.5.0 on a 118,000-node production graph (AMD EPYC, 64 GB RAM). Results vary by hardware, dataset topology, and backend selection. Run `semantica benchmark` to measure performance on your own data.\n\n---\n\n## CLI\n\nEvery capability is available from the terminal. The CLI ships with the package, no separate install required.\n\n```bash\npip install semantica\nsemantica        # startup dashboard\nsemantica --help # full grouped command reference\n```\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg\n  src=\"docs/assets/img/semantica-cli-demo.gif\"\n  alt=\"Semantica CLI startup dashboard, health checks, graph build, shell, and grouped commands\"\n  width=\"900\"\n/\u003e\n\n\u003c/div\u003e\n\nStart with `semantica`, verify with `doctor`, build a graph, and explore the command groups from one terminal.\n\n### Startup Dashboard\n\n```\n$ semantica\n\n   ███████╗███████╗███╗   ███╗ █████╗ ███╗   ██╗████████╗██╗ ██████╗  █████╗\n   ██╔════╝██╔════╝████╗ ████║██╔══██╗████╗  ██║╚══██╔══╝██║██╔════╝ ██╔══██╗\n   ███████╗█████╗  ██╔████╔██║███████║██╔██╗ ██║   ██║   ██║██║      ███████║\n   ╚════██║██╔══╝  ██║╚██╔╝██║██╔══██║██║╚██╗██║   ██║   ██║██║      ██╔══██║\n   ███████║███████╗██║ ╚═╝ ██║██║  ██║██║ ╚████║   ██║   ██║╚██████╗ ██║  ██║\n   ╚══════╝╚══════╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═╝\n\n╭─────────────────────────────────────────────────────────────────────────────╮\n│                                                                             │\n│    Knowledge Intelligence Platform  •  v0.5.0                              │\n│                                                                             │\n│    🕸️  Context Graphs      ⚡ Decision Intelligence      🔍 Provenance      │\n│    🧩 Knowledge Fusion    🧠 Reasoning Engine          📊 Explainability    │\n│                                                                             │\n╰─────────────────────────────────────────────────────────────────────────────╯\n\n  Graph Store     neo4j\n  Vector Store    faiss\n  Profile         default\n  Config          ~/.semantica/config.yaml\n\n  Run semantica --help for all commands  •  semantica shell for interactive mode\n```\n\n### Knowledge Graph Build\n\n```\n$ semantica kg build -s ./contracts/ -s ./reports/ --store neo4j\n\n  contracts/    ████████████████████  12/12  4.2s\n  reports/      ████████████████████   8/8   2.9s\n\n  Knowledge graph built    1,847 nodes   4,203 edges   7.1s\n```\n\n### `semantica doctor`: Health Check\n\n```\n$ semantica doctor\n\n  Python 3.11.9         pass\n  semantica 0.5.0       pass\n  neo4j backend         pass     neo4j://localhost:7687\n  faiss vector store    pass\n  LLM provider          warn     OPENAI_API_KEY not set\n  Config file           pass     ~/.semantica/config.yaml\n```\n\n**Command groups:** `ingest` · `parse` · `extract` · `kg` · `reason` · `decision` · `temporal` · `provenance` · `ontology` · `embed` · `deduplicate` · `validate` · `export` · `visualize` · `pipeline` · `server` · `explorer` · `mcp` · `doctor` · `shell` · `init` · `watch`\n\n→ [Full CLI reference](https://docs.getsemantica.ai/)\n\n---\n\n## Integrations\n\nNative plugin bundles for 8 editors · MCP server with 12 tools · 109-endpoint REST API · Agno first-class · All LLM providers already supported: OpenAI · Anthropic · Gemini · Mistral · Llama · Groq · Cohere · Azure · Bedrock · Ollama · DeepSeek · HuggingFace and more via LiteLLM\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth colspan=\"3\" align=\"left\"\u003eNative Plugin Bundle\u003c/th\u003e\n\u003cth colspan=\"5\" align=\"left\"\u003eMCP Server + Plugin\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://claude.com/product/claude-code\"\u003e\u003cimg src=\"https://github.com/anthropics.png?size=120\" alt=\"Claude Code\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eClaude Code\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e17 skills · 3 agents · hooks\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://cursor.com\"\u003e\u003cimg src=\"https://www.freelogovectors.net/wp-content/uploads/2025/06/cursor-logo-freelogovectors.net_.png\" alt=\"Cursor\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eCursor\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e17 skills · 3 agents\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/openai/codex\"\u003e\u003cimg src=\"https://github.com/openai.png?size=120\" alt=\"Codex CLI\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eCodex CLI\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e17 skills · 3 agents\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://windsurf.com\"\u003e\u003cimg src=\"https://exafunction.github.io/public/brand/windsurf-black-symbol.svg\" alt=\"Windsurf\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eWindsurf\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e\u003ca href=\"plugins/.windsurf-plugin/\"\u003eplugin\u003c/a\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/cline/cline\"\u003e\u003cimg src=\"https://github.com/cline.png?size=120\" alt=\"Cline\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eCline\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e\u003ca href=\"plugins/.cline-plugin/\"\u003eplugin\u003c/a\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/continuedev/continue\"\u003e\u003cimg src=\"https://github.com/continuedev.png?size=120\" alt=\"Continue\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eContinue\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e\u003ca href=\"plugins/.continue-plugin/\"\u003eplugin\u003c/a\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/microsoft/vscode\"\u003e\u003cimg src=\"https://github.com/microsoft.png?size=120\" alt=\"VS Code\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eVS Code\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003e\u003ca href=\"plugins/.vscode-plugin/\"\u003eplugin\u003c/a\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"integrations/openclaw/\"\u003e\u003cimg src=\"https://github.com/openclaw.png?size=120\" alt=\"OpenClaw\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eOpenClaw\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eMCP + \u003ca href=\"integrations/openclaw/\"\u003eplugin\u003c/a\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth colspan=\"1\" align=\"left\"\u003eMCP Server\u003c/th\u003e\n\u003cth colspan=\"7\" align=\"left\"\u003eREST API\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://claude.ai/download\"\u003e\u003cimg src=\"https://github.com/anthropics.png?size=120\" alt=\"Claude Desktop\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eClaude Desktop\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eMCP server\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/features/copilot\"\u003e\u003cimg src=\"https://github.com/github.png?size=120\" alt=\"GitHub Copilot\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eGitHub Copilot\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/RooCodeInc/Roo-Code\"\u003e\u003cimg src=\"https://github.com/RooCodeInc.png?size=120\" alt=\"Roo Code\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eRoo Code\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/block/goose\"\u003e\u003cimg src=\"https://github.com/block.png?size=120\" alt=\"Goose\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eGoose\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/Kilo-Org/kilocode\"\u003e\u003cimg src=\"https://github.com/Kilo-Org.png?size=120\" alt=\"Kilo Code\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eKilo Code\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/Aider-AI/aider\"\u003e\u003cimg src=\"https://github.com/Aider-AI.png?size=120\" alt=\"Aider\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eAider\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/aws/amazon-q-developer-cli\"\u003e\u003cimg src=\"https://github.com/aws.png?size=120\" alt=\"Amazon Q\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eAmazon Q\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://zed.dev\"\u003e\u003cimg src=\"https://github.com/zed-industries.png?size=120\" alt=\"Zed\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eZed\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Agentic Frameworks\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth colspan=\"8\" align=\"left\"\u003eNative Integration\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/agno-agi/agno\"\u003e\u003cimg src=\"https://github.com/agno-agi.png?size=120\" alt=\"Agno\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eAgno\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eFirst-class · \u003ccode\u003epip install semantica[agno]\u003c/code\u003e\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth colspan=\"8\" align=\"left\"\u003eAlready Supported via REST API \u0026amp; MCP\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/langchain-ai/langchain\"\u003e\u003cimg src=\"https://github.com/langchain-ai.png?size=120\" alt=\"LangChain\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eLangChain\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/langchain-ai/langgraph\"\u003e\u003cimg src=\"https://github.com/langchain-ai.png?size=120\" alt=\"LangGraph\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eLangGraph\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/crewAIInc/crewAI\"\u003e\u003cimg src=\"https://github.com/crewAIInc.png?size=120\" alt=\"CrewAI\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eCrewAI\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/run-llama/llama_index\"\u003e\u003cimg src=\"https://github.com/run-llama.png?size=120\" alt=\"LlamaIndex\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eLlamaIndex\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/microsoft/autogen\"\u003e\u003cimg src=\"https://github.com/microsoft.png?size=120\" alt=\"AutoGen\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eAutoGen\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/openai/openai-agents-python\"\u003e\u003cimg src=\"https://github.com/openai.png?size=120\" alt=\"OpenAI Agents SDK\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eOpenAI Agents\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/google/adk-python\"\u003e\u003cimg src=\"https://github.com/google.png?size=120\" alt=\"Google ADK\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eGoogle ADK\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eREST API · MCP\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth colspan=\"8\" align=\"left\"\u003eNative SDK Integration — Coming Soon\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/langchain-ai/langchain\"\u003e\u003cimg src=\"https://github.com/langchain-ai.png?size=120\" alt=\"LangChain\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eLangChain\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/crewAIInc/crewAI\"\u003e\u003cimg src=\"https://github.com/crewAIInc.png?size=120\" alt=\"CrewAI\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eCrewAI\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/run-llama/llama_index\"\u003e\u003cimg src=\"https://github.com/run-llama.png?size=120\" alt=\"LlamaIndex\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eLlamaIndex\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/microsoft/autogen\"\u003e\u003cimg src=\"https://github.com/microsoft.png?size=120\" alt=\"AutoGen\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eAutoGen\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/openai/openai-agents-python\"\u003e\u003cimg src=\"https://github.com/openai.png?size=120\" alt=\"OpenAI Agents SDK\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eOpenAI Agents\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\" width=\"12.5%\"\u003e\n\u003ca href=\"https://github.com/google/adk-python\"\u003e\u003cimg src=\"https://github.com/google.png?size=120\" alt=\"Google ADK\" width=\"48\" height=\"48\" /\u003e\u003c/a\u003e\u003cbr/\u003e\n\u003cstrong\u003eGoogle ADK\u003c/strong\u003e\u003cbr/\u003e\n\u003csub\u003eDedicated toolkit\u003c/sub\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n### MCP Server\n\nConnect any MCP-compatible client (Claude Desktop, Windsurf, Cline, VS Code) in 30 seconds:\n\n```bash\npython -m semantica.mcp_server\n# or via the installed entry point\nsemantica-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"semantica\": { \"command\": \"python\", \"args\": [\"-m\", \"semantica.mcp_server\"] }\n  }\n}\n```\n\n\u003e [!TIP]\n\u003e The fastest way to connect Claude Desktop, Windsurf, or Cline is `python -m semantica.mcp_server`. No extra configuration needed for local use; the server auto-discovers `~/.semantica/config.yaml`.\n\n**12 tools exposed over MCP:**\n\n| Tool | What it does |\n| --- | --- |\n| `extract_entities` | NER on any text |\n| `extract_relations` | Relation extraction |\n| `record_decision` | Persist a decision node |\n| `query_decisions` | Search decision history |\n| `find_precedents` | Semantic precedent lookup |\n| `get_causal_chain` | Full causal ancestry |\n| `add_entity` | Add a KG node |\n| `add_relationship` | Add a KG edge |\n| `run_reasoning` | Execute rule set |\n| `get_graph_analytics` | Centrality, communities |\n| `export_graph` | Export to RDF/JSON/Parquet |\n| `get_graph_summary` | Graph statistics |\n\n---\n\n### REST API\n\n```bash\n# Start the backend\npython -m semantica.server   # port 8000\n\n# Extract entities via REST\ncurl -X POST http://localhost:8000/api/extract/entities \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Apple CEO Tim Cook announced record earnings.\"}'\n\n# Record a decision\ncurl -X POST http://localhost:8000/api/decisions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"category\": \"vendor_selection\",\n    \"scenario\": \"Choose ML cloud provider\",\n    \"reasoning\": \"Best GPU availability and pricing\",\n    \"outcome\": \"selected_aws\",\n    \"confidence\": 0.91\n  }'\n\n# Query the knowledge graph\ncurl http://localhost:8000/api/graph/neighbors/acme_corp?hops=2\n```\n\n**109 endpoints** across: `extract` · `kg` · `decisions` · `reasoning` · `provenance` · `ontology` · `embeddings` · `search` · `export` · `pipeline` · `temporal` · `deduplication`\n\n---\n\n### Plugin Bundles\n\n**17 domain skills:** `extract` · `ingest` · `query` · `ontology` · `validate` · `deduplicate` · `embed` · `reason` · `decision` · `causal` · `temporal` · `provenance` · `policy` · `explain` · `export` · `change` · `visualize`\n\n**3 specialized agents:** `kg-assistant` · `decision-advisor` · `explainability`\n\nBundles for Claude Code, Cursor, Codex, Windsurf, Cline, Continue, VS Code, and OpenClaw in [`plugins/`](plugins/).\n\n---\n\n## Knowledge Explorer\n\nA 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.\n\n| Workspace | What you can do |\n| --- | --- |\n| **Knowledge Graph** | Live Sigma.js canvas with ForceAtlas2 layout, Ego Mode, semantic distance heatmap |\n| **Timeline** | Scrub through temporal events and watch the graph evolve |\n| **Decisions** | Browse the causal chain behind every recorded decision |\n| **Registry** | Live audit log of every graph mutation |\n| **Entity Resolution** | Review and merge duplicates |\n| **Ontology Hub** | SHACL Studio, visual editor, cross-ontology alignments, SKOS browser |\n| **Lineage** | W3C PROV-O provenance visualization for any entity |\n\nQuickest way to start (no Node.js required):\n\n```bash\npip install \"semantica[explorer]\"\nsemantica-explorer --graph my_graph.json\n# Dashboard opens at http://127.0.0.1:8000\n```\n\nFor contributor / dev-server setup, see the full local setup guide:\n\n→ **[explorer/README.md — Local Setup Guide](explorer/README.md)**\n\n---\n\n## Modules\n\n| Module | What it provides |\n| --- | --- |\n| `semantica.context` | Context graphs, agent memory, decision tracking, causal analysis, precedent search, policy engine |\n| `semantica.kg` | KG construction, graph algorithms, centrality, community detection, temporal queries, link prediction |\n| `semantica.semantic_extract` | NER · relation extraction · event detection · coreference · triplet generation |\n| `semantica.reasoning` | Forward chaining · Rete · deductive · abductive · SPARQL · Datalog with explainable output |\n| `semantica.vector_store` | FAISS · Pinecone · Weaviate · Qdrant · Milvus · PgVector · hybrid + filtered search |\n| `semantica.split` | GraphRAG chunking: entity-aware · relation-aware · graph-based · ontology-aware · hierarchical |\n| `semantica.provenance` | W3C PROV-O lineage · source tracking · revision history · audit log export |\n| `semantica.ontology` | OWL generation · SHACL shape generation \u0026 validation · SKOS vocabulary management |\n| `semantica.kg` *(temporal)* | Bi-temporal facts · Allen interval algebra · point-in-time snapshots · `TemporalNormalizer` · `TemporalGraphQuery` |\n| `semantica.deduplication` | Blocking · hybrid · semantic strategies · entity merging with provenance |\n| `semantica.conflicts` | Value/type/temporal conflict detection · credibility-weighted resolution · investigation guides |\n| `semantica.normalize` | Text · entity · date · number · encoding normalization · data cleaning |\n| `semantica.pipeline` | Pipeline DSL · parallel workers · validation · retry policies · progress tracking |\n| `semantica.export` | RDF (Turtle/JSON-LD/N-Triples) · Parquet · OWL · SHACL · GraphML · Cypher · ArangoDB AQL |\n| `semantica.ingest` | Files · web · public APIs · databases · Snowflake · MCP · email · Git repos · Parquet · streams |\n| `semantica.graph_store` | Neo4j · FalkorDB · Apache AGE · Amazon Neptune |\n| `semantica.visualization` | KG · ontology · embedding · temporal · community graph visualization |\n| [`explorer/`](explorer/) | React 19 + Sigma.js browser workbench |\n\n---\n\n## Features at a Glance\n\n| Capability | Highlights |\n| --- | --- |\n| **Context Graphs** | Queryable graph of entities, decisions, relationships; causal links; cross-graph navigation |\n| **Decision Intelligence** | `record_decision` · `trace_decision_chain` · `find_similar_decisions` · `analyze_decision_impact` · `check_decision_rules` |\n| **Temporal Intelligence** | Point-in-time snapshots · Allen interval algebra (13 relations) · `TemporalNormalizer` · bi-temporal provenance |\n| **Distance Intelligence** | N×N semantic distance matrices · ego-mode visualization · distance bands · 10× embedding cache |\n| **Semantic Extraction** | NER · relation extraction · event detection · triplet generation · coreference · **6.98×** faster dedup |\n| **Reasoning Engines** | Forward chaining · Rete · deductive · abductive · SPARQL · Datalog with explainable output |\n| **GraphRAG Chunking** | Entity-aware · relation-aware · graph-based · ontology-aware · community-detection chunking |\n| **Conflict Detection** | Value / type / relationship / temporal / logical conflicts · 5 resolution strategies |\n| **Provenance** | W3C PROV-O · every fact traced to source · audit log export JSON/CSV/RDF |\n| **Ontology Hub** | SHACL Studio · visual editor · cross-ontology alignments · 5-dimension health dashboard |\n| **Vector Store** | FAISS · Pinecone · Weaviate · Qdrant · Milvus · PgVector · hybrid + filtered search |\n| **Graph Databases** | Neo4j · FalkorDB · Apache AGE · AWS Neptune |\n| **LLM Providers** | **All already supported today:** OpenAI (GPT-4o, o1, o3) · Anthropic (Claude 4) · 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 |\n\n---\n\n## What's New in v0.5.0\n\n- **Distance Intelligence:** 10× embedding cache, N×N semantic distance matrix, Ego Mode explorer, 5 new API endpoints\n- **Complete Ontology Hub:** SHACL Studio, visual drag-and-drop editor, cross-ontology alignments, 5-dimension health dashboard, 16 new endpoints\n- **Modern CLI:** Startup dashboard, `semantica doctor`, `semantica init`, `semantica watch`, `semantica shell`, progress bars, structured error cards\n- **Security:** 12 vulnerabilities fixed (eval injection, pickle, SQL injection, XXE, SSRF, prompt injection, ReDoS, path traversal)\n- **6,000× search speedup:** O(log n) inverted index; 118k-node graphs: 24ms → 0.004ms\n\n→ [Full release notes](RELEASE_NOTES.md) · [Changelog](CHANGELOG.md)\n\n---\n\n## Built for High-Stakes Domains\n\nSemantica is designed for environments where AI outputs must be explainable, auditable, and defensible.\n\n- **Healthcare:** Clinical decision support, drug interaction graphs, and patient safety audit trails\n- **Finance:** Fraud detection, AML compliance, regulatory risk knowledge graphs, and loan decision audit trails\n- **Legal:** Evidence-backed research, contract analysis, case law reasoning, and privilege tracking\n- **Cybersecurity:** Threat attribution, incident response timelines, and IOC provenance tracking\n- **Government:** Policy decision records, classified information governance, and regulatory reporting\n- **Autonomous Systems:** Decision logs, safety validation, and explainable AI for certification\n\n---\n\n## Installation\n\n```bash\npip install semantica           # core\npip install semantica[all]      # everything\n```\n\n```bash\npip install semantica[agno]                 # Agno multi-agent integration\npip install semantica[llm-litellm]          # OpenAI, Anthropic, Gemini, Mistral, Llama, Groq, Cohere, Bedrock, Ollama, DeepSeek, and more\npip install semantica[graph-neo4j]          # Neo4j graph store\npip install semantica[vectorstore-qdrant]   # Qdrant vector store\npip install semantica[vectorstore-pinecone] # Pinecone vector store\npip install semantica[db-snowflake]         # Snowflake\npip install semantica[ingest-parquet]       # Parquet / PyArrow\npip install semantica[viz]                  # HTML interactive visualization\npip install semantica[watch]                # Directory file watcher\n```\n\n\u003e [!IMPORTANT]\n\u003e For production deployments, use Docker or Kubernetes rather than a local `pip install`. Set `SEMANTICA_SECRET_KEY`, configure a persistent graph store (Neo4j / FalkorDB), and point the vector store at a hosted backend (Qdrant / Pinecone). See [ARCHITECTURE.md](ARCHITECTURE.md) for the full deployment topology.\n\n```bash\n# From source\ngit clone https://github.com/semantica-agi/semantica.git\ncd semantica \u0026\u0026 pip install -e \".[dev]\" \u0026\u0026 pytest tests/\n```\n\n---\n\n## Enterprise\n\nOn-premises deployment · Private cloud · Custom domain implementations · SLA-backed support · Professional services for regulated industries (healthcare, finance, legal, government).\n\n**[getsemantica.ai](https://getsemantica.ai/)** for enterprise solutions and pricing.\n\n---\n\n## Community \u0026 Support\n\n| | |\n| --- | --- |\n| **Discord** | [discord.gg/sV34vps5hH](https://discord.gg/sV34vps5hH): real-time help, showcases, and announcements |\n| **GitHub Discussions** | [Q\u0026A and feature requests](https://github.com/semantica-agi/semantica/discussions) |\n| **GitHub Issues** | [Bug reports](https://github.com/semantica-agi/semantica/issues) |\n| **Documentation** | [docs.getsemantica.ai](https://docs.getsemantica.ai/) |\n| **Cookbook** | [40+ runnable Jupyter notebooks](https://github.com/semantica-agi/semantica/tree/main/cookbook) |\n| **Changelog** | [CHANGELOG.md](CHANGELOG.md) · [Release Notes](RELEASE_NOTES.md) |\n\n---\n\n## Star History\n\n\u003ca href=\"https://www.star-history.com/?repos=semantica-agi%2Fsemantica\u0026type=date\u0026legend=top-left\"\u003e\n \u003cpicture\u003e\n   \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=semantica-agi/semantica\u0026type=date\u0026theme=dark\u0026legend=top-left\" /\u003e\n   \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=semantica-agi/semantica\u0026type=date\u0026legend=top-left\" /\u003e\n   \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=semantica-agi/semantica\u0026type=date\u0026legend=top-left\" /\u003e\n \u003c/picture\u003e\n\u003c/a\u003e\n\n---\n\n## Contributors\n\n\u003cdiv align=\"center\"\u003e\n\n[![Contributors](https://contrib.rocks/image?repo=semantica-agi/semantica\u0026max=500)](https://github.com/semantica-agi/semantica/graphs/contributors)\n\n\u003c/div\u003e\n\n---\n\n## Contributing\n\nAll contributions are welcome: bug fixes, features, tests, and documentation.\n\n1. Fork the repo and create a branch\n2. `pip install -e \".[dev]\"`\n3. Write tests alongside your changes (`pytest tests/`)\n4. Open a PR and tag `@KaifAhmad1` for review\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMIT License · Built by [Semantica](https://github.com/semantica-agi)\n\n[GitHub](https://github.com/semantica-agi/semantica) \u0026nbsp;·\u0026nbsp;\n[Discord](https://discord.gg/sV34vps5hH) \u0026nbsp;·\u0026nbsp;\n[Twitter/X](https://x.com/BuildSemantica) \u0026nbsp;·\u0026nbsp;\n[Website](https://getsemantica.ai/) \u0026nbsp;·\u0026nbsp;\n[Docs](https://docs.getsemantica.ai/) \u0026nbsp;·\u0026nbsp;\n[PyPI](https://pypi.org/project/semantica/)\n\nIf this project helps you build better AI, a star means a lot.\n\n**[⭐ Star on GitHub →](https://github.com/semantica-agi/semantica)**\n\n[English](https://readme-i18n.com/semantica-agi/semantica?lang=en) · [Deutsch](https://readme-i18n.com/semantica-agi/semantica?lang=de) · [Français](https://readme-i18n.com/semantica-agi/semantica?lang=fr) · [Español](https://readme-i18n.com/semantica-agi/semantica?lang=es) · [Italiano](https://readme-i18n.com/semantica-agi/semantica?lang=it) · [Português](https://readme-i18n.com/semantica-agi/semantica?lang=pt) · [العربية](https://readme-i18n.com/semantica-agi/semantica?lang=ar) · [اردو](https://readme-i18n.com/semantica-agi/semantica?lang=ur) · [हिन्दी](https://readme-i18n.com/semantica-agi/semantica?lang=hi) · [中文](https://readme-i18n.com/semantica-agi/semantica?lang=zh) · [日本語](https://readme-i18n.com/semantica-agi/semantica?lang=ja) · [한국어](https://readme-i18n.com/semantica-agi/semantica?lang=ko)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantica-agi%2Fsemantica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemantica-agi%2Fsemantica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemantica-agi%2Fsemantica/lists"}