Getting Started
Installation
Install the package and peer dependencies needed for agent and chat integrations.
Install the AI package in an app or package that already uses Tulip core.
pnpm add @tulip-systems/ai ai reactThe package depends on @tulip-systems/core for shared UI and utility primitives.
pnpm add @tulip-systems/coreServer-only imports
Agent, tool execution, MCP, and streaming helpers are server-only:
import { createAgent } from "@tulip-systems/ai/agents/server";
import { streamAgentChatEventIterator } from "@tulip-systems/ai/chat/server";
import { defineTool } from "@tulip-systems/ai/tools/server";Keep these imports out of client components.
Client imports
Chat components and client tool renderers are client-safe:
"use client";
import { ChatComposer, ChatThread } from "@tulip-systems/ai/chat/client";
import { defineToolClient } from "@tulip-systems/ai/tools/client";Model providers
The package does not prescribe a provider. Use any AI SDK-compatible model:
import { createOpenRouter } from "@openrouter/ai-sdk-provider";
export const openrouter = createOpenRouter({
apiKey: process.env.OPENROUTER_API_KEY,
compatibility: "strict",
});Then pass the model to an agent:
model: openrouter("openai/gpt-5-mini")