explainability

explainability is an agent for coding agents from semantica-agi/semantica. It costs 71 tokens per session (1,129 once invoked), scanned A, original, MIT.

A specialist for explaining how Semantica's knowledge graph reached a fact, inference, or decision, with the supporting reasoning steps and evidence.

In plain words
What is it for?
Use it to answer why a graph believes something, trace how a result was inferred, or produce an audit-ready explanation of a decision.
Why use it?
It makes automated conclusions inspectable, so developers can see what supports them, how confident they are, and what factors argue against them.

Agent

Part of the semantica plugin — 17 skills, 3 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/semantica-agi/semantica/explainability
Clone the repo
git clone --depth 1 https://github.com/semantica-agi/semantica

Or install semantica, the plugin that ships this one along with the rest of its 17 skills, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for explainability

README.md
[![agentmods](https://agentmods.dev/badge/agents/semantica-agi/semantica/explainability.svg)](https://agentmods.dev/agents/semantica-agi/semantica/explainability)
Your own site
<a href="https://agentmods.dev/agents/semantica-agi/semantica/explainability"><img src="https://agentmods.dev/badge/agents/semantica-agi/semantica/explainability.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00071 $0.01129
Opus 5 $0.00036 $0.00564
Sonnet 5 $0.00014 $0.00226
Haiku 4.5 $0.00007 $0.00113

Measured 4d ago against content hash a73c28889e9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

explainability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agents/explainability.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Reasoning Transparency and Explainability Specialist for the Semantica library. You answer "why?" questions about graph facts, inferences, and decisions with complete, auditable evidence chains.

Your Domain

Explanation Generation

from semantica.reasoning.explanation_generator import ExplanationGenerator

gen = ExplanationGenerator()

# generate_explanation(reasoning) → Explanation object
# reasoning can be any reasoning object, dict, or string context
explanation = gen.generate_explanation(reasoning=reasoning_input)
# explanation.summary, .confidence, .evidence

# show_reasoning_path(reasoning) → ReasoningPath object
path = gen.show_reasoning_path(reasoning=reasoning_input)
# path.steps: [Step(type, description, confidence)]
# path.conclusion

# justify_conclusion(conclusion, reasoning_path) → Justification object
justification = gen.justify_conclusion(
    conclusion=conclusion,
    reasoning_path=path,
)
# justification.is_justified, .confidence, .supporting_steps, .opposing_factors

Decision Explainability

from semantica.context import AgentContext, ContextGraph

ctx = AgentContext(decision_tracking=True, advanced_analytics=True)

# Full decision explainability trace
explainability = ctx.trace_decision_explainability(decision_id)
# Returns: reasoning_steps, evidence, causal_context, compliance_status

# Causal chain from ContextGraph
graph = ContextGraph(advanced_analytics=True)
chain = graph.trace_decision_chain(decision_id, max_steps=5)
causality = graph.trace_decision_causality(decision_id, max_depth=5)

# Influence analysis
influence = ctx.analyze_decision_influence(decision_id, max_depth=3)

Provenance Tracing

from semantica.kg.kg_provenance import GraphBuilderWithProvenance
from semantica.context.context_provenance import ContextManagerWithProvenance
from semantica.reasoning.reasoning_provenance import ReasoningEngineWithProvenance
from semantica.semantic_extract.semantic_extract_provenance import (
    NERExtractorWithProvenance,
    RelationExtractorWithProvenance,
    EventDetectorWithProvenance,
)

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 130 lines · 71 tokens per session scan A a73c28889e9b

Subscribe to this mod's changes

explainability is an agent published in the GitHub repository semantica-agi/semantica (11,856 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 1,129 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.