Skip to main content

Toolpack SDK

Core Packages:
SDK GitHub SDK npm Knowledge npm

CLI:
CLI GitHub CLI npm

Organizations:
GitHub Org npm Org

The Toolpack SDK is an open source unified TypeScript SDK for building AI-powered applications. It provides a single, consistent API to work with multiple AI providers - OpenAI, Anthropic, Gemini, and Ollama - without vendor lock-in.

Why Toolpack SDK?

  • Multi-Provider Support - Switch between OpenAI, Anthropic, Gemini, or Ollama with a single line of code
  • 90 Built-in Tools - File system, Kubernetes, command execution, web scraping, database operations, and more
  • No Subscription Required - Use your own API keys directly with providers
  • Three Built-in Modes - Agent mode (full tool access), Coding mode (development-focused), and Chat mode (web-only access)
  • Workflow Engine - Automatic planning and step-by-step execution for complex tasks
  • Fully Extensible - Create custom providers, modes, and tools

Quick Example

import { Toolpack } from 'toolpack-sdk';

// Initialize with your preferred provider
const toolpack = await Toolpack.init({
provider: 'openai', // or 'anthropic', 'gemini', 'ollama'
tools: true, // Enable built-in tools
});

// Stream a response
const stream = toolpack.stream({
messages: [{ role: 'user', content: 'List the files in the current directory' }],
model: 'gpt-4o',
});

for await (const chunk of stream) {
process.stdout.write(chunk.delta);
}

Features at a Glance

FeatureDescription
ProvidersOpenAI, Anthropic, Gemini, Ollama + custom providers
Tools90 built-in tools across 11 categories
ModesAgent (full access), Coding (development-focused), Chat (web-only), or custom
WorkflowsDirect execution or planned step-by-step
StreamingReal-time token streaming with tool execution
MultimodalText + image inputs across all vision-capable providers
Type SafetyFull TypeScript support with comprehensive types

Getting Started

Ready to build? Head to the Installation guide to get started in minutes.