Why Toolpack SDK Exists: Fixing the Fragmentation of AI Tooling
The AI tooling ecosystem is growing fast—but it's also fragmenting. Developers face vendor lock-in, inconsistent tool execution, and a lack of standardization when building AI-powered systems. Toolpack SDK is our answer to these problems.
1. The Current Problem Landscape
If you've built AI applications, you've likely encountered these pain points:
- Vendor lock-in: Switching from OpenAI to Anthropic or Gemini means rewriting integration code, adapting to different APIs, and debugging new edge cases.
- Tool execution inconsistency: Every framework handles function calling differently. Some abstract it away entirely; others leave you managing raw JSON schemas and parsing responses manually.
- Lack of standardization: There's no common interface for tools across agents, providers, or runtimes. Reusable AI infrastructure is hard to build.
- Production friction: Most solutions are optimized for demos, not production systems. Debugging, observability, and error handling are afterthoughts.
These aren't philosophical problems—they're real blockers that slow down development and increase maintenance burden.
2. What Developers Actually Need
To build reliable, scalable AI systems, developers need:
- Provider-agnostic execution: Write once, run on any LLM provider without rewriting logic.
- Composable tools: Define tools as first-class citizens that work across modes, providers, and workflows.
- Predictable runtime behavior: Know exactly what happens when a tool is called, when streaming starts, and how errors propagate.
- Extensibility without rewrites: Add custom providers, tools, or modes without forking the entire framework.
The gap between what's needed and what's available is significant.
3. Where Existing Solutions Fall Short
Current approaches fall into a few categories, each with trade-offs:
- Framework-heavy solutions: Tight abstractions that make simple things easy but complex things impossible. Hard to debug when things go wrong.
- Black-box execution: You call a method, magic happens, and you get a result—but you can't inspect or control the intermediate steps.
- Vendor-specific SDKs: Great for one provider, but switching means starting over.
- Demo-first design: Works beautifully in tutorials, breaks in production when you need streaming, error recovery, or custom tool logic.
We needed something different: minimal, composable primitives designed for real systems.
4. Toolpack SDK Approach
Toolpack SDK is built on a few core principles:
Minimal, Composable Primitives
We don't abstract away the LLM interaction—we give you clean primitives to compose:
- Providers: Adapters for OpenAI, Anthropic, Gemini, Ollama, or custom implementations.
- Tools: Reusable, schema-driven functions with built-in validation and execution.
- Modes: Predefined tool bundles (Agent, Chat, or custom) that control what the AI can access.
- Workflows: Orchestration layer for multi-step tasks with planning and execution.
Tools as First-Class Citizens
Every tool in Toolpack SDK is:
- Self-describing: JSON schema parameters, clear descriptions, and metadata.
- Provider-agnostic: Works across OpenAI, Anthropic, Gemini, and Ollama without changes.
- Composable: Mix the built-in tools with custom ones in any mode.
Multi-Provider by Design
Switching providers is a one-line change:
const toolpack = await Toolpack.init({
provider: 'anthropic', // or 'openai', 'gemini', 'ollama'
tools: true,
});
The same tools, workflows, and modes work across all providers. No rewrites.
Designed for Real Systems
We prioritize:
- Streaming: Real-time token streaming with tool execution interleaved.
- Error handling: Graceful degradation, retries, and clear error messages.
- Observability: Logs, traces, and hooks for debugging and monitoring.
- Type safety: Full TypeScript support with comprehensive types.
Built for Extensibility
Toolpack SDK is designed to grow with your needs. Every core primitive can be extended:
- Custom Providers: Integrate any LLM provider by implementing the
ProviderAdapterinterface. Add Grok, Claude Opus, or your own fine-tuned model without forking the SDK. - Custom Modes: Create specialized tool bundles for specific use cases. Define a "Data Analysis" mode with database and visualization tools, or a "DevOps" mode with deployment and monitoring tools.
- Custom Tools: Build domain-specific tools that integrate seamlessly with the 77 built-in ones. Your custom tools work across all providers and modes automatically.
This extensibility isn't an afterthought—it's a core design principle. You're never locked into our choices.
5. A Simple Mental Model
Toolpack SDK follows a clear execution flow:
Input → Orchestrator → Tools → Providers → Output
- Input: User message or workflow request.
- Orchestrator: Toolpack SDK manages the conversation loop, tool calls, and provider communication.
- Tools: Execute when the LLM requests them (file system, web scraping, database queries, etc.).
- Providers: Handle the actual LLM inference (OpenAI, Anthropic, Gemini, Ollama).
- Output: Streamed tokens, final response, or workflow result.
This model is predictable, debuggable, and extensible.
6. A Small Example
Here's how you define a custom tool and use it across providers:
import { Toolpack, ToolDefinition } from 'toolpack-sdk';
// Define a custom tool
const weatherTool: ToolDefinition = {
name: 'get-weather',
description: 'Get current weather for a location',
parameters: {
type: 'object',
properties: {
location: { type: 'string', description: 'City name' },
},
required: ['location'],
},
execute: async (args) => {
return `Weather in ${args.location}: Sunny, 72°F`;
},
};
// Initialize with OpenAI
const toolpack = await Toolpack.init({
provider: 'openai',
customTools: [{ key: 'weather', tools: [weatherTool] }],
});
const response = await toolpack.generate({
messages: [{ role: 'user', content: 'What is the weather in San Francisco?' }],
});
console.log(response.content);
Switch to Anthropic? Change one line:
provider: 'anthropic',
The tool definition, execution logic, and workflow stay identical.
7. What Comes Next
We're building Toolpack SDK in the open. Here's what's on the roadmap:
- Knowledge Module (RAG): Already shipped—embed and search documents with built-in vector storage.
- MCP Integration: Connect to Model Context Protocol servers for extended tool ecosystems.
- Enhanced Workflows: More sophisticated planning, branching, and error recovery.
- Community Tools: A registry of reusable tools contributed by the community.
- Production Tooling: Observability, caching, and deployment helpers for production systems.
We're committed to keeping Toolpack SDK minimal, composable, and production-ready. More tools are always in development. No subscriptions, no vendor lock-in—just your API keys and a unified SDK.
Ready to build? Check out the Getting Started guide or explore the continuously growing tools catalog.
Have feedback or questions? Open an issue on GitHub or join the discussion.