kdbai

kdbai is a skill for Claude Code from KxSystems/kx-skills. It costs 60 tokens per session (2,827 once invoked), scanned A, original, Apache-2.0.

Documentation and usage guidance for KDB.AI, a vector database for AI applications. It supports similarity search, hybrid search using vectors and text, time-series pattern matching, and result reranking.

In plain words
What is it for?
Use it when building vector search or retrieval-augmented generation systems, hybrid search, time-series matching, reranking, KDB.AI tables, filters, clients, or GPU indexes.
Why use it?
It helps avoid common mistakes in KDB.AI queries, filters, vector arguments, table schemas, and index definitions.

Skill for Claude Code

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

Part of the kdbai-knowledge plugin — 2 skills, 1 MCP server shipped together

Good fit Use it when building vector search or retrieval-augmented generation systems, hybrid search, time-series matching, reranking, KDB.AI tables, filters, clients, or GPU indexes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kxsystems/kx-skills/kdbai
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.

Any agent
npx skills add KxSystems/kx-skills --skill kdbai
Clone the repo
git clone --depth 1 https://github.com/KxSystems/kx-skills

Made for: Claude Code.

Or install kdbai-knowledge, the plugin that ships this one along with the rest of its 2 skills, 1 MCP server.

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 kdbai

README.md
[![agentmods](https://agentmods.dev/badge/skills/kxsystems/kx-skills/kdbai/github.svg)](https://agentmods.dev/skills/kxsystems/kx-skills/kdbai)
Your own site
<a href="https://agentmods.dev/skills/kxsystems/kx-skills/kdbai"><img src="https://agentmods.dev/badge/skills/kxsystems/kx-skills/kdbai/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 kdbai

Your own site · 80×15
<a href="https://agentmods.dev/skills/kxsystems/kx-skills/kdbai"><img src="https://agentmods.dev/badge/skills/kxsystems/kx-skills/kdbai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,827 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00060 $0.02827
Opus 5 $0.00030 $0.01413
Sonnet 5 $0.00012 $0.00565
Haiku 4.5 $0.00006 $0.00283

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

Security

Grade A, and why

kdbai 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 6d 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/kdbai-knowledge/skills/kdbai/SKILL.md · 258 lines

How it starts

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

KDB.AI Vector Database

KDB.AI is a vector database for AI applications. Supports similarity search, hybrid search (dense+BM25), time-series similarity (TSS), dynamic time warping (DTW), and reranking.

For full Python client API, CAGRA GPU details, REST endpoints: see reference.md

Critical Patterns (Common Mistakes)

Filter Format: Operator FIRST

# CORRECT: (operator, column, value)
filter=[("=", "fiscal_year", 2024)]
filter=[("within", "price", [50, 100])]

# WRONG — agents always get this backwards
filter=[("fiscal_year", "=", 2024)]  # WRONG ORDER!

Vectors: Dict with Index Name Key

# CORRECT
results = table.search(vectors={"myIndex": [[1.0, 0.0, 1.0]]}, n=10)

# WRONG
results = table.search(vectors=[[1.0, 0.0, 1.0]], n=10)  # Must be dict!

Schema + Indexes Are SEPARATE Lists

# CORRECT: two separate arguments
schema = [
    {"name": "id", "type": "str"},
    {"name": "text", "type": "str"},
    {"name": "vector", "type": "float32s"},
]
indexes = [
    {"name": "vec_idx", "type": "hnsw", "column": "vector",
     "params": {"dims": 1024, "metric": "CS", "M": 16, "efConstruction": 64}},
]
table = db.create_table("docs", schema=schema, indexes=indexes)

# WRONG — do NOT nest index config inside schema columns
schema = [{"name": "vector", "type": "float32s", "vectorIndex": {...}}]  # WRONG!

TSS/DTW Have NO Index — Use type= in Search

# CORRECT: no index needed, use SCALAR numeric column (not list type)
schema = [{"name": "price", "type": "float64"}]  # scalar, not float32s
indexes = []  # NO index for non-transformed TSS/DTW
table = db.create_table("ts", schema=schema, indexes=indexes)
# vectors key = column name (not index name)
results = table.search(vectors={"price": [[0,1,2,3,4]]}, n=5, type="tss")

# WRONG — there is no TSS or DTW index type
indexes = [{"name": "idx", "type": "tss", ...}]  # WRONG! TSS is not an index

BM25 Sparse Vectors: Dict Format

# CORRECT: sparse vector is {term_id: frequency} dict
sparse_data = [{0: 2, 5: 1, 12: 3}]  # term IDs to frequencies

# WRONG
sparse_data = ["raw text goes here"]  # NOT raw text!

Read the full file on GitHub · 258 lines

Files

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.

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. 6d ago Changed · +1 lines 989c8e9809c0
  2. 10d ago First seen · 257 lines · 60 tokens per session scan A e9b6f84d440d

Subscribe to this mod's changes

kdbai is a skill published in the GitHub repository KxSystems/kx-skills (16 stars, last pushed 7d ago), licensed Apache-2.0. It adds 60 tokens to every session and 2,827 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.