Skip to main content

Component Ecosystem Overview

This document summarizes how BubuStack's component ecosystem fits together, including SDK usage, contracts, packaging/registry patterns, and reliability semantics. It links to the detailed docs and repo references you'll use day-to-day.

Who this is for

  • Component authors building Engrams and Impulses.
  • SDK users wiring triggers, inputs, and outputs.
  • Platform operators packaging and distributing components.

What you'll get

  • Where the SDKs live and what they cover.
  • The core contracts that define inputs, outputs, and errors.
  • How components are packaged and discovered.
  • The reliability guarantees you must design around.

The rule: do one thing and do it well

An Engram does one job. A "fetch-and-summarize" Engram is two Engrams. A "summarize-and-notify" Engram is two Engrams. If you can describe what it does with "and", split it.

Stories compose Engrams into pipelines. This is the same principle as Unix: curl fetches, jq transforms, notify-send alerts. Each program is small, testable, and reusable. The shell (Story) wires them together.

Impulses follow the same rule. A cron-impulse fires on a schedule. A github-webhook-impulse fires on GitHub events. A kubernetes-impulse fires on cluster events. Each trigger does one thing.

When you follow this, every component becomes independently testable, swappable, and reusable across Stories. When you don't, you get monoliths with implicit coupling that break when requirements change.


Quick start: authoring flow

  1. Create a component repo (see Building Engrams for structure).
  2. Implement an Engram or Impulse using bubu-sdk-go.
  3. Define schemas in EngramTemplate or ImpulseTemplate.
  4. Validate with bubu-sdk-go/testkit and bubu-sdk-go/conformance.
  5. Build a Docker image and deploy by referencing the template in a Story.

Repo map (where to look)

RepositoryPurpose
tractatusProtobuf contracts for gRPC transport.
coreShared runtime contracts, templating engine, transport connector runtime.
bobrapetCRDs, controllers, webhooks, and the runtime contract docs.
bubu-sdk-goGo SDK, testkit, and conformance helpers.
bobravoz-grpcStreaming transport operator: gRPC hub, topology analysis, connector lifecycle.
bubuilderWeb console and REST API server.
bubu-registry (planned)Git-backed registry and bubu CLI. See Roadmap.
engrams/*Engram implementations (batch and streaming data processors).
impulses/*Impulse implementations (event-driven workflow triggers).
examplesSample Stories and workflows.

For the full module dependency graph and layering rules, see Architecture.


Component SDKs

The Go SDK is the primary authoring surface for components. It provides three entry points:

Entry pointUse caseKubernetes workload
sdk.StartBatch[C, I]Finite tasks with clear start/endJob
sdk.StartStreaming[C]Continuous processing with gRPC bidirectional streamingDeployment
sdk.RunImpulse[C]Long-running trigger that creates StoryRuns from external eventsDeployment

The SDK also provides:

  • testkit — Local harness for testing component behavior without a cluster (testkit.BatchHarness, testkit.StreamHarness).
  • conformance — Contract test suites that all components should pass (conformance.BatchSuite, conformance.StreamSuite).

Use the SDK to:

  • Parse runtime context (story, run, step, transport settings).
  • Emit outputs, logs, and structured errors.
  • Integrate with streaming transports when enabled.
  • Handle storage ref resolution (automatic for inputs; transparent offloading for large outputs).

For a full development guide with interfaces, code examples, testing patterns, and template definitions, see Building Engrams and Go SDK.


Available components

Engrams (data processors)

Engrams process data — they receive inputs, execute logic, and produce outputs.

EngramPatternDescription
http-request-engramBatchHTTP requests with pagination, retries, and response parsing
json-filter-engramBatchFilter JSON payloads (inline or offloaded) with JSONPath
map-reduce-adapter-engramBatchDynamic fan-out with child StoryRuns and result aggregation
materialize-engramBatchEvaluate Go templates with Sprig against a provided context
mcp-adapter-engramBothModel Context Protocol adapter (streamable HTTP and stdio)
openai-chat-engramBothOpenAI chat completions (batch and streaming)
openai-stt-engramStreamingOpenAI speech-to-text with real-time transcription events
openai-tts-engramStreamingOpenAI text-to-speech with audio chunk streaming
silero-vad-engramStreamingVoice activity detection using Silero ONNX models
livekit-bridge-engramStreamingLiveKit room participant bridge for audio/data channels
livekit-turn-detector-engramStreamingConversational turn detection for voice pipelines

Impulses (event triggers)

Impulses trigger workflows — they listen for external events and create StoryRuns.

ImpulseTrigger sourceDescription
cron-impulseCron scheduleTime-based triggers with cron expressions
github-webhook-impulseGitHub webhooksPR, push, issue, and other GitHub events
kubernetes-impulseKubernetes eventsPod crashes, deployments, resource changes
livekit-webhook-impulseLiveKit webhooksRoom and participant lifecycle events

Browse all components: Engrams · Impulses


Contracts and schemas

Contracts live in two places:

  • CRD schemas define the API surface for Stories, Runs, Engrams, and Impulses. These are authored in bobrapet/api/ and documented in CRD Design.
  • Runtime contracts define environment variables, labels, annotations, and structured error payloads for SDKs. See core/contracts and Error Contract.

Streaming components also follow the streaming message contract:


Packaging and registry (planned)

A Git-backed component registry (bubu-registry) and CLI (bubu) for scaffolding, publishing, and discovering components are on the Roadmap. Today, components are shared as container images and EngramTemplate/ImpulseTemplate YAML files applied directly to the cluster.


Reliability semantics

Reliability guarantees are defined in Durable Semantics. Key themes:

  • StoryRun and StepRun creation are idempotent when deterministic IDs are used.
  • Step execution is at-least-once; components must handle retries.
  • Redrive and rerun behavior is driven by annotations and controller logic.

When designing components, assume retries, partial failure, and replays. Use idempotency keys and structured errors to preserve correctness.