How to Install Semantica AGI: Complete Setup Guide for Python Knowledge Graphs
Install Semantica AGI with pip install semantica, add optional extras for your vector store or graph database, and verify with semantica doctor.
Semantica AGI is a Python-based, graph-native platform that adds a deterministic, auditable knowledge layer on top of any LLM or vector store. According to the semantica-agi/semantica source code, installation gives you the core library plus optional extras for specialized back-ends like Faiss, Qdrant, Neo4j, and integrations such as LangChain and Agno.
Prerequisites for Installing Semantica AGI
Before you install Semantica AGI, ensure your environment meets these requirements:
- Python 3.8+ — tested on Python 3.8 through 3.12
- Supported operating systems — Linux, macOS, or Windows
All dependencies are declared in pyproject.toml at the repository root, which defines the package metadata, required dependencies, and optional extras.
Base Installation of Semantica AGI
The core package is approximately 6 MB and contains all essential modules: ingest, split, semantic extraction, knowledge graph construction, reasoning, provenance, export, visualization, CLI, and MCP server.
Install from PyPI:
pip install semantica
This pulls the package and resolves required dependencies such as python-dateutil and langdetect. The official PyPI badge and link appear in the repository's README.md.
Optional Extras for Semantica AGI Installation
Install only the back-ends you need to keep your environment lightweight. Full extra-module lists are documented in docs/reference/vector_store.md and related documentation.
Vector Store Back-Ends
| Back-End | Install Command |
|---|---|
| Faiss (CPU) | pip install "semantica[vectorstore-faiss]" |
| Qdrant | pip install "semantica[qdrant]" |
| pgVector (PostgreSQL) | pip install "semantica[pgvector]" |
Graph Stores
| Store | Install Command |
|---|---|
| Neo4j | pip install "semantica[graphstore-neo4j]" |
| Amazon Neptune (via Apache AGE) | pip install "semantica[graphstore-neptune]" |
Integrations
| Integration | Install Command |
|---|---|
| LangChain | pip install "semantica[langchain]" |
| Agno (multi-agent shared context) | pip install "semantica[agno]" |
| OpenCLaw (REST tooling) | pip install "semantica[openclaw]" |
Verify Your Semantica AGI Installation
After installation, run the built-in health-check command (completes in under 5 seconds):
semantica doctor
Successful output confirms that all required runtime dependencies are present and that the Python import succeeds. This CLI is implemented in semantica/cli.py.
Development Installation of Semantica AGI
For contributors who want to run notebooks or build the optional UI, clone the repository and install in editable mode:
git clone https://github.com/semantica-agi/semantica.git
cd semantica
pip install -e .
This makes the semantica command point to your local source tree. The top-level API is exposed in semantica/__init__.py, including ContextGraph, VectorStore, and related classes.
First Steps After Installing Semantica AGI
Once installed, you can immediately start building context graphs. The following examples come directly from the README's Quick Start and Decision Intelligence sections.
Create a Context Graph and Record a Decision
from semantica.context import ContextGraph
graph = ContextGraph(advanced_analytics=True)
decision_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,
)
print("Decision recorded:", decision_id)
The ContextGraph class in semantica/context.py implements the central component for decision recording and querying.
Query Decision Lineage and Find Similar Decisions
# Trace the causal chain
chain = graph.trace_decision_chain(decision_id)
print("Causal chain:", chain)
# Find precedent decisions via semantic similarity
similar = graph.find_similar_decisions(
query="cloud provider selection for regulated data",
max_results=5,
)
print("Similar decisions:", similar)
Export Knowledge Graph to RDF/Turtle
from semantica.export import RDFExporter
kg = graph.to_kg_dict()
RDFExporter().export(kg, "kg_export.ttl", format="turtle")
print("Exported KG to kg_export.ttl")
The RDFExporter class is defined in semantica/export/rdf_exporter.py and handles RDF/Turtle/JSON-LD export formats. For visualization, semantica/visualization/kg_visualizer.py renders interactive force-directed graphs used by the Knowledge Explorer.
Architecture Overview
Semantica AGI's full end-to-end pipeline transforms raw data into a Context Graph — a structured, queryable knowledge graph enriched with ontology, reasoning, provenance, and decision intelligence. The pipeline flow, documented in ARCHITECTURE.md, proceeds through these stages:
Sources → Ingest → Parse → Normalize → Split → Extract → Conflict Detection → Deduplication → Knowledge Graph → Intelligence Layer → Storage → Outputs
This architecture enables deterministic, auditable knowledge layers on top of any LLM or vector store.
Summary
- Base install:
pip install semantica— 6 MB core with all essential modules - Verify setup:
semantica doctor— health check in under 5 seconds - Add extras: Install only the vector stores, graph databases, and integrations you need
- Development: Use
pip install -e .for editable installation from source - Start building: Import
ContextGraphfromsemantica.contextand begin recording decisions
Frequently Asked Questions
What Python versions are supported for Semantica AGI installation?
Semantica AGI supports Python 3.8 through 3.12. The pyproject.toml specifies these version constraints, and the package is tested across all listed versions on Linux, macOS, and Windows.
How do I install Semantica AGI with Neo4j support?
Run pip install "semantica[graphstore-neo4j]" to add Neo4j as your graph store back-end. This extra pulls the necessary client libraries while keeping your base installation lightweight.
What does semantica doctor check during verification?
The semantica doctor command, implemented in semantica/cli.py, verifies that all required runtime dependencies are present and that the Python import succeeds. It completes in under 5 seconds and reports any missing components.
Can I use Semantica AGI without installing optional extras?
Yes. The base pip install semantica includes all core functionality: ingest, split, semantic extraction, knowledge graph construction, reasoning, provenance, export, visualization, CLI, and MCP server. Optional extras are only needed for specific back-ends or third-party integrations.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →