Infrastructure Layer

Every vendor, behind one contract.

Cache, databases, vector stores, event bus, LLM and more — all reached through stable interfaces. Swap any vendor with a config line; your service code never changes.

What lives behind the contract

Vendor abstraction across categories

Cache, SQL and document databases, vector stores, object storage, event bus, LLM, embeddings, observability — every external dependency reaches the platform through one stable interface.

Swap any vendor with a config line

When you need to move from one provider to another, you change a single entry in your config. The producer and consumer code in your services stays exactly as it was.

The extension point is open today

Need Kafka, RabbitMQ, NATS, or anything else not in the catalog? Write your own adapter against the same contract — in your own repo, private or public — and it loads identically to ours.

Around 21 open adapters today

OpenAI, SQLite, MongoDB, Redis, Qdrant, Pino, Docker, local filesystem, git worktrees, and more. The catalog grows openly, and so can yours.

Multi-tenant routing built in

Per-tenant rate limits, budget enforcement, audit, and observability are part of the layer — not something every product reimplements.

Self-hosted, open source, no black boxes

Runs on your infrastructure. No data leaves your network unless you configure it to. Every line of every adapter is auditable.

How it works

1

Your service depends on the contract

Your producer and consumer code imports a typed interface from @kb-labs/core-platform. It never imports a vendor SDK directly.

2

The runtime loads the adapter

On startup, the runtime reads your config, loads the adapter package by name, and binds it to the contract. The reference adapter, a private one you wrote, or a future open one — all load identically.

3

Swap the backend, code stays put

Change one line in .kb/kb.config.json. Your service code is unchanged. The vendor underneath is replaced, the behaviour above the contract is preserved.

// .kb/kb.config.json — change the adapter, code stays the same
{
  "platform": {
    "adapters": {
      "cache":      "@kb-labs/adapters-redis",
      "db":         "@kb-labs/adapters-sqlite",
      "documentDb": "@kb-labs/adapters-mongodb",
      "vectorStore":"@kb-labs/adapters-qdrant",
      "eventBus":   "@kb-labs/adapters-eventbus-cache",
      "llm":        "@kb-labs/adapters-openai",
      "logger":     "@kb-labs/adapters-pino",
      "storage":    "@kb-labs/adapters-fs"
    }
  }
}

Stop reimplementing the same vendor wiring in every product.

One contract layer. Adapters you swap in config. Built on the same engine you install in one command.