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(
researcher,
writer,
editor,
);
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
);
What each layer gives you
Baleybots builds on AI SDK v7 for providers, streaming, structured output, and tool loops. It adds composition for multi-processor workflows.
| Capability | AI SDK (v7) | Baleybots + AI SDK |
|---|---|---|
| Provider & model calls | streamText, generateObject, multi-provider | Same AI SDK providers, composed through Processable |
| Structured output | Output.object(), Zod schemas | Zod on Baleybot; validated across composed pipelines |
| Tool loops | stopWhen, maxSteps | stopWhen on Baleybot with sensible defaults |
| Streaming | streamText(), UI message streams | Segment reducers; typed events for nested processors |
| Processor composition | Per-request primitives | pipeline(), parallel(), graph, agents-as-tools |
| Tool approval | needsApproval, approval flows | Integrated into Baleybot and useChat Processable loop |
| Multi-agent orchestration | — | Team dispatch, Crew coordinator, ticket workers |
| Host surfaces | — | @baleybots/react, CLI, BAL |