ak-dev-new-knowledgebase-integration

ak-dev-new-knowledgebase-integration is a skill for Claude Code, Codex from yaalalabs/agent-kernel. It costs 49 tokens per session (1,476 once invoked), scanned A, original, Apache-2.0.

A step-by-step guide for connecting a new storage system to Agent Kernel's knowledge-base interface.

In plain words
What is it for?
Use it when adding a backend such as a vector store, graph database, or SQL-accessible system that is not already integrated.
Why use it?
It explains the code changes, existing interfaces, and setup requirements needed to make an unsupported backend usable.

Skill for Claude CodeCodex

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 skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration
Any agent
npx skills add yaalalabs/agent-kernel --skill ak-dev-new-knowledgebase-integration
Clone the repo
git clone --depth 1 https://github.com/yaalalabs/agent-kernel

Made for: Claude Code, Codex.

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 ak-dev-new-knowledgebase-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration.svg)](https://agentmods.dev/skills/yaalalabs/agent-kernel/ak-dev-new-knowledgebase-integration)
Your own site
<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>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,476 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.00049 $0.01476
Opus 5 $0.00024 $0.00738
Sonnet 5 $0.00010 $0.00295
Haiku 4.5 $0.00005 $0.00148

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

Security

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.

.agents/skills/ak-dev-new-knowledgebase-integration/SKILL.md · 185 lines

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.py
    • ak-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}"

Read the full file on GitHub · 185 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 · 185 lines · 49 tokens per session scan A 0e95836b5cc6

Subscribe to this mod's changes

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.