Distributed state without the infrastructure overhead

Share state across workflows, plugins, and services with zero external dependencies.

How it fits together

Workflow
State Broker
Plugin
Redis (optional)

Why not just use Redis directly?

FeatureTraditionalState Broker
External dependenciesRedis, Memcached, etc.None required
Setup timeHours of configurationZero — works out of the box
Scaling pathRe-architect from scratchSwap backend, same API
Tenant isolationBuild it yourselfBuilt-in with quotas
Cache API
import { useCache } from '@kb-labs/sdk';

const cache = useCache();

// Store with TTL
await cache.set('user:123', data, 60_000);

// Retrieve
const user = await cache.get('user:123');
Pub/Sub
import { useBroker } from '@kb-labs/sdk';

const broker = useBroker();

// Subscribe to changes
broker.subscribe('deploy:*', (event) => {
  console.log(event.key, event.value);
});

// Publish
broker.publish('deploy:started', { env: 'prod' });

Scaling path

Development

In-Memory

~1ms

Fast in-process cache for local development and small teams. No infrastructure required.

Production

Redis

~5ms

Shared state across instances with persistence. Same API — swap the backend config.

Enterprise

Multi-Region

distributed

Geo-replicated state with per-region routing. Dedicated backends per tenant.

Simplify your state management

No more external dependencies for shared state.