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 agentmods add skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integrationnpx skills add yaalalabs/agent-kernel --skill ak-dev-new-knowledgebase-integrationgit clone --depth 1 https://github.com/yaalalabs/agent-kernelWrote 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/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration)<a href="https://agentmods.dev/skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration"><img src="https://agentmods.dev/badge/skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00049 | $0.01476 |
| Opus 5 | $0.00024 | $0.00738 |
| Sonnet 5 | $0.00010 | $0.00295 |
| Haiku 4.5 | $0.00005 | $0.00148 |
Grade A, and why
ak-dev-new-knowledgebase-integration 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.
How it starts
The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Adding a New Knowledge Base Integration
Use this skill to add a new knowledge base backend under ak-py/src/agentkernel/knowledgebase/.
This applies when you are integrating any durable source not already covered by:
ChromaManager(semantic vector search)Neo4jManager(graph relationships)StarburstManager(read-only SQL via Trino)
Prerequisites
- Understand architecture and contribution patterns from
.agents/skills/ak-dev-architecture/SKILL.md - Understand existing knowledge base APIs:
ak-py/src/agentkernel/knowledgebase/base.pyak-py/src/agentkernel/knowledgebase/knowledgebuilder.py
- Have provider credentials and a local/dev test instance for the target backend
Step-by-Step
1. Create Backend Module
Create a new file:
ak-py/src/agentkernel/knowledgebase/<backend>.py
Use lowercase file names (for example qdrant.py, milvus.py, elasticsearch.py).
2. Subclass KnowledgeBase
Implement a concrete class that extends KnowledgeBase:
from typing import Any, Iterable, List, Mapping
from .base import KnowledgeBase, Record
class MyBackendManager(KnowledgeBase):
def __init__(self, name: str = "", description: str | None = None, **kwargs):
super().__init__()
self.name = name
self.description = description or "my backend"
self._client = None
self.connect(**kwargs)
@property
def backend_name(self) -> str:
return self.name if self.name else "mybackend"
def connect(self, **kwargs) -> None:
# Initialize backend client and verify connectivity.
self._client = ...
def write(self, records: Iterable[Record], **kwargs) -> None:
for record in records:
text = str(record.get("text", "")).strip()
metadata = dict(record.get("metadata", {}))
if not text:
continue
# Persist text + metadata using backend-native API.
self._client.store(text=text, metadata=metadata)
def read(self, query: str, limit: int = 3, **kwargs) -> List[Mapping[str, Any]]:
rows = self._client.search(query=query, limit=limit)
return [{"text": row["text"], "metadata": row.get("metadata", {})} for row in rows]
def get_description(self) -> str:
return f"{self.backend_name}: {self.description}"
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.
- 4d ago First seen · 185 lines · 49 tokens per session scan A 0e95836b5cc6
ak-dev-new-knowledgebase-integration is a skill published in the GitHub repository yaalalabs/agent-kernel (166 stars, last pushed today), licensed Apache-2.0. It adds 49 tokens to every session and 1,476 once invoked, about $0.0002 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.
Other skills, from other repositories
context-manager
Context management skill providing discovery, fetching, harvesting, extraction, compression, organization, cleanup, and guided workflows for project context.
codebase-knowledge-graph
Query the codebase knowledge graph for structural code understanding. Provides functions, classes, routes, callers, and dependency analysis.
Container Rightsizer
Rightsizes container CPU and memory requests and limits using real usage data. Reduces requested resources without hitting OOMKills or CPU throttling.
Serverless Cost Profiler
Profiles Lambda, Cloud Functions, and Azure Functions for cost efficiency -- memory sizing, cold start impact, runtime selection, and when serverless is the wrong answer.
prowler-test-mcp
Testing patterns for the Prowler MCP Server: in-memory FastMCP clients, the ProwlerAPIClient singleton, JSON:API model builders and mocked httpx transports. Trigger: When writing tests under mcpserver/tests/ (tools, models, apiclient, auth, sub-servers).
mistake-reflection
Use when you discover you made a mistake — caught by the user, by a tool result, by your own re-reading, or by a failed check. Appends a structured entry to docs/ai/ailearnings.md and re-reads recent entries to avoid repeats.