Skip to content

The bb SDK

bb 0.43.3SDK 0.4.104pinned e865697 (desktop-v0.43.3)

stable Plugin backend Show on the zone map

Calls bb's own API from the plugin's server code. With this, a plugin can:

Create threads and projects from plugin code

What it gives you

  • Create threads, send messages to them, and manage projects
  • Spawn or fork with lifecycleOwnerThreadId to archive/delete a dependent with a live owner across projects; ownership is immutable, independent of sidebar parents and supports different hosts/environments. Thread responses return the owner or null. Unarchive owner first; Stop does not cascade
  • List machines and suspend, resume, or remove provider-managed machines
  • Read recorded context usage with sdk.threads.context({ threadId }); usage is null when unavailable, and its snapshot is present only when the latest measurement includes a breakdown
  • Reach the same operations the bb CLI and the bb UI use
  • Have the threads it creates attributed back to the plugin
  • Read the server's loopback URL, public app URL, and data directory when it needs server facts

API

Each symbol links to the pinned commit it was read at.

Used by

Automations, Docs, GitHub, Inline visualizations, Keep Awake, Provider retry, Push notifications, Secrets, Side chat, Tasks, Workflows

The brief is Markdown, written for a coding agent: what the capability is, where it registers, every SDK symbol with a pinned permalink, the rules that bite, and what done means.