Migration Overview
Baleybots v2 introduces several breaking changes aimed at simplifying the API and reducing complexity. This section covers the key changes and how to update your code.
Breaking changes
Configuration changes
The agent configuration API has been simplified. Key renames include finalResponseSchema to outputSchema, parameters to inputSchema for tools, and Baleybots.create() to Baleybot.create() (singular). The transport layer has been removed entirely.
See v1 to v2 Config Changes for full before/after examples.
Unified useChat hook
The useGroupChat hook is deprecated. All chat functionality is now handled by useChat, which supports both client mode and server mode via the apiUrl and chatId options.
See Unified useChat Hook for migration details.
Collapsed segment types
SpawnAgentSegment, SequentialThinkingSegment, and DSLPipelineSegment have been collapsed into ToolCallSegment. Use segment.name to identify the tool type.
See Collapsed Segment Types for rendering migration examples.