KB LabsDocs

Reference

Last updated April 7, 2026


Authoritative reference for CLI commands, REST endpoints, SDK API, error codes, and the manifest schema.

Authoritative reference material for KB Labs. Each page covers one surface of the platform in full detail — use these when you know what you're looking for and need exact types, flags, or error codes.

What's in this section

PageWhat you'll find
CLI ReferenceEvery pnpm kb command group, its flags, and how to discover the full current list
REST API ReferenceAll HTTP endpoints across REST API, Workflow Daemon, and Gateway with how to read the live OpenAPI spec
SDK API ReferenceEvery export from @kb-labs/sdk — handlers, hooks, helpers, types
Error CodesPlatform error codes, their meanings, and recovery steps
Manifest v3 SchemaThe kb.plugin/3 JSON Schema for tooling, IDE support, and validation
ChangelogVersion-by-version release notes and where to find per-package history

How reference pages work

Reference material in KB Labs is partly auto-generated and partly hand-maintained. A few notes on the current state:

  • CLI commands are discovered at runtime from plugin manifests. The complete current list is always available via pnpm kb --help and pnpm kb plugins commands. The reference page explains the structure and documents the built-in command groups.

  • REST API is described by OpenAPI specs served live by each service. Browse them at /docs on any running service, or fetch /openapi.json for machine consumption.

  • SDK API is documented by hand on the SDK section pages (the canonical source). The reference page here is a navigational index to those pages.

  • Manifest v3 is a human-maintained page that mirrors the TypeScript types. The Plugins → Manifest Reference page is more detailed; this one links to the JSON Schema for tooling.

Finding things quickly

If you know the name of what you're looking for:

Bash
# All available CLI command groups
pnpm kb --help
 
# Commands in a specific group
pnpm kb <group> --help
 
# Full list of commands from all installed plugins
pnpm kb plugins commands
 
# Live REST API docs (service must be running)
open http://localhost:5050/docs        # REST API
open http://localhost:7778/docs        # Workflow Daemon
open http://localhost:4000/docs-all    # Gateway (merged spec)

For semantic search across the entire codebase:

Bash
pnpm kb mind rag-query --text "your question" --agent
Reference — KB Labs Docs