KB LabsDocs

Built-in Adapters

Last updated April 16, 2026


Catalog of adapters shipped in the monorepo with their interface and use case.

Every adapter in the table below lives under adapters/ and is published to npm under @kb-labs/adapters-<name>. Pick by interface (the contract the runtime sees) and runtime characteristics (what backend, what tradeoffs).

To swap an adapter, change one line in kb.config.jsonc under platform.adapters. See Adapters → Overview for the swap mechanics, and Guides → LLM Setup for an end-to-end walkthrough.

LLM (ILLM)

PackageImplementsUse when
@kb-labs/adapters-kblabs-gatewayILLMDefault. Bootstrap-friendly free tier through a hosted proxy. Good for onboarding, demos, light dev use.
@kb-labs/adapters-openaiILLMYou have your own OpenAI-compatible key. Supports baseURL so it also works against self-hosted inference servers (vLLM, Ollama with OpenAI-compat shim, custom proxies).
@kb-labs/adapters-vibeproxyILLMInternal routing proxy. Niche; most teams won't reach for this.

Embeddings (IEmbeddings)

PackageImplementsUse when
@kb-labs/adapters-openai/embeddingsIEmbeddingsOpenAI text-embedding models (text-embedding-3-small, -large, etc.). Default for RAG flows.

Vector store (IVectorStore)

PackageImplementsUse when
@kb-labs/adapters-qdrantIVectorStorePersistent vector database. Use for production RAG, shared indices, large corpora.

Cache (ICache)

PackageImplementsUse when
@kb-labs/adapters-redisICacheShared cache across worker processes / hosts. Standard production choice.
@kb-labs/adapters-eventbus-cacheICacheCache that publishes invalidations on the platform event bus. Use when multiple plugins share cached state and need notification of changes.

Storage (IStorage)

PackageImplementsUse when
@kb-labs/adapters-fsIStorageDefault. Local filesystem under .kb/storage/. Zero deps, perfect for single-host dev and small deployments.

Logger (ILogger)

PackageImplementsUse when
@kb-labs/adapters-pinoILoggerDefault. Structured JSON logs to stdout. Standard production choice when something else (Loki, CloudWatch, journald) tails stdout.
@kb-labs/adapters-pino-httpILoggerPino with HTTP request enrichment. Use inside HTTP services that want auto-attached req/res fields.
@kb-labs/adapters-log-ringbufferILoggerIn-memory ring buffer queryable from the platform. Use alongside Pino when you want recent logs accessible via API without parsing files.
@kb-labs/adapters-log-sqliteILoggerPersists structured logs to a local SQLite file. Searchable with SQL, survives restarts.

Analytics (IAnalytics)

PackageImplementsUse when
@kb-labs/adapters-analytics-fileIAnalyticsDefault. JSONL file at .kb/analytics/events.jsonl. Zero deps, append-only, easy to grep.
@kb-labs/adapters-analytics-sqliteIAnalyticsSQLite database. Query events with SQL, build aggregations.
@kb-labs/adapters-analytics-duckdbIAnalyticsDuckDB embedded analytical database. Same single-file convenience as SQLite, much faster for analytical queries over millions of events.

SQL database (ISQLDatabase)

PackageImplementsUse when
@kb-labs/adapters-sqliteISQLDatabaseEmbedded SQLite. Single-file, zero-config, suitable for plugin-local persistence.

Document database (IDocumentDatabase)

PackageImplementsUse when
@kb-labs/adapters-mongodbIDocumentDatabaseMongoDB-backed document store.

Workspace (IWorkspaceProvider)

PackageImplementsUse when
@kb-labs/adapters-workspace-localfsIWorkspaceProviderDirect read/write against the local filesystem. Default for single-machine dev.
@kb-labs/adapters-workspace-worktreeIWorkspaceProviderEach plugin invocation gets its own git worktree. Isolation between concurrent runs without copying files.
@kb-labs/adapters-workspace-agentIWorkspaceProviderRoutes filesystem ops through the host agent over WebSocket. Use for cloud-side workflows that need to touch a developer's local files.

Environment (IEnvironmentProvider)

PackageImplementsUse when
@kb-labs/adapters-environment-dockerIEnvironmentProviderProvisions a Docker container per plugin invocation when the manifest declares execution.mode: 'container'.

Snapshot (ISnapshotProvider)

PackageImplementsUse when
@kb-labs/adapters-snapshot-localfsISnapshotProviderLocal filesystem snapshots used by workflow rollback and recovery.

Transport

@kb-labs/adapters-transport is a base package consumed by other adapters — not selected directly via kb.config.jsonc. Don't worry about it unless you're writing a custom adapter that needs the same HTTP/WebSocket primitives.

What's not here yet

The roadmap-but-not-shipped list (don't try to use these via kb.config.jsonc — they 404):

  • Cache: Memcached, in-memory standalone (today the platform falls back to NoOp when no cache adapter is configured).
  • Vector store: Pinecone, Chroma, pgvector.
  • Storage: S3, MinIO, GCS, Azure Blob.
  • LLM: Anthropic native, Cohere, local Llama.cpp adapter.
  • SQL: Postgres, MySQL.

If you need one before it ships, write a custom adapter — see Guides → First Adapter. Most of these are an afternoon of work because the interface is small and there's no platform plumbing to figure out.

Built-in Adapters — KB Labs Docs