Three drop-in components that bring Semantica’s knowledge graph and decision intelligence into any CrewAI crew.
Installation
crewai >= 0.80.0. If crewai is not installed, the integration still imports — every class carries the full Semantica API and degrades gracefully, but cannot be passed to a Crew.
Components at a Glance
- SemanticaKGTool —
Agent(tools=[…]): 5 KG construction/query actions: extract entities, extract relations, add to graph, query graph, find related. - SemanticaDecisionTool —
Agent(tools=[…]): 5 decision intelligence actions: record decisions, find precedents, trace causal chains, analyze impact, check policies. - SemanticaKnowledgeSource —
Crew(knowledge_sources=[…]): Serializes aContextGraphinto CrewAI knowledge storage so every agent gets retrieval access to the graph.
Component Details
- SemanticaKGTool
- SemanticaDecisionTool
- SemanticaKnowledgeSource
Lets agents actively build and query a shared
ContextGraph mid-reasoning.All actions return JSON so agents get parseable results.Sharing a graph: the tool reads/writes whatever
graph you pass in. When no graph is given, a fresh in-memory ContextGraph() is created (and a warning is logged) — two tool instances that each auto-create their own graph do not share knowledge. Pass the same ContextGraph to every agent that must share state.Checkpoints & Serialization
CrewAI serializes tools and knowledge sources to JSON for checkpointing/resume. Live Semantica state (ContextGraph, AgentContext, extractors) is excluded from that serialization — a restored tool/source comes back with a fresh in-memory ContextGraph and logs a warning. Until you re-attach the live graph/context, the restored objects answer queries against an empty graph, so re-wire them after resuming (e.g. restored_tool.graph = live_graph) before agents continue.
API Reference
crewai installed: they carry the full Semantica API and degrade gracefully.
See Also
- Context Module — AgentContext and ContextGraph backing the integration.
- Semantic Extraction — NERExtractor / RelationExtractor used by SemanticaKGTool.
- LLMs — Configure LLM providers for your crew’s agents.
- Vector Store — Vector backend used by SemanticaDecisionTool.
