Packages
Baleybots is a Turborepo of TypeScript packages. Every package builds on @baleybots/core, which wraps the AI SDK v7 as the model and runtime layer. Install only what your surface needs.
Package map
| Package | npm | Role |
|---|---|---|
| core | @baleybots/core | Foundation — Baleybot, structured output, tool(), composition (pipeline, graph), streaming segments |
| chat | @baleybots/chat | Stateful chat with history middleware; built on core |
| react | @baleybots/react | React hooks for streaming chat and structured output |
| cli | @baleybots/cli | Interactive terminal chat (Ink); binaries chat, baleybots-chat |
| tools | @baleybots/tools | BAL — Baleybots Assembly Language DSL for declarative pipelines |
| agent-tools | @baleybots/agent-tools | Host coding tools — filesystem, bash, scoped workspace |
| mcp | @baleybots/mcp | MCP client — connect external tool servers |
| orchestration | @baleybots/orchestration | Multi-agent teams — dispatch, coordinator, group chat |
| proxy-server | @baleybots/proxy-server | Backend proxy so API keys stay off the client |
Infrastructure (optional): @baleybots/memory for conversation persistence, @baleybots/sandbox for isolated execution, Cloudflare Workers bindings for edge deployment. Most apps start with core alone.
Which package when
Need structured output from a model?
└─ @baleybots/core
Need conversation history across turns?
└─ @baleybots/chat (+ core)
Need a React chat UI?
└─ @baleybots/react (+ core or chat)
Need a terminal chat app?
└─ @baleybots/cli
Need declarative multi-step pipelines (BAL)?
└─ @baleybots/tools (+ core)
Need fs/bash tools for a coding agent?
└─ @baleybots/agent-tools (+ core)
Need tools from an MCP server?
└─ @baleybots/mcp (+ core)
Need multiple agents coordinating on tickets?
└─ @baleybots/orchestration (+ core)
Need to hide provider keys in a browser app?
└─ @baleybots/proxy-server
How they relate
- core is the foundation. Processors, tools, pipelines, and streaming all live here. Model calls route through AI SDK
LanguageModelinstances — install@ai-sdk/openai,@ai-sdk/anthropic, or any community provider as needed. - chat adds stateful history on top of core processors — same
.process()contract, plus turn management. - react and cli are host surfaces. They consume core (and often chat) but do not replace it.
- tools is BAL only — not filesystem/bash helpers. Those moved to agent-tools in alpha.171.
- agent-tools supplies concrete host tools (
read_file,bash, scoped workspace) you attach to aBaleybottool loop. - mcp adapts remote MCP servers into the same
{ name, description, inputSchema, execute }shape core expects. - orchestration coordinates multiple core processors as a team — three topologies from one roster.
Install examples
# Minimal — one processor, structured output
bun add @baleybots/core zod ai
# Stateful chat
bun add @baleybots/chat @baleybots/core zod ai
# Coding agent with scoped filesystem
bun add @baleybots/core @baleybots/agent-tools zod ai
# Multi-agent team
bun add @baleybots/orchestration @baleybots/core zod ai
Learn more
- Quickstart — first processor in five minutes
- Provider setup — API keys and model strings
- Custom models — AI SDK passthrough for any endpoint
- Alpha 171 migration — breaking changes from earlier alphas
- API Reference — TypeDoc for each package