Getting Started
Unified AI development toolkit for TypeScript
What is AI Toolkit?
@jamaalbuilds/ai-toolkit is a unified AI development toolkit for TypeScript that wraps the best AI libraries behind a consistent, beginner-friendly API.
One import. Clear names. Consistent API. Provider-agnostic. Auto-cleanup. Built-in security.
Instead of learning 7 different AI library APIs, you learn one:
import { createAI } from '@jamaalbuilds/ai-toolkit/ai';
import { createChain } from '@jamaalbuilds/ai-toolkit/chain';
import { createMonitor } from '@jamaalbuilds/ai-toolkit/monitor';
What's Inside
| Module | Wraps | What It Does |
|---|---|---|
ai | Vercel AI SDK | Call AI models — generate, stream, structured output |
chain | LangChain.js | Multi-step reasoning — prompt templates, output parsing |
agents | LangGraph.js | Multi-agent orchestration — routing, state, HITL |
knowledge | LlamaIndex.js | Document ingestion, chunking, embedding, search |
database | Drizzle ORM | Typed queries, vector search, migrations |
monitor | Langfuse | Trace LLM calls, evaluate quality, cost tracking |
workflow | Inngest | Durable background jobs — cron, retry, pause/resume |
mcp | MCP SDK | Build MCP servers, define tools and resources |
security | Custom | PII detection, audit logging, guardrails |
auth | Custom | API key validation, RBAC |
cache | Redis / in-memory | Get/set/invalidate with TTL |
storage | Vercel Blob | File upload with validation |
config | Zod | Validate env vars, typed config |
errors | Custom | Typed errors, retry logic |
health | Custom | Self-diagnostics, per-service status |
testing | Custom | Mock AI, MCP, DB, workflows — zero API calls |
Quick Example
import { initToolkit } from '@jamaalbuilds/ai-toolkit/config';
import { createAI } from '@jamaalbuilds/ai-toolkit/ai';
// Initialize (reads GROQ_API_KEY, AI_PROVIDER, AI_MODEL from env)
const { config } = initToolkit();
// Create an AI client and generate
const ai = createAI();
const result = await ai.generate('Explain TypeScript generics in one sentence');
// result.text contains the generated response
Show Your Support
Add a badge to your project:
[](https://github.com/danilobatson/ai-toolkit)
Next Steps
- Installation — install the package and peer dependencies
- Quick Start — build your first AI feature in 5 minutes
- Architecture — understand the adapter pattern