npcpy is a Python library for building applications with multimodal language models, agent-based AI, and knowledge graphs. Researchers and developers use it with local or cloud model providers to create agents, multi-agent teams, and AI workflows.
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.
npx skills add NPC-Worldwide/npcpy --skill knowledge_store_skillgit clone --depth 1 https://github.com/NPC-Worldwide/npcpyWrote 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.
[](https://agentmods.dev/skills/npc-worldwide/npcpy/knowledge_store_skill)<a href="https://agentmods.dev/skills/npc-worldwide/npcpy/knowledge_store_skill"><img src="https://agentmods.dev/badge/skills/npc-worldwide/npcpy/knowledge_store_skill/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.
<a href="https://agentmods.dev/skills/npc-worldwide/npcpy/knowledge_store_skill"><img src="https://agentmods.dev/badge/skills/npc-worldwide/npcpy/knowledge_store_skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00346 | $0.00943 |
| Opus 5.5 | $0.00138 | $0.00377 |
| Sonnet 5.5 | $0.00069 | $0.00189 |
| Haiku 4.5 | $0.00035 | $0.00094 |
Grade A, and why
knowledge_store_skill 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
knowledge_store_skill
Skill for working with local .knowledge.yaml files via KnowledgeStore. Use this when you need to recall, search, or manage directory-local memories and knowledge links stored in plain YAML alongside the user's project files.
KnowledgeStore is directory-scoped. Each directory that contains a .knowledge.yaml file maintains its own append-only memory graph. There is no global database — the YAML IS the source of truth.
Key operations: - Load a directory's store: npcpy.memory.knowledge_store.get_store_for_path(path) - Append a memory: store.append_memory(initial_memory="...", status="pending_approval", ...) - Update a memory (approve/reject/edit): store.update_memory(mem_id, status, final_memory) - Search memories (keyword substring): store.search_memories("query", limit=20) - Get approved context for LLM prompts: store.build_context(max_memories=10) - Get links for a memory: store.get_links_for_memory(mem_id) - Create a link between memories: store.append_link(from_mem, to_mem, relation="refines", agent="your_name") - Aggregate across a tree: KnowledgeStore.aggregate(root_directory, max_depth=3)
Memory statuses: - pending_approval — raw extraction, needs human review - human-approved — confirmed and available for context injection - human-rejected — discard, can be used as negative examples - human-edited — corrected version supersedes initial_memory
When answering questions, prefer build_context() for recently approved local knowledge, and search_memories() for targeted recall. Always respect human-rejected memories — do not repeat them.
Inputs
name(default:'action')description(default:'load | search | append | update | link | context | aggregate')name(default:'directory_path')description(default:'Absolute path of the directory containing .knowledge.yaml')name(default:'query_or_memory')description(default:'Search query, memory text, or JSON params depending on action')
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 51 lines · 346 tokens per session scan A 92c06b063f8c
knowledge_store_skill is a skill published in the GitHub repository NPC-Worldwide/npcpy (1,536 stars, last pushed yesterday), licensed MIT. It adds 346 tokens to every session and 943 once invoked, about $0.0014 per session on Opus 5.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.
knowledge_store_skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge_store_skillNPC-Worldwide/npcpy | Skill | 1.5k | yesterday | MIT | A | 346 | Claude Code, Codex |
| langchain-orchestrationmanutej/luxor-claude-marketplace | Skill | 64 | 5mo ago | none | A | 35 | Claude Code |
| memory-triagemem0ai/mem0 | Skill | 70k | today | Apache-2.0 | A | 58 | Claude Code |
| mem0-vercel-ai-sdkmem0ai/mem0 | Skill | 70k | today | Apache-2.0 | A | 146 | Claude Code, Codex |
| mem0-climem0ai/mem0 | Skill | 70k | today | Apache-2.0 | A | 177 | Claude Code, Codex |
| mempalace-recallMemPalace/mempalace | Skill | 61k | today | MIT | A | 94 | Claude Code |
| mempalace-taskMemPalace/mempalace | Skill | 61k | today | MIT | A | 67 | Claude Code |