Skip to main content

Compose AI like you
compose code.

Type-safe, stateless AI processors. Define a goal, define an output schema, call .process(). Chain them into pipelines.

import { Baleybot, pipeline, parallel } from '@baleybots/core';

const researcher = Baleybot.create({
name: 'researcher',
goal: 'Research a topic and gather key facts',
});

const writer = Baleybot.create({
name: 'writer',
goal: 'Write a clear summary from research notes',
});

const critic = Baleybot.create({
name: 'critic',
goal: 'Review for accuracy and clarity',
});

// Compose agents into a pipeline
const article = pipeline()
.step(researcher)
.step(writer)
.step(critic)
.build();

const result = await article.process('AI agents in 2025');

One interface. Infinite compositions.

Every agent exposes .process(input) — the same interface as a pipeline, a parallel group, or a tool. Build them small. Compose them large.

An agent

const researcher = Baleybot.create({
name: 'researcher',
goal: 'Research a topic',
});

const result = await researcher.process(
'AI agents'
);

A pipeline

import { pipeline } from '@baleybots/core';

const workflow = pipeline()
.step(researcher)
.step(writer)
.step(editor)
.build();

const article = await workflow.process(
'AI agents'
);

A parallel

import { parallel } from '@baleybots/core';

const analysis = parallel({
sentiment: sentimentBot,
topics: topicsBot,
summary: summaryBot,
});

const results = await analysis.process(
text
);

Why Baleybots?

The composition layer your agent stack is missing.

FeatureRaw API CallsVercel AI SDKBaleybots
CompositionCustom glue codeNot built-inpipeline(), parallel(), agents-as-tools
Typed outputsParse JSON yourselfZod schemasZod schemas, validated across pipelines
Automatic tool loopManual while-loopmaxStepsBuilt-in with stop conditions
StreamingSSE parsingstreamText()Typed events for text, tools, and nested agents
Tool approvalBuild it yourselfNot built-inPer-tool needsApproval with callbacks
Provider supportOne at a timeMulti-providerMulti-provider, zero-config from env vars