Skip to main content

AI Kit

AI Kit is a modular toolkit for building AI-powered applications. It provides framework-agnostic core primitives plus framework-specific bindings for React, Vue, Svelte, and Next.js.

Package Architecture

@ainative/ai-kit-core          ← Framework-agnostic core
├── @ainative/ai-kit ← React hooks & components
├── @ainative/ai-kit-vue ← Vue 3 composables
├── @ainative/ai-kit-svelte ← Svelte stores
├── @ainative/ai-kit-nextjs ← Next.js utilities
├── @ainative/ai-kit-safety ← Prompt injection, PII, moderation
├── @ainative/ai-kit-rlhf ← Human feedback collection
├── @ainative/ai-kit-auth ← Authentication integration
├── @ainative/ai-kit-zerodb ← ZeroDB vector storage
├── @ainative/ai-kit-tools ← Built-in agent tools
├── @ainative/ai-kit-observability ← Usage tracking & cost alerts
├── @ainative/ai-kit-video ← Video recording & transcription
├── @ainative/ai-kit-design-system ← Design tokens & theming
└── @ainative/ai-kit-cli ← Scaffold new projects

Quick Start

# Scaffold a new AI Kit project
npx @ainative/ai-kit-cli create my-ai-app

# Or install individual packages
npm install @ainative/ai-kit-core @ainative/ai-kit

Core Concepts

Streaming

AI Kit Core provides a universal streaming layer that works across frameworks:

import { createStreamingResponse } from '@ainative/ai-kit-core';

const stream = createStreamingResponse({
provider: 'ainative',
model: 'meta-llama/llama-3.3-70b-instruct',
messages: [{ role: 'user', content: 'Hello' }],
});

for await (const chunk of stream) {
console.log(chunk.content);
}

Agent Orchestration

Build agents with tool calling and streaming:

import { Agent, AgentExecutor } from '@ainative/ai-kit-core';

const agent = new Agent({
name: 'assistant',
model: 'meta-llama/llama-3.3-70b-instruct',
tools: [searchTool, calculatorTool],
});

const executor = new AgentExecutor(agent);
const result = await executor.run('What is the population of Tokyo?');

Packages

PackageInstallDescription
ai-kit-corenpm i @ainative/ai-kit-coreStreaming, agents, state management
ai-kitnpm i @ainative/ai-kitReact hooks and UI components
ai-kit-vuenpm i @ainative/ai-kit-vueVue 3 composables
ai-kit-sveltenpm i @ainative/ai-kit-svelteSvelte stores and actions
ai-kit-nextjsnpm i @ainative/ai-kit-nextjsNext.js App Router utilities
ai-kit-safetynpm i @ainative/ai-kit-safetyContent safety and moderation
ai-kit-observabilitynpm i @ainative/ai-kit-observabilityUsage tracking and cost alerts
ai-kit-rlhfnpm i @ainative/ai-kit-rlhfRLHF feedback collection
ai-kit-authnpm i @ainative/ai-kit-authAuthentication integration
ai-kit-zerodbnpm i @ainative/ai-kit-zerodbZeroDB vector storage hooks
ai-kit-toolsnpm i @ainative/ai-kit-toolsBuilt-in agent tools
ai-kit-videonpm i @ainative/ai-kit-videoVideo recording and transcription
ai-kit-design-systemnpm i @ainative/ai-kit-design-systemDesign tokens and theming
ai-kit-clinpx @ainative/ai-kit-cliProject scaffolding CLI

Next Steps

  • Core — Streaming, agents, and state management
  • React — Hooks and components
  • Safety — Content moderation and PII detection
  • Observability — Usage tracking and cost alerts