kg-assistant

kg-assistant is an agent for Claude Code from semantica-agi/semantica. It costs 57 tokens per session (1,929 once invoked), scanned A, original, MIT.

A general assistant for Semantica, a Python library for storing and querying knowledge graphs. A knowledge graph represents information as connected things and relationships, while decision intelligence uses those connections to examine past and current decisions.

In plain words
What is it for?
Use it to store and retrieve context, record and query decisions, find similar past decisions, inspect causes and influences, apply decision rules, and run multi-step graph queries.
Why use it?
It provides one place to ask broad questions or handle work that crosses several Semantica modules. It knows the library's APIs, graph conventions, and current schema.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Use it to store and retrieve context, record and query decisions, find similar past decisions, inspect causes and influences, apply decision rules, and run multi-step graph queries.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/semantica-agi/semantica/kg-assistant
About the project

Semantica is an open-source infrastructure layer that turns enterprise data into structured context and knowledge graphs, where ontologies define meaning and graph reasoning connects facts and decisions. It is intended for AI systems and agents that need traceable, governed, and explainable context in high-stakes domains. The catalogue add-ons provide agent workflows, hooks, and plugins for operating Semantica.

semantica-agi/semantica · 12,474 stars · on GitHub · getsemantica.ai

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.

Clone the repo
git clone --depth 1 https://github.com/semantica-agi/semantica

Made for: Claude Code.

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 kg-assistant

README.md
[![agentmods](https://agentmods.dev/badge/agents/semantica-agi/semantica/kg-assistant/github.svg)](https://agentmods.dev/agents/semantica-agi/semantica/kg-assistant)
Your own site
<a href="https://agentmods.dev/agents/semantica-agi/semantica/kg-assistant"><img src="https://agentmods.dev/badge/agents/semantica-agi/semantica/kg-assistant/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kg-assistant

Your own site · 80×15
<a href="https://agentmods.dev/agents/semantica-agi/semantica/kg-assistant"><img src="https://agentmods.dev/badge/agents/semantica-agi/semantica/kg-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 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,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00057 $0.01929
Opus 5 $0.00028 $0.00964
Sonnet 5 $0.00011 $0.00386
Haiku 4.5 $0.00006 $0.00193

Measured 10d ago against content hash 58eb65f05180, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

kg-assistant 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 10d 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/kg-assistant.md · 74 lines

How it starts

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

You are a knowledge graph expert assistant for the Semantica library — a full-stack Python library for knowledge graphs, semantic extraction, decision intelligence, reasoning, and context management.

Module Overview

Decision Intelligence (semantica.context)

  • AgentContext — high-level interface: store(), retrieve(), record_decision(), query_decisions(), find_precedents(), find_precedents_advanced(), analyze_decision_influence(), predict_decision_relationships(), trace_decision_explainability(), get_context_insights(), multi_hop_context_query(), expand_query(), query_with_reasoning(), get_causal_chain(), capture_cross_system_inputs(), get_policy_engine()
  • ContextGraph — in-memory graph: add_node(), add_edge(), record_decision(), find_precedents_by_scenario(), find_similar_decisions(), analyze_decision_influence(), analyze_decision_impact(), get_causal_chain(), trace_decision_causality(), trace_decision_chain(), enforce_decision_policy(), check_decision_rules(), get_decision_insights(), get_decision_summary(), analyze_graph_with_kg(), get_node_centrality(), get_node_importance(), state_at(), query()
  • DecisionQueryfind_by_category(), find_by_entity(), find_by_time_range(), find_precedents_hybrid(), find_similar_exceptions(), multi_hop_reasoning(), predict_decision_relationships(), analyze_decision_influence(), trace_decision_path()
  • CausalChainAnalyzerget_causal_chain(decision_id, direction, max_depth), find_root_causes(), get_influenced_decisions(), get_causal_impact_score(), get_precedent_chain(), analyze_causal_network(), find_causal_loops(), trace_at_time(event_id, at_time, direction, max_depth)
  • PolicyEngineadd_policy(), check_compliance(), get_applicable_policies(), update_policy(), record_exception(), analyze_policy_impact(), get_affected_decisions(), get_policy_history()
  • DecisionRecorderrecord_decision(), link_entities(), link_precedents(), apply_policies(), record_exception(), capture_cross_system_context(), record_approval_chain()

Read the full file on GitHub · 74 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. 10d ago First seen · 74 lines · 57 tokens per session scan A 58eb65f05180

Subscribe to this mod's changes

kg-assistant is an agent published in the GitHub repository semantica-agi/semantica (12,474 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 1,929 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

prompt-manager

Agent for managing AI prompts on prompts.chat - search, save, improve, and organize your prompt library.

f/prompts.chat · 24 tokens

prompt-pipeline-runner

Executes the six-stage prompt-writer pipeline and produces two mandatory output artifacts (ready-to-run prompt, confidence report).

rp1-run/rp1 · 30 tokens

arckit-datascout

Use this agent when the user needs to discover external data sources — APIs, datasets, open data portals, and commercial data providers — to fulfil project requirements. This agent performs extensive web research to find real, current data sources. Examples: Context: User has a project with requirements and wants to…

tractorjuice/arc-kit · 398 tokens

Demosthenes

Prompt engineer. Designs, evaluates, and optimizes prompts for LLMs — system prompts, few-shot templates, chain-of-thought patterns, and production prompt systems. Use when building a new agent, tuning an existing system prompt, evaluating prompt quality, or debugging inconsistent LLM output. Reports honesty ledger on…

wrg32786/aigent-os · 69 tokens

gsd-ai-researcher

Researches a chosen AI framework's official docs to produce implementation-ready guidance — best practices, syntax, core patterns, and pitfalls distilled for the specific use case. Writes the Framework Quick Reference and Implementation Guidance sections of AI-SPEC.md. Spawned by /gsd:ai-integration-phase orchestrator.

gsd-build/get-shit-done · 68 tokens

gsd-eval-auditor

Retroactive audit of an implemented AI phase's evaluation coverage. Checks implementation against the AI-SPEC.md evaluation plan. Scores each eval dimension as COVERED/PARTIAL/MISSING. Produces a scored EVAL-REVIEW.md with findings, gaps, and remediation guidance. Spawned by /gsd:eval-review orchestrator.

gsd-build/get-shit-done · 75 tokens