Platform API

One client for your services. Zero vendor SDKs.

@kb-labs/platform-client is a zero-dependency TypeScript SDK your products import once and use everywhere. Cache, databases, vector stores, LLM, analytics — all reached through a single client that routes through the Gateway.

{
  "adapters": {
    "llm":         "openai",
    "cache":       "redis",
    "vectorStore": "qdrant",
    "analytics":   "sqlite"
  }
}

One client. Many backends. Zero rewrites.

What the client gives you

.01

LLM

Language model access through a stable interface — swap the provider, the plugin code stays the same.

OpenAI, KB Labs Gateway — more via custom adapters

.02

Cache

Key-value caching with TTL for expensive computations (LLM results, embeddings, scraped data).

Redis — more backends as demand grows

.03

Vector Store

Semantic search over embeddings: upsert, search, delete, filter.

Qdrant — more backends as demand grows

.04

Analytics

Event tracking and time-series aggregation with pluggable backends.

SQLite, DuckDB, JSONL file

.05

Storage

File read/write/list through a single interface — same code runs against local disk or a remote backend.

Local filesystem — more backends as demand grows

.06

Embeddings

Text-to-vector conversion used by semantic search and RAG flows.

OpenAI — more via custom adapters

import { KBPlatform } from '@kb-labs/sdk/platform';

const platform = new KBPlatform({
  endpoint: 'http://gateway:4000',
  apiKey: process.env.KB_API_KEY,
});

// LLM — provider resolved by platform config
const answer = await platform.llm.complete('Explain this code');

// Cache — backend chosen by platform config, same API for you
await platform.cache.set('session:123', userData, 3600);

// Telemetry — batched, auto-flushed
platform.telemetry.event('user.signup', { plan: 'pro' });

One import. Every capability. None of the vendor wiring.

Install @kb-labs/platform-client in your service, point it at your Gateway, and stop reimplementing infrastructure clients in every product.